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

feat: Adds new tokens to Select #17

Merged
merged 11 commits into from
May 4, 2022

Conversation

lucasfp13
Copy link
Contributor

@lucasfp13 lucasfp13 commented Apr 29, 2022

What's the purpose of this pull request?

This PR intends to add new tokens to the Select component using the Theming Structure.

How does it work?

This PR uses local variables to parameterize the Select properties, then connects these scoped tokens to the global ones.

New global tokens:

None.

New local tokens for Select:

Default properties:

Local token Default value/Global token linked
--fs-select-height var(--fs-spacing-6)
--fs-select-min-height var(--fs-control-tap-size)
--fs-select-padding var(--fs-spacing-1) var(--fs-spacing-5) var(--fs-spacing-1) var(--fs-spacing-2)
--fs-select-text-color var(--fs-color-link)
--fs-select-border-radius var(--fs-border-radius-default)
--fs-select-bkg transparent
--fs-select-bkg-color-focus var(--fs-color-primary-bkg-light)
--fs-select-bkg-color-hover var(--fs-select-bkg-color-focus)
--fs-select-transition-timing var(--fs-transition-timing)
--fs-select-transition-property var(--fs-transition-property)
--fs-select-transition-function var(--fs-transition-function)
--fs-select-label-margin-right var(--fs-spacing-1)
--fs-select-label-color var(--fs-color-text-light)
--fs-select-icon-right var(--fs-spacing-2)
--fs-select-icon-color var(--fs-color-link)
Disabled: -----------------------------------
--fs-select-disabled-color var(--fs-color-disabled-text)
--fs-select-disabled-opacity 1

How to test it?

The Select component should look just as it was before these changes.

Right now, we have an error on Storybook that displays Select icon with the wrong style because it needs to have a wrapper to limit the input container. So it will be done in another bug task.

Screen Shot 2022-05-02 at 18 03 16

Checklist

  • Added an entry in the CHANGELOG.md at the beginning of its due section. The latest version should come first.

  • Added the PR number with the PR link at the entry in the CHANGELOG.md. E.g., New items in the pull_request_template.md (#12)

  • PR description

  • Updated the Storybook - if applicable.

  • Added a label according to the PR goal - Breaking change, Enhancement, Bug or Chore.

  • Added the component, hook, or pathname in-between backticks (``) - If applicable. E.g., ComponentName component.

@vercel
Copy link

vercel bot commented Apr 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
gatsby-store ✅ Ready (Inspect) Visit Preview May 4, 2022 at 10:33PM (UTC)

@lucasfp13 lucasfp13 added Features New feature or request Chore General tasks. and removed Features New feature or request labels Apr 29, 2022
@vtex-sites
Copy link

vtex-sites bot commented Apr 29, 2022

Lighthouse Reports

Here are the Lighthouse reports of this Pull Request

📝 Based on commit c3068a7

Lighthouse Report by page
📎   /
📎   /apple-magic-mouse-99988212/p
📎   /office

@lucasfp13 lucasfp13 marked this pull request as ready for review April 29, 2022 13:31
@vtex-sites
Copy link

vtex-sites bot commented Apr 29, 2022

Preview is ready

This pull request generated a Preview

👀   Preview: https://preview-17--gatsby.preview.vtex.app
🔬   Go deeper by inspecting the Build Logs
📝   based on commit c3068a7

Copy link
Collaborator

@renatamottam renatamottam left a comment

Choose a reason for hiding this comment

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

Awesome 👏

@hellofanny
Copy link
Contributor

Well Done! Can you check please on safari again pls. Maybe the autoprefix is not working on the storybook for me 🤔

image

@lucasfp13 lucasfp13 force-pushed the feat/FSSS-257-adds-new-tokens-to-select branch from eefdf49 to 9215b9a Compare May 4, 2022 22:31
@lucasfp13 lucasfp13 merged commit c3068a7 into main May 4, 2022
@lucasfp13 lucasfp13 deleted the feat/FSSS-257-adds-new-tokens-to-select branch May 4, 2022 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore General tasks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants