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 #122

Merged
merged 11 commits into from
Jun 15, 2022
Merged

Conversation

eduardoformiga
Copy link
Member

@eduardoformiga eduardoformiga commented Jun 14, 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 (#4)

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 14, 2022

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

Name Status Preview Updated
nextjs-store-storybook ✅ Ready (Inspect) Visit Preview Jun 15, 2022 at 3:07PM (UTC)

@vercel vercel bot temporarily deployed to preview June 14, 2022 23:02 Inactive
@vtex-sites
Copy link

vtex-sites bot commented Jun 14, 2022

Preview is ready

This pull request generated a Preview

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

@vercel vercel bot temporarily deployed to preview June 14, 2022 23:17 Inactive
@eduardoformiga eduardoformiga marked this pull request as ready for review June 14, 2022 23:23
@eduardoformiga eduardoformiga requested a review from a team June 14, 2022 23:23
@vercel vercel bot temporarily deployed to preview June 14, 2022 23:25 Inactive
@eduardoformiga eduardoformiga added Documentation Improvements or additions to documentation Features New feature or request Chore General tasks. labels Jun 14, 2022
@vtex-sites
Copy link

vtex-sites bot commented Jun 14, 2022

Lighthouse Reports

Here are the Lighthouse reports of this Pull Request

📝 Based on commit 7405d17

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

@vercel vercel bot temporarily deployed to preview June 15, 2022 00:24 Inactive
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.

Looks nice!

@vercel vercel bot temporarily deployed to preview June 15, 2022 14:15 Inactive
@vercel vercel bot temporarily deployed to preview June 15, 2022 14:28 Inactive
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.

Well done forms!!! 🤩 LGTM!

@vercel vercel bot temporarily deployed to preview June 15, 2022 15:07 Inactive
@eduardoformiga eduardoformiga merged commit 7405d17 into main Jun 15, 2022
@eduardoformiga eduardoformiga deleted the feat/theming-empty-state-fsss-374 branch June 15, 2022 15:10
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.

I have some suggestions for the doc organization, we can talk later :)

@eduardoformiga
Copy link
Member Author

I have some suggestions for the doc organization, we can talk later :)

I implemented it here. Thanks!

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.

4 participants