deprecate: deprecate widthScale/heightScale in favor of width/height#10202
deprecate: deprecate widthScale/heightScale in favor of width/height#10202
widthScale/heightScale in favor of width/height#10202Conversation
width and widthScale into a single propertywidth and widthScale into a single property
width and widthScale into a single propertywidth and widthScale into a single property
width and widthScale into a single propertywidth/height and widthScale/heightScale into a single property
width/height and widthScale/heightScale into a single propertywidth/height and widthScale/heightScale into a single property
|
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
…, as jest does not support nesting of it blocks
jcfranco
left a comment
There was a problem hiding this comment.
Once feedback is addressed, this should be good to merge!
📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏
📏📐📏📏📏📐📏📏📐📐📏📏📐📐📐📏📏📐📐📐📏📐📐📐📐📏📐📏
📏📐📐📏📏📐📏📐📏📏📐📏📏📐📏📏📐📏📏📏📏📐📏📏📏📏📐📏
📏📐📏📐📏📐📏📐📏📏📐📏📏📐📏📏📐📏📏📏📏📐📐📐📏📏📐📏
📏📐📏📏📐📐📏📐📏📏📐📏📏📐📏📏📐📏📏📏📏📐📏📏📏📏📏📏
📏📐📏📏📏📐📏📏📐📐📏📏📐📐📐📏📏📐📐📐📏📐📐📐📐📏📐📏
📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏📏
widthScale/heightScale in favor of width/heightwidthScale/heightScale in favor of width/height
widthScale/heightScale in favor of width/heightwidthScale/heightScale in favor of width/height
| export type Scale = "s" | "m" | "l"; | ||
| export type Status = "invalid" | "valid" | "idle"; | ||
| export type Width = "auto" | "half" | "full"; | ||
| export type Width = "s" | "m" | "l" | "auto" | "half" | "full"; |
There was a problem hiding this comment.
Could you do export type Width = Scale & "auto" | "half" | "full";? Same for Height above.
There was a problem hiding this comment.
I guess Height would just be export type Height = Scale;
There was a problem hiding this comment.
On the second thought, I feel like it might make things a bit confusing to read. Height, Width, and Scale are different props even though they have an overlap in type (with type Scale). s/m/l for scale does something else for width/height. Should they just have their own type names? It hurts my eyes to read type Height = Scale :)
There was a problem hiding this comment.
I suggested that purely for DRY reasons. Its really just a union type to keep from having to define "s" | "m" | "l" in 3 different places.
There was a problem hiding this comment.
But yeah for type Height = Scale, agree it does look weird, but it has more semantics at least. I'll let others chime in on it, curious to hear other opinions. @jcfranco
|
This PR has had test timeout issues on local machine and coupled with lumina migration it was cleaner to start a new branch deprecate: deprecate widthScale/heightScale in favor of width/height #10786 |
Related Issue: #6172
Summary
Refactor to consolidate
width/heightandwidthScale/heightScaleinto a single propertywidthwiths / m / l / auto / fullas options, andheightwiths / m / l. DeprecatewidthScaleandheightScaleproperties and thehalfvalue.