vtex-apps / search-result

VTEX Search Result app
23 stars 71 forks source link

Fix search-result ssr #648

Closed hiagolcm closed 11 months ago

hiagolcm commented 11 months ago

What problem is this solving?

639 removed the ssr:false flag from the search-result that was accidentally placed after deploying the AB feature.

This PR had to be deprecated due to layout shift issues

What we didn't know is that the variant variable was obtaining different results between SSR and CSR. In SSR the value for this variable is null, but for CSR, when the sp-variant cookie does not exist, the result was an empty string

This PR removes the ssr:false flag again and corrects the divergence in the variant variable.

How to test it?

Workspace You can disable the javaspcript from you browser in order to check the ssr rendered page. On chrome: Open dev-tools> press cmd+shift+p > type "disable javascript"

Screenshots or example usage:

Before: Captura de Tela 2023-12-07 às 12 12 39

Affter:

Captura de Tela 2023-12-07 às 12 12 02

vtex-io-ci-cd[bot] commented 11 months ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

vtex-io-docs-bot[bot] commented 11 months ago

Beep boop :robot:

I noticed you didn't make any changes at the docs/ folder

In order to keep track, I'll create an issue if you decide now is not a good time

vtex-io-ci-cd[bot] commented 11 months ago

Your PR has been merged! App is being published. :rocket: Version 3.128.0 → 3.128.1

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.search-result@3.128.1

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. :book: