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

[PWA-1244]: update url_suffix queries to fetch from storeConfig #3393

Merged
merged 25 commits into from
Sep 15, 2021

Conversation

pedrochiossi
Copy link
Contributor

Description

Updating Components to use one source of truth for url_suffix of products and categories, fetching from storeConfig instead of product/category entities.

Related Issue

Closes PWA-1244

Acceptance

Refactor all queries that use category or product url_suffix, to use the storeConfig suffix.

Verification Stakeholders

Specification

Verification Steps

Test scenario(s) for direct fix/feature

  1. Verify that user is able to navigate to a product page, and a category page when USE_STORE_CODE_IN_URL=true
  2. Verify that user can switch stores and view products and category pages when USE_STORE_CODE_IN_URL=true
  3. Verify that user can search for a product, and view search page results when USE_STORE_CODE_IN_URL=true
  4. Verify that user can do all of the above when USE_STORE_CODE_IN_URL=false

Test scenario(s) for any existing impacted features/areas

Test scenario(s) for any Magento Backend Supported Configurations

Is Browser/Device testing needed?

Any ad-hoc/edge case scenarios that need to be considered?

Screenshots / Screen Captures (if appropriate)

Breaking Changes (if any)

Checklist

  • I have added tests to cover my changes, if necessary.
  • I have added translations for new strings, if necessary.
  • I have updated the documentation accordingly, if necessary.

@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Sep 1, 2021

Fails
🚫 A version label is required. A maintainer must add one.
Messages
📖

Associated JIRA tickets: PWA-1244.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

Generated by 🚫 dangerJS against 5a12639

Copy link
Contributor

@pankhurigoel pankhurigoel left a comment

Choose a reason for hiding this comment

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

Nice work. Looks good to me.

@mikhaelbois
Copy link
Contributor

mikhaelbois commented Sep 14, 2021

@pedrochiossi

  • ✅ Verify that user is able to navigate to a product page, and a category page when USE_STORE_CODE_IN_URL=true
  • ✅ Verify that user can switch stores and view products and category pages when USE_STORE_CODE_IN_URL=true
  • ✅ Verify that user can search for a product, and view search page results when USE_STORE_CODE_IN_URL=true
  • ✅ Verify that user can do all of the above when USE_STORE_CODE_IN_URL=false

However, I do have one question, from my understanding the url suffix shouldn't be something that changes often.
Couldn't we get the data on build once instead of asking for it in multiple different queries?
Just like we already do in packages/pwa-buildpack/lib/queries/getStoreConfigData.graphql for some configs.

Also, still missing one official review.

@pedrochiossi
Copy link
Contributor Author

pedrochiossi commented Sep 15, 2021

Yes @mikhaelbois, I had this same idea of fetching once and persisting, but I talked to @supernova-at he mentioned that it would be better to keep things in sync with Admin changes. What do you think @supernova-at?

@pedrochiossi pedrochiossi added the version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump. label Sep 15, 2021
@mikhaelbois mikhaelbois merged commit 6f6fa1a into magento:develop Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Webjump partners-contribution pkg:pagebuilder pkg:peregrine pkg:venia-ui Progress: done version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants