Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Spectrum CSS Syncing #191

wants to merge 6 commits into from

Conversation

snowystinger
Copy link
Member

Ran diff/merge tool
Textfield and Typography need massive help. I've chosen our implementation over spectrum-css for now

Closes

✅ Pull Request Checklist:

  • Included link to corresponding Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exist for this component).
  • Looked at the Accessibility Standard and/or talked to @mijordan about Accessibility for this feature.

📝 Test Instructions:

🧢 Your Team:

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 {
Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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;
Copy link
Member Author

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...

Copy link
Member

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

Copy link
Member Author

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(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this?

Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member

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);
Copy link
Member Author

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

Copy link
Member

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;
Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/* t-shirt size-based typography */

@mixin typographyTShirtColor .spectrum-Heading--XXXL {}
Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope.

Copy link
Member

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.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adobe-bot
Copy link

Build successful! View the storybook

@lazd
Copy link
Member

lazd commented Feb 12, 2020

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.

@lazd
Copy link
Member

lazd commented Feb 12, 2020

@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

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

@snowystinger
Copy link
Member Author

snowystinger commented Feb 19, 2020

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

@dannify

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

@snowystinger
Copy link
Member Author

reopen if needed later

@snowystinger snowystinger deleted the spectrum-css-upgrade branch May 22, 2020 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants