-
Notifications
You must be signed in to change notification settings - Fork 197
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
feat(coachmark): S2 migration #3412
base: spectrum-two
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 8874538 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🚀 Deployed on https://pr-3412--spectrum-css.netlify.app |
File metricsSummaryTotal size: 1.66 MB* Table reports on changes to a package's main file.
colorwheel
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
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 seeing a few things on the design not represented yet.
Line-height changes
I see body and pagination in the S2 specs marked as using line-height-200
. I don't see the CSS using this token.
Keyboard shortcut
I don't see this new feature represented yet in our Docs examples or styles or controls. Does design need to define tokens for these keyboard shortcut elements on the specs?
4:3 and 16:19 image
The design shows an example of images at both of these aspect ratios, that we should demonstrate in our docs and maybe have a control for. I'm not exactly sure how this ties in with the sizing of the image and tokens.
Wait on popover to finalize?
This component is heavily reliant on popover, which has its S2 migration in progress and has been discussing and updating some items related to coachmark (#3365). So it may be worth waiting on that to merge before final review of its design.
Awesome catches! I updated the line-height and font tokens. I marked this blocked pending the popover work and started a thread about the image implementation (one token includes |
Spoke with design and it sounds like the minimum token is the minimum dimension for the coach mark image and 4:3 is not a strict max. This is the current state: .spectrum-CoachMark-image-wrapper {
block-size: var(--mod-coachmark-media-height, var(--spectrum-coachmark-media-height));
min-block-size: var(--mod-coachmark-media-min-height, var(--spectrum-coachmark-media-min-height));
...
} |
cdb180d
to
27d01df
Compare
e9b9444
to
28878d9
Compare
28878d9
to
63bbe7a
Compare
fcc97e9
to
db908ca
Compare
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.
The line-height looks good, and thanks for finding out the intentions on the 4:3 and 16:9 examples (where 4:3 is now a variant class).
It looks like the use of the heights needs a little adjustments.
And the newly added keyboard shortcut feature needs to be built and documented.
The stories on the "Docs" page appear cut off, but that appears to be more popover related? That is possibly something that was already fixed in main as I don't see that issue there.
2c5d15c
to
4715dab
Compare
8a04f82
to
61ab826
Compare
7e783b6
to
e3585cd
Compare
61ab826
to
3cd5f4d
Compare
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 is looking pretty nice after the rebase! I had a very long thought, and wasn't quite sure where to put it, so I apologize- it's going here 😆
I hope I'm not backtracking on old comments, but I'm second-guessing our Default story on the docs page currently (technically Standard
).
I don't find it very clear what the actual default coach mark is. According to Figma, their default component is something like hasImage: true, hasActionMenu: false, imageIsFixedHeight: false, hasPagination: true, (and you put all of those in the default args). I think it would be clearer to maybe put the no-action-menu-no-image in a separate story all by itself. Then Standard
and this new "No media, no action menu" story are just bound to Template()
.
Just quickly, some more story ideas I had for the docs page:
export const Standard = Template.bind({});
(showcases just the default coachmark, and we'd add documentation that the default coach mark has an image and doesn't have an action menu).
export const StandardNoMedia = Template.bind({});
StandardNoMedia.storyName = "Default, no media";
StandardNoMedia.args = {
hasImage: false,
};
![Screenshot 2025-01-23 at 1 24 03 PM](https://private-user-images.githubusercontent.com/69602589/406167907-211642ec-15a0-4a7a-806a-4ac6d8038a7c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODg3MzcsIm5iZiI6MTczOTA4ODQzNywicGF0aCI6Ii82OTYwMjU4OS80MDYxNjc5MDctMjExNjQyZWMtMTVhMC00YTdhLTgwNmEtNGFjNmQ4MDM4YTdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MDcxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhMzhhOTRjM2NkN2Q1ZWQwMDBlNzZmMzVhNDE3ZmU4MWZmYWFhMWM3N2I4MDcyZGE1ZDUyYTg5NWM1NjRmZGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eHkW5p4uDp-X4re_O07w7b-aGMnH_7RSGURxK3BZk3A)
Based on the code comment, the CoachmarkMenuStatesTemplate
should show the closed action menu and the open action menu. I would have probably kept that CoachmarkMenuStatesTemplate
basically as it was (but fix up the headings for open/closed, and a missing isOpen: false), but then another story could be:
export const WithActionMenu = CoachmarkMenuStatesTemplate.bind({});
WithActionMenu.storyName = "With action menu";
WithActionMenu.args = {
hasActionMenu: true,
};
![Screenshot 2025-01-23 at 1 24 10 PM](https://private-user-images.githubusercontent.com/69602589/406167986-e109ab65-3230-4547-b69f-7c69cd51a0ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODg3MzcsIm5iZiI6MTczOTA4ODQzNywicGF0aCI6Ii82OTYwMjU4OS80MDYxNjc5ODYtZTEwOWFiNjUtMzIzMC00NTQ3LWI2OWYtN2M2OWNkNTFhMGFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MDcxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBiYWRhZmQ2M2JhNTcxZTViNTZjN2FkYmU2YjBiN2Y4ZWE2YjJiOWUwZjFmMjliZWEwNjU3MGNlMmU4MzQwZjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vun2h62gpRa3dSfX41KZaPQlIHf7pZwEKWpDvW-GtbA)
I get what we're trying to do with these variants & stories, and just trying to show all the possible options. We could also add some additional documentation at the top of the page to clarify "all coach marks can have any combination of action menu, media, and keyboard shortcut options." Steplist does this with a callout to "all steplists can be static or interactive." Then it covers everything in a centralized place.
I definitely like Josh's comments about just adding more stories- I think it clarifies the options for users, and just separates all of the information a little better to make it easier to digest.
.changeset/nice-cows-shout.md
Outdated
| --spectrum-heading-sans-serif-font-weight | --spectrum-title-sans-serif-font-weight | | ||
| --spectrum-coach-mark-title-size | --spectrum-coach-mark-title-font-size | | ||
| --spectrum-heading-line-height | --spectrum-title-line-height | | ||
| --spectrum-coach-mark-body-size | --spectrum-coach-mark-body-font-size | | ||
| --spectrum-body-sans-serif-font-style | --spectrum-body-serif-font-style | | ||
| --spectrum-coach-mark-pagination-body-size | --spectrum-coach-mark-pagination-body-font-size | |
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.
Were there any other custom properties or tokens we should call out? Particularly regarding the keyboard shortcut stuff?
I was looking through the metadata changes and wondered if any of those (which seemed like, maybe a lot 🤷♀️ ) should be mentioned in the changelog.
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.
Updated it with a component-specific subset from metadata — let me know what you think. 😄
}, | ||
}; | ||
|
||
export const Default = CoachMarkGroup.bind({}); | ||
Default.tags = ["!autodocs"]; | ||
Default.args = {}; | ||
Default.args = { | ||
image: "example-card-landscape.png", |
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.
@cdransf I think this image: "example-card-landscape.png",
is adding an extra, unexpected control. Deleting it doesn't appear to make a difference to the component, but removes that unexpected control from the table.
![Screenshot 2025-01-23 at 1 54 31 PM](https://private-user-images.githubusercontent.com/69602589/406176893-dcc6741e-dbc1-4177-ab95-9741af16e453.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODg3MzcsIm5iZiI6MTczOTA4ODQzNywicGF0aCI6Ii82OTYwMjU4OS80MDYxNzY4OTMtZGNjNjc0MWUtZGJjMS00MTc3LWFiOTUtOTc0MWFmMTZlNDUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MDcxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZhMmUxYTA5ZTAyYTY3ZDFiOTg0YjJmZTQ4NDliYmRlZGNlYzM0YTRmZjgwNDg0YzMyYWQ2MmRhMmQ3MGM5OTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ROr60QvA3DHkxOxpjcHfgbAvp8Bd5GmHk1sbFYa6S2o)
4700b66
to
797d62a
Compare
41edc5f
to
29f4d75
Compare
56c6806
to
793571c
Compare
29f4d75
to
abbc929
Compare
abbc929
to
03dc527
Compare
db2a5dd
to
f34473b
Compare
03dc527
to
cb92b6b
Compare
f34473b
to
cf46c2b
Compare
- chore(colorwheel): update property name - chore(colorwheel): wip inset borders - chore(colorwheel): fix lint violations - chore(colorwheel): move mod declarations - chore(colorwheel): drop unused property + update metadata - chore(colorwheel): remove underlying border node + class - chore(colorwheel): remove unused property - fix(colorwheel): add missing mod - fix(colorwheel): comments for updated before spacing/positioning - fix(colorwheel): adopt proper token for border opacity - fix(colorwheel): remove inset border on disabled state - fix(colorwheel): remove global token reference - chore(colorwheel): highlight removed/added mods - chore(colorwheel): update copyright year - chore(colorwheel): add color loupe to default story - fix(colorwheel): correct WHC disabled background color value - chore(colorwheel): update test heading - fix(colorwheel): typos - chore(colorwheel): update token usage - chore(colorwheel): add without loupe test - chore(colorwheel): restore WHC styles - chore(colorwheel): move isWithColorLoupe property - fix(colorwheel): whc disabled background
cb92b6b
to
8874538
Compare
Description
CSS-1024
S2 coachmark migration
This migrates the
coachmark
component to S2. Custom properties have been remapped per the design spec.Additions
Adds
--spectrum-coachmark-media-fixed-height
for fixed4:3
image variant and an accompanying--mod-coachmark-media-fixed-height
mod. This variation has been added to thecoachmark
component story as a boolean control labeled asImage fixed height
. The class is conditionally added within thehasImage
block and, as such, will only impact rendering whenhasImage
is alsotrue
.Validation steps
coachmark
component and verify no regressions have occurred.Note: the new
font-family
tokens set the font toAdobe Clean
butAdobe Clean
is not loading on the branch created from thespectrum-two
base branch.Regression testing
Validate:
To-do list