-
Notifications
You must be signed in to change notification settings - Fork 81
feat: replace pagetype with by-linkid cascade + localized PLP/collection pages #3401
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
Open
hellofanny
wants to merge
29
commits into
feat/localized-slugs-links
Choose a base branch
from
feat/localized-collection-pages
base: feat/localized-slugs-links
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,062
−395
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
1d5f45c
feat: resolve localized product slugs via multilanguage API
hellofanny 9dc46a8
chore: Renames variables and adjust comment
hellofanny 38f4e99
chore: Adapts binding selector to redirect to the localized slug
hellofanny c5ab38b
chore: Extracts/Creates localization product context
hellofanny 3935d52
fix: Refactor and uses dataplane endpoint for catalog translated product
hellofanny ffe51e7
feat: Adds hrefLang list in the head
hellofanny be137ca
chore: adjusts hreflang for default locale
hellofanny 89d20b8
chore: Refactor bit the hreflang links code
hellofanny e391de9
chore: use categories[] array for localized PDP breadcrumb
hellofanny 3f7f5ff
chore: Uses category name from catalog
hellofanny a13e5e7
chore: applies coderabbit suggestions
hellofanny 41777a3
fix: restore pdp page after 404
hellofanny b658a7c
feat: Adds by-linkid catalog client methods for collection page resol…
hellofanny b7a4dab
feat: Replaces pagetype with by-linkid cascade in collectionLoader
hellofanny 2ec3fed
feat: Enables localized plp slugs in LocalizationSelector
hellofanny 5c65c06
fix: Passes locale to ServerCollectionPageQuery (collection metadata)
hellofanny 701150d
fix: Removes account param
hellofanny 57a78f2
fix: Normalizes slugs and use category tree for canonical IS facets
hellofanny fe084f9
fix: use IS selectedFacets locale from URL, not stale session on navigat
hellofanny 0e45315
chore: Adds tests files for commerce and collection
hellofanny 123411d
fix: Applies coderabbit suggestion on test
hellofanny cedf63a
fix: Scopes persistOtherLocales to PDP flow only
hellofanny 1cadbd2
fix: adds runtime shape guard for recoverOtherLocales JSON parse
hellofanny a566061
chore: Removes unnecessary type assertions
hellofanny 4acdc42
chore: Updates tests with byLinkId mocks
hellofanny 9360e5b
fix: use router.locale for IS locale facet instead of URL parsing
hellofanny 911a766
fix: Gates IS locale override behind localization.enabled
hellofanny 42a0a75
fix: Caches category tree request-scoped in collection resolvers
hellofanny c12e1f8
chore: Extracts typed helpers in collection and product resolvers
hellofanny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/api/src/platforms/vtex/clients/commerce/types/ByLinkId.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| export interface ByLinkIdCategoryResponse { | ||
| id: number | ||
| fatherCategoryId: number | null | ||
| name: string | ||
| linkId: string | ||
| title: string | null | ||
| description: string | null | ||
| /** SEO meta description — equivalent to pagetype.metaTagDescription. TODO: to be added by Catalog team. */ | ||
| metaTagDescription: string | null | ||
| /** Localized linkIds keyed by locale. Null when no multilanguage entries are registered. */ | ||
| availableLinkIds: Record<string, string> | null | ||
| } | ||
|
|
||
| export interface ByLinkIdBrandResponse { | ||
| id: number | ||
| name: string | ||
| linkId: string | ||
| title: string | null | ||
| description: string | null | ||
| /** SEO meta description — equivalent to pagetype.metaTagDescription. TODO: to be added by Catalog team. */ | ||
| metaTagDescription: string | null | ||
| availableLinkIds: Record<string, string> | null | ||
| } | ||
|
|
||
| export interface ByLinkIdCollectionResponse { | ||
| id: number | ||
| name: string | ||
| linkId: string | null | ||
| title: string | null | ||
| description: string | null | ||
| /** SEO meta description — equivalent to pagetype.metaTagDescription. TODO: to be added by Catalog team. */ | ||
| metaTagDescription: string | null | ||
| availableLinkIds: Record<string, string> | null | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.