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 tokens to EmptyState #113

Merged
merged 8 commits into from
Jun 16, 2022

Conversation

eduardoformiga
Copy link
Member

@eduardoformiga eduardoformiga commented Jun 15, 2022

What's the purpose of this pull request?

This PR applies the new Theming structure to EmptyState: new scoped tokens linked to global ones.

How does it work?

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

New local tokens for EmptyState

Local token Default value/Global token linked
--fs-empty-state-height 100%
--fs-empty-state-min-height 50vh
--fs-empty-state-padding 0 var(--fs-spacing-8)
--fs-empty-state-bkg-color var(--fs-color-neutral-bkg)

Rounded Variant

Local token Default value/Global token linked
--fs-empty-state-border-radius var(--fs-border-radius)

Related Components

EmptyCart EmptyGallery

Nested Elements

Title

Local token Default value/Global token linked
--fs-empty-state-title-margin-bottom var(--fs-spacing-2)
--fs-empty-state-title-color var(--fs-color-disabled-text)
--fs-empty-state-title-size var(--fs-text-size-3)

Link

Local token Default value/Global token linked
--fs-empty-state-link-min-width 11.875rem

How to test it?

  • The EmptyState component and its related components should look just as it was before these changes.
  • You can check the story on Storybook.

Checklist

You may erase this after checking them all ;)

Changelog

  • Added an entry in the CHANGELOG.md at the beginning of its due section. The latest version should comes 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

  • 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.
  • Identified the function or parameter in the PR - If applicable. E.g., useWindowDimensions hook.

Documentation

  • PR description
  • Added to/Updated the Storybook - if applicable.
  • For documentation changes, ping @ carolinamenezes, @ PedroAntunesCosta or @ Mariana-Caetano to review and update.

@vercel
Copy link

vercel bot commented Jun 15, 2022

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

Name Status Preview Updated
gatsby-store-storybook ✅ Ready (Inspect) Visit Preview Jun 15, 2022 at 10:36PM (UTC)

@vtex-sites
Copy link

vtex-sites bot commented Jun 15, 2022

Preview is ready

This pull request generated a Preview

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

@eduardoformiga eduardoformiga self-assigned this Jun 15, 2022
@eduardoformiga eduardoformiga added Documentation Improvements or additions to documentation Features New feature or request Chore General tasks. labels Jun 15, 2022
@eduardoformiga eduardoformiga marked this pull request as ready for review June 15, 2022 16:58
@eduardoformiga eduardoformiga requested a review from a team June 15, 2022 16:59
Copy link
Contributor

@filipewl filipewl left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@vtex-sites
Copy link

vtex-sites bot commented Jun 15, 2022

Lighthouse Reports

Here are the Lighthouse reports of this Pull Request

📝 Based on commit dcb345c

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

Copy link
Contributor

@hellofanny hellofanny 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 and it's working fine!

@eduardoformiga eduardoformiga merged commit 7837356 into main Jun 16, 2022
@eduardoformiga eduardoformiga deleted the feat/theming-empty-state-fsss-374 branch June 16, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore General tasks. Documentation Improvements or additions to documentation Features New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants