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

[WIP] chore: Uses suspense to display skeletons for ProductTiles and ProductShelf sections #119

Closed
wants to merge 3 commits into from

Conversation

danzanzini
Copy link
Contributor

@danzanzini danzanzini commented Jun 23, 2022

What's the purpose of this pull request?

This PR changes the ProductShelf and ProductTiles sections to properly use Suspense to display its Skeletons.

How does it work?

It wraps both components into a Suspense clause. The wrapping is made at the index.tsx file of these components. This way, we could remove the Suspense call from the homepage and the Skeleton call inside the component.

How to test it?

Go to the preview link and reload the homepage. The skeletons at the ProductShelf and ProductTiles sections should appear in the proper place and without shifts.

References

https://pt-br.reactjs.org/docs/concurrent-mode-suspense.html
https://sergiodxa.com/articles/swr/suspense/

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.

@danzanzini danzanzini requested a review from tlgimenes June 23, 2022 15:49
@vercel
Copy link

vercel bot commented Jun 23, 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 23, 2022 at 4:14PM (UTC)

@vtex-sites
Copy link

vtex-sites bot commented Jun 23, 2022

Preview is ready

This pull request generated a Preview

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

@danzanzini danzanzini changed the title chore: Uses suspense to display skeletons at homepage chore: Uses suspense to display skeletons for ProductTiles and ProductShelf sections Jun 23, 2022
@danzanzini danzanzini changed the title chore: Uses suspense to display skeletons for ProductTiles and ProductShelf sections [WIP] chore: Uses suspense to display skeletons for ProductTiles and ProductShelf sections Jun 29, 2022
renatamottam added a commit that referenced this pull request Jul 22, 2022
* Fixes Incentives text color
* Improves text display on Hero and BannerText
* Fixes ProductShelf padding top
* Fixes tokens typo of button-buy
* Improves ProductCard tokens
* Creates Brandless theme
* Fixes color actions tokens
* Fixes ProductCard border
* Updates global Tokens to match Brandless style
* Removes Lato from Typography doc
* Fixes Toggle tokens with Brandless
* Creates two new themes
* Fixes Border Color hover token
renatamottam pushed a commit that referenced this pull request Jul 22, 2022
* Feat: Theming brandless (#119)

* Fixes Incentives text color
* Improves text display on Hero and BannerText
* Fixes ProductShelf padding top
* Fixes tokens typo of button-buy
* Improves ProductCard tokens
* Creates Brandless theme
* Fixes color actions tokens
* Fixes ProductCard border
* Updates global Tokens to match Brandless style
* Removes Lato from Typography doc
* Fixes Toggle tokens with Brandless
* Creates two new themes
* Fixes Border Color hover token

* Feat: Theming Adjustments (#175)

* Fixes `SectionListProps`

* Fixes `Tiles` border-radius

* Adds missing TokenColor on Interactive Controls page

* Removes commented tokens from `CustomTheme`

* Fixes theme class on body

* Fixes `CartToggle` background color

* Adds links between `SlideOver` Use Cases components

* Fixes product-listing-pagination section

* Removes Themes dependencies

* Creates Themes pages

* Fixes `Alert` bkg

* Updates Changelog

* Adds `TokenTable` to `Typography` page

* Fixes Theme Section Storybook classes

* Improves `Typography` doc page

* Improves `Theme` doc pages titles

Co-Authored-By: Fanny Chien <[email protected]>

* Updates `Customizing` copy

Co-authored-by: Fanny Chien <[email protected]>

* Updates Changelog

Co-authored-by: Fanny Chien <[email protected]>

Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>

* Fixes static images url

* Adjusts `Theming` proposal to Gatsby technology

* Updates Changelog

Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
@danzanzini
Copy link
Contributor Author

Closing because it's inactive for a long time. There is a Jira task so we can tackle this at a later time

@danzanzini danzanzini closed this Aug 16, 2022
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.

1 participant