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 EmptyState content-type and enable EmptyState section override #2184

Merged
merged 15 commits into from
Jan 30, 2024

Conversation

eduardoformiga
Copy link
Member

@eduardoformiga eduardoformiga commented Dec 21, 2023

This approach introduces Breaking Changes

What's the purpose of this pull request?

EmptyState is a complex section that is being used directly (without CMS) on the error 500, error 404, and login pages.

While we've been doing section override 2.0, we've seen that it wouldn't be possible without bringing this section to the CMS and making it more generic (without direct use on the pages).

So, the idea we discussed is to create three new content-types (login, 500, and 404) and use the EmptyState section on these pages.

  • Adapts login page to use CMS with EmptyState
  • Adapts error 500 page to use CMS with EmptyState
  • Adapts error 404 page to use CMS with EmptyState
  • This PR also adapts EmptyState to use Section Override API v2.

How to test it?

  1. Use the workspace https://formspacefs1239--storeframework.myvtex.com/admin/headless-cms/faststore
  2. Change the API workspace to formspacefs1239 in the faststore.config.default.js file.
  3. run this project locally with yarn dev.
  4. confirm if the new content types are in the cms like in the image below
Screenshot 2023-12-28 at 19 25 23

If they are not created, you should run in the workspace formspacefs1239 the commands:

vtex switch storeframework
vtex use formspacefs1239
vtex cms sync faststore

Also, add the EmptyState section to every page.

  1. You can test each page:
Page
login Screenshot 2023-12-28 at 19 16 33
error 500 Screenshot 2023-12-28 at 19 19 26
error 404 Screenshot 2023-12-28 at 19 14 06
  • Starter PR should be opened after emerging this PR and publishing the content types.

References

Copy link

vercel bot commented Dec 21, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2024 8:02pm

@eduardoformiga eduardoformiga marked this pull request as ready for review December 28, 2023 22:40
@eduardoformiga eduardoformiga requested a review from a team as a code owner December 28, 2023 22:40
@eduardoformiga eduardoformiga requested review from emersonlaurentino and renatamottam and removed request for a team December 28, 2023 22:40
@hellofanny hellofanny changed the title Feat: section override EmptyState Feat!: Adds EmptyState content-type and enable EmptyState section override Jan 10, 2024
@hellofanny hellofanny added breaking changes This pull request will introduce breaking changes don't merge Blocked by some reason - - Please mention the reason labels Jan 24, 2024
@eduardoformiga eduardoformiga changed the base branch from main to 3.x January 30, 2024 14:52
@eduardoformiga eduardoformiga merged commit 7aa6d91 into 3.x Jan 30, 2024
5 of 7 checks passed
@eduardoformiga eduardoformiga deleted the feat/section-override-empty-state-fs-1239 branch January 30, 2024 15:17
@eduardoformiga eduardoformiga mentioned this pull request Jan 30, 2024
eduardoformiga added a commit that referenced this pull request Jan 31, 2024
## What's the purpose of this pull request?

This PR holds the PRs that will be available in 3.x version:

- #2184 
- #2198 
- #2176

Preview PR
- vtex-sites/starter.store#360

---------

Co-authored-by: Fanny <fanny.chien@vtex.com.br>
Co-authored-by: Ícaro Azevedo <icaro.azevedo@vtex.com>
Co-authored-by: Mariana Caetano Pereira <67270558+Mariana-Caetano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes This pull request will introduce breaking changes don't merge Blocked by some reason - - Please mention the reason
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants