-
Notifications
You must be signed in to change notification settings - Fork 27
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
refactor(custom views selector): ui refinement #3308
Conversation
🦋 Changeset detectedLatest commit: dd02d2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 38 packages
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 |
✅ Linked to Task SHIELD-968 · Update Custom Views selector UI |
Deploy preview for application-kit-custom-views ready! ✅ Preview Built with commit dd02d2b. |
Deploy preview for merchant-center-application-kit ready! ✅ Preview Built with commit dd02d2b. |
59f1a29
to
72a7d0e
Compare
4e03bf0
to
69cacb8
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.
Nice work! 🤗
${designTokens.colorNeutral98}, | ||
${designTokens.colorNeutral98} | ||
); | ||
padding: 7px ${designTokens.spacing20}; |
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.
Nit: why 7
? Can't we use the normal scale of multiple of 4s (4, 8, 12, 16, ...)?
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.
Sounds good to me 👍, would it be ok with you @NataliaSclipet?
display: flex; | ||
align-items: center; | ||
padding: ${designTokens.spacing20} ${designTokens.spacing25}; | ||
height: 30px; |
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.
Nit: also here, why do we need to make an exception for this?
Can't we use the design token for buttons (medium)?
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.
Sounds good, just double checking with @NataliaSclipet
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.
Can we keep this exception both for here and above please? I'm aware we are not using our design tokens, however these exceptions here has been defined and reviewed together with Sven and Simone. @kark
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.
Thank you, that's fine with me 😊
width: 1px; | ||
height: 18px; | ||
background-color: #cccccc; |
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.
Nit: these values shouldn't be hardcoded
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.
Appreciate it! I discovered this color hardcoded in the UI kit, so I left it hardcoded here as well.
https://github.com/commercetools/ui-kit/blob/b8ed8e4f527c69c18ab5c6f536a1b0cbffa92eea/design-system/materials/internals/story/shared-components.js#L19-L22
But now I've noticed that's only used in a story.
I can add a design token 👍
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.
Don't we have an existing design token for this color? Why do we need to add a new one?
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.
If I'm not mistaken, #cccccc
translates to hsl(0, 0%, 80%)
. I don't think we have it available as a token.
Thank you for working on it @kark . |
Regarding the (we would also need to include it in the Vistual Testing app) |
b034294
to
877266a
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.
Looks great to me 💯
Thanks a lot for working on this one, Kacper 🙇
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! 🙌
As discussed in our sync let's keep these special changes as a (hopefully) temporary implementation.
chore: changeset test: fix refactor: use accessiblebutton refactor: use text detail style: add border radius style: use gradient for the background style: use correct colors
d4e4d39
to
dd02d2b
Compare
@NataliaSclipet Here we are only changing the UI of the selector but we have another PR where we also change its placement on the different pages. I would suggest you make your review in the other PR (after this one is merged and the other one gets this changes) instead so you get the full picture and, if there's any styling issue with the selector, I can adjust it over there. What do you think? |
We have just discussed that with @NataliaSclipet to do what @CarlosCortizasCT suggested, so I'll merge this PR now 🙂 |
Summary
This PR changes the UI of the custom views selector component.
It doesn't cover the correct placement of the selector.
Screen.Recording.2023-11-27.at.10.39.05.mov
The changes can be observed in visual regression tests output 👇.
Open questions:
Regarding the icon, it felt to me it is associated with an additional feature for hiding the selector upon clicking the icon. However, as of now, this functionality has not been implemented.
As for the title, is it essential to remove the colon? Please note that if the colon is removed, all messages will need to be retranslated.