Breaking changes wishlist (for v16 & v17) #456
pretzelhammer
started this conversation in
Ideas
Replies: 1 comment
-
|
All except 2, 3, and 10 are addressed in this PR (v16): #500 We will address 2, 3, and maybe 10 in v17. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Normally I keep all of these things in my head but I thought I'd make it public and solicit suggestions from other Maker devs & Maker users:
Breaking changes I want to make eventually:
parentModalfrommodalApi.state.parentModal. it's already been deprecated, we just need to remove it.@icons.chevronDownand@icons.chevronUpwe should have@icons.selectClose = '@icons.chevronDown'and@icons.selectOpen = '@icons.chevronUp'and so on for the rest of the iconscriticaltoerror, e.g.@colors.critical,@icons.critical. it's weird that we generally useerrorandcriticalinterchangeably in the codebase and public api and they're both mean exactly the same thing but a person can never be sure which to use in any particular situation without having to look it up first, which is annoying, so we should just get rid ofcriticaland useerroreverywhere.normal&largetomedium&largeto be more consistent with the naming scheme for sizes we use across all other componentsclick-handlerfrom MMenuOption and use@clickinsteadnullvalues foriconNamein MProgressCircle we should make allundefined&nullvalues illegal, and if people want to toggle the icon we should add ashow-iconprop to MProgressCircle similar to how MToast workssizeprop instead of a Number pixel value/utilsto/componentsand leave the/utilsdirectory purely for js helper functionsundefinedandnullvalues should be made illegal for all themeable props (and for all props in general). This way merging nested subthemes behaves in a more simple and predictable manner. For example, let's say I have 2 props on a component, calledpropDoesntAllowNullandpropAllowsNull, and let's say this is show they're defined in the root parent theme of the app:So far so good, yet what happens when someone passes a subtheme object like this?:
The Maker theme resolver can't resolve these 2 props in a consistent uniform way, and trying to do so will break one or the other. For example:
nullis always a valid value, in which case it will passnulltopropAllowsNullBUT it will also passnulltopropDoesntAllowNullwhich will break itnullis never a valid value, in which case it will pass'nonNullDefault'topropAllowsNulland'nonNullDefault'topropDoesntAllowNullso both will work, but maybe not in the way the developer intended, since it's possible the developer specifically WANTED the defaultnullbehavior forpropAllowsNullsince the prop does allownullas a valid value and yet the theme resolver chose'nonNullDefault'from the root parent theme insteadI hope it's clear that option 2 is better than option 1, but option 2 doesn't work reliably as long as well allow
nullorundefinedas valid values for themeable props, since it puts the theme resolver in the impossible position of having to read the developer's mind to know if they setnullon a nullable prop because they want thenullbehavior or because they want to go further up the theming chain and inherit a value from the parent theme. TL;DR: we should disallownullandundefinedas valid prop values. We can substitute any other arbitrary value if the default null behavior is complex, like the string'magic'is need be.Breaking changes I maybe want to make:
v-modelfor PinInput, remove thecompleteevent and refactor theshakeAndClearInputsmethod to justshake, or create a new MShake component that PinInput can be wrapped in and removeshakeAndClearInputsentirely. I want to do this because PinInput is the only form component that doesn't havev-modelimplemented, and the emitted event and public method were only implemented to compensate for the lack of av-model, but the better solution would have been to just implementv-model.Breaking changes I wanted to make but turns out I can't:
TransitionResizeas I thought it wasn't being used by anyone, but it turns out it's being used by the Checkout team, so it must remainBeta Was this translation helpful? Give feedback.
All reactions