-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spectrum CSS Syncing #191
Spectrum CSS Syncing #191
Conversation
Textfield and Typography need massive help. I've chosen our implementation over spectrum-css for now
@@ -22,6 +22,11 @@ governing permissions and limitations under the License. | |||
flex-shrink: 0; | |||
} | |||
|
|||
> .spectrum-Rule--vertical { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why this is in here... but it's right here https://github.com/adobe/spectrum-css/blob/master/components/buttongroup/index.css#L26 and it totally breaks modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's due to this: adobe/spectrum-css@ea7b85f
We would otherwise have to apply inline styles to position the rules correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking maybe this doesn't belong in spectrum-css then? and we should handle it in react-spectrum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm, I think we would have to make the call -- do we ever try to modify components that appear inside of other components? If we do, we break modules, but things Just Work™️ when placed in different contexts. If we don't some things are a little more manual.
I would be fine with backing out this change, nobody asked for it, I just added it during my work on a related issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the breaking changes, lets apply align-self: stretch to all dividers #198 (comment)
how does that sound? @lazd
@@ -115,6 +115,9 @@ governing permissions and limitations under the License. | |||
.spectrum-Dialog-divider { | |||
display: none; | |||
} | |||
margin-left: var(--spectrum-dialog-icon-margin-left); | |||
flex-shrink: 0; | |||
align-self: flex-start; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we need these...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those bits were added by @jianliao and I to fix the positioning of the icon, but they have somehow appeared in the wrong place?
They are supposed to be part of .spectrum-Dialog-typeIcon
. See adobe/spectrum-css@1d56fd9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the catch, doing these merges causes my eyes to bleed and sometimes i miss things
I'll fix it tomorrow
@@ -122,13 +122,27 @@ governing permissions and limitations under the License. | |||
.spectrum-Icon + .spectrum-Menu-itemLabel, | |||
.spectrum-Menu-itemIcon + .spectrum-Menu-itemLabel { | |||
margin-inline-start: var(--spectrum-selectlist-thumbnail-image-padding-x); | |||
|
|||
inline-size: calc( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LFDanLu ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this looks like it was from spectrum-css adding overflow-wrap for MenuItems (german connected nouns and stuff). I think we'll need this when we get variable sized v3 MenuItem support, though we'll have to confirm what the design should look like since the XD file I have doesn't actually show multiline labels or descriptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be included here right now in this update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can discard it for now since we don't have support for variable sized menu items
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sizes the labels with icons so they wrap correctly. If it's not hurting anything, I say leave it.
.spectrum-Popover { | ||
&.spectrum-Popover--dialog { | ||
.spectrum-Dialog-typeIcon { | ||
margin-left: var(--spectrum-popover-dialog-icon-margin-left); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure about this, also it's breaking modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jianliao it looks like this shouldn't be here at all; it's already defined in Dialog.
@@ -87,6 +87,7 @@ governing permissions and limitations under the License. | |||
|
|||
.spectrum-TreeView-indicator { | |||
display: block; | |||
box-sizing: content-box; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dannify I think this is fixing that issue someone had in the channel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it was adobe/spectrum-css#467
|
||
/* t-shirt size-based typography */ | ||
|
||
@mixin typographyTShirtColor .spectrum-Heading--XXXL {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devongovett know anything about these typography changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just dropped a new Typography API: adobe/spectrum-css#210
The old API is still present, so it's a backwards compatible change (and means we have exactly 3 ways of doing Typography, and 2 of them are deprecated. yay.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More details on migration and whatnot live here: http://spectrum-css-archives.s3-website.us-east-2.amazonaws.com/2.17.0/docs/typography.html#migratingfromdeprecatedtypography
Build successful! View the storybook |
I will manually correct Textfield as part of #162. The breaking change from adobe/spectrum-css#142 is also in my sprint, so I'll be working on that. |
@berhard-adobe added the new Typography API with t-shirt sizing, I suggest V3 moves to that instead of implementing any part of the old API it's deprecated. See http://spectrum-css-archives.s3-website.us-east-2.amazonaws.com/2.17.0/docs/typography.html |
Build successful! 🎉 |
Build successful! 🎉 |
Ok, I think I've adjusted in response to most of the comments We'll need to introduce typography, but it wasn't immediately clear how to move over to that, just using the classnames didn't work, they weren't picked up on the css module object. Good news, nothing is implemented with it yet except documentation site. Dialog Icon may need some placement help, but it's pretty good now Divider needs some resolution with regards to putting align-self: stretch on all of them |
Build successful! 🎉 |
Build successful! 🎉 |
reopen if needed later |
Ran diff/merge tool
Textfield and Typography need massive help. I've chosen our implementation over spectrum-css for now
Closes
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Team: