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

refactor(custom views selector): ui refinement #3308

Merged
merged 5 commits into from
Nov 30, 2023

Conversation

kark
Copy link
Contributor

@kark kark commented Nov 24, 2023

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 👇.
Screenshot 2023-11-27 at 11 55 08

Open questions:

designs PR
Screenshot 2023-11-27 at 10 50 32 Screenshot 2023-11-27 at 10 43 59
  • for now I haven't changed the icon and the title.

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.

Copy link

changeset-bot bot commented Nov 24, 2023

🦋 Changeset detected

Latest commit: dd02d2b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 38 packages
Name Type
@commercetools-website/components-playground Patch
@commercetools-frontend/mc-html-template Patch
@commercetools-local/visual-testing-app Patch
@commercetools-frontend/application-components Patch
@commercetools-frontend/mc-scripts Patch
@commercetools-frontend/application-shell Patch
@commercetools-frontend/codemod Patch
@commercetools-applications/merchant-center-template-starter-typescript Patch
@commercetools-applications/merchant-center-template-starter Patch
@commercetools-applications/merchant-center-custom-view-template-starter-typescript Patch
@commercetools-applications/merchant-center-custom-view-template-starter Patch
@commercetools-local/playground Patch
@commercetools-frontend/cypress Patch
@commercetools-backend/eslint-config-node Patch
@commercetools-backend/express Patch
@commercetools-backend/loggers Patch
@commercetools-frontend/actions-global Patch
@commercetools-frontend/application-config Patch
@commercetools-frontend/application-shell-connectors Patch
@commercetools-frontend/assets Patch
@commercetools-frontend/babel-preset-mc-app Patch
@commercetools-frontend/browser-history Patch
@commercetools-frontend/constants Patch
@commercetools-frontend/create-mc-app Patch
@commercetools-frontend/eslint-config-mc-app Patch
@commercetools-frontend/i18n Patch
@commercetools-frontend/jest-preset-mc-app Patch
@commercetools-frontend/jest-stylelint-runner Patch
@commercetools-frontend/l10n Patch
@commercetools-frontend/mc-dev-authentication Patch
@commercetools-frontend/notifications Patch
@commercetools-frontend/permissions Patch
@commercetools-frontend/react-notifications Patch
@commercetools-frontend/sdk Patch
@commercetools-frontend/sentry Patch
@commercetools-frontend/url-utils Patch
@commercetools-website/custom-applications Patch
@commercetools-website/custom-views Patch

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

Copy link

swarmia bot commented Nov 24, 2023

Copy link
Contributor

github-actions bot commented Nov 24, 2023

Deploy preview for application-kit-custom-views ready!

✅ Preview
https://application-kit-custom-views-4wt902ee7-commercetools.vercel.app
https://appkit-cv-sha-1a8798469b5c5b6fdc3f2a99573e15f108064daf.commercetools.vercel.app
https://appkit-cv-pr-3308.commercetools.vercel.app

Built with commit dd02d2b.
This pull request is being automatically deployed with vercel-action

Copy link
Contributor

github-actions bot commented Nov 24, 2023

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-a4hnlhyo4-commercetools.vercel.app
https://appkit-sha-1a8798469b5c5b6fdc3f2a99573e15f108064daf.commercetools.vercel.app
https://appkit-pr-3308.commercetools.vercel.app

Built with commit dd02d2b.
This pull request is being automatically deployed with vercel-action

Copy link
Member

@emmenko emmenko left a 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};
Copy link
Member

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

Copy link
Contributor Author

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?
Screenshot 2023-11-28 at 10 06 50

display: flex;
align-items: center;
padding: ${designTokens.spacing20} ${designTokens.spacing25};
height: 30px;
Copy link
Member

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

https://github.com/commercetools/ui-kit/blob/dc24278e712b45a08872cbf3608a3d36dabe74d0/design-system/materials/internals/definition.yaml#L971-L972

Copy link
Contributor Author

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
Screenshot 2023-11-28 at 10 10 03

Copy link

@NataliaSclipet NataliaSclipet Nov 28, 2023

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

Copy link
Contributor Author

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 😊

Comment on lines +103 to +105
width: 1px;
height: 18px;
background-color: #cccccc;
Copy link
Member

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

Copy link
Contributor Author

@kark kark Nov 28, 2023

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 👍

Copy link
Member

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?

Copy link
Contributor Author

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.

@NataliaSclipet
Copy link

Thank you for working on it @kark .
Regarding the title and the icon, could you implement the title and icon that are in the new designs and keep the colon, (don't remove it), please?
Thank you for sharing your input regarding the icon, the decision of changing it comes from Simone and Sven.

@CarlosCortizasCT
Copy link
Contributor

Regarding the Custom Views label, please also be aware the design is using font-weigth: 300 and we're not importing that value for the Inter font (reference).

(we would also need to include it in the Vistual Testing app)

Copy link
Contributor

@CarlosCortizasCT CarlosCortizasCT left a 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 🙇

Copy link
Member

@emmenko emmenko left a 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
@CarlosCortizasCT
Copy link
Contributor

@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?

@kark
Copy link
Contributor Author

kark commented Nov 30, 2023

@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 🙂

@kark kark merged commit 4662db5 into main Nov 30, 2023
20 checks passed
@kark kark deleted the SHIELD-968-custom-views-selector branch November 30, 2023 08:52
@ct-changesets ct-changesets bot mentioned this pull request Nov 30, 2023
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.

4 participants