Repository navigation
fix: updates schemas vtex.faststore - #3304
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
WalkthroughThis PR extends the CMS schema to enable the ShoppingAssistant component across all major page types and introduces comprehensive Quick Order configuration to the Navbar component with file upload, drawer modal, toast notifications, and comprehensive messaging and accessibility labeling. ChangesShoppingAssistant Component and Quick Order Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/cms/faststore/schema.json`:
- Around line 2923-2933: The schema for the toastMessages entry "fileTimeout" is
missing a configurable title property; update the "fileTimeout" object in the
JSON schema to add a "title" property (type: string) alongside "message" so it
matches the shape used by other toast objects like "noFileSelected",
"noDataFound", and "fileProcessingError", ensuring CMS users can edit both title
and message for fileTimeout.
- Around line 2968-2983: The schema exposes two properties that configure the
same aria-label (accessibilityLabels.searchButtonAriaLabel and
searchInput.submitButtonAriaLabel), causing redundant configuration; remove the
duplicate by deleting searchInput.submitButtonAriaLabel from the schema and keep
accessibilityLabels.searchButtonAriaLabel as the single source-of-truth (ensure
its default remains "Submit Search"), and if code still supports the fallback,
add a short deprecation note to searchInput.submitButtonAriaLabel’s schema entry
(or omit it entirely) and update any schema descriptions to state that
accessibilityLabels.searchButtonAriaLabel is preferred.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9d3fbfb1-02f0-4945-b7a3-33065eb0927d
📒 Files selected for processing (10)
packages/core/cms/faststore/components/cms_component__navbar.jsoncpackages/core/cms/faststore/components/cms_component__shoppingassistant.jsoncpackages/core/cms/faststore/pages/cms_content_type__globalfootersections.jsoncpackages/core/cms/faststore/pages/cms_content_type__globalheadersections.jsoncpackages/core/cms/faststore/pages/cms_content_type__home.jsoncpackages/core/cms/faststore/pages/cms_content_type__landingpage.jsoncpackages/core/cms/faststore/pages/cms_content_type__pdp.jsoncpackages/core/cms/faststore/pages/cms_content_type__plp.jsoncpackages/core/cms/faststore/pages/cms_content_type__search.jsoncpackages/core/cms/faststore/schema.json
| "fileTimeout": { | ||
| "title": "File timeout", | ||
| "type": "object", | ||
| "properties": { | ||
| "message": { | ||
| "title": "Message", | ||
| "type": "string", | ||
| "default": "The file may be too large, corrupted, or the parser may be stuck." | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
fileTimeout toast is missing a configurable title field.
Every other toast object under toastMessages (noFileSelected, noDataFound, fileProcessingError, noDataAvailable, noValidSkus) exposes both a title and a message property. fileTimeout only exposes message, making its title non-configurable via the CMS.
🛠️ Proposed fix to add the missing `title` field
"fileTimeout": {
"title": "File timeout",
"type": "object",
"properties": {
+ "title": {
+ "title": "Title",
+ "type": "string",
+ "default": "File timeout"
+ },
"message": {
"title": "Message",
"type": "string",
"default": "The file may be too large, corrupted, or the parser may be stuck."
}
}
}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/core/cms/faststore/schema.json` around lines 2923 - 2933, The schema
for the toastMessages entry "fileTimeout" is missing a configurable title
property; update the "fileTimeout" object in the JSON schema to add a "title"
property (type: string) alongside "message" so it matches the shape used by
other toast objects like "noFileSelected", "noDataFound", and
"fileProcessingError", ensuring CMS users can edit both title and message for
fileTimeout.
| "accessibilityLabels": { | ||
| "title": "Accessibility Labels", | ||
| "type": "object", | ||
| "properties": { | ||
| "attachButtonAriaLabel": { | ||
| "title": "Attach file button aria-label", | ||
| "type": "string", | ||
| "default": "Attach File" | ||
| }, | ||
| "searchButtonAriaLabel": { | ||
| "title": "Search button aria-label", | ||
| "type": "string", | ||
| "default": "Submit Search" | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify which aria-label prop the search button component reads
rg -n "searchButtonAriaLabel\|submitButtonAriaLabel" --type ts -C 3Repository: vtex/faststore
Length of output: 40
🏁 Script executed:
# First, verify the properties exist at the claimed lines
wc -l packages/core/cms/faststore/schema.jsonRepository: vtex/faststore
Length of output: 103
🏁 Script executed:
# Check lines around 2980 and 2583 in schema.json
sed -n '2970,2985p' packages/core/cms/faststore/schema.json | cat -nRepository: vtex/faststore
Length of output: 800
🏁 Script executed:
# Check lines around 2583 in schema.json
sed -n '2573,2593p' packages/core/cms/faststore/schema.json | cat -nRepository: vtex/faststore
Length of output: 875
🏁 Script executed:
# Search for actual usage of these properties in TypeScript components
rg "searchButtonAriaLabel" -C 2 --glob "**/*.ts" --glob "**/*.tsx"Repository: vtex/faststore
Length of output: 993
🏁 Script executed:
# Search for usage of submitButtonAriaLabel
rg "submitButtonAriaLabel" -C 2 --glob "**/*.ts" --glob "**/*.tsx"Repository: vtex/faststore
Length of output: 5587
searchButtonAriaLabel and submitButtonAriaLabel both configure the same search button aria-label, creating redundant configuration options.
Both accessibilityLabels.searchButtonAriaLabel (default: "Submit Search") and searchInput.submitButtonAriaLabel (default: "Submit Search") set the aria-label for the same submit button. The component code shows searchButtonAriaLabel is preferred with submitButtonAriaLabel as a fallback, but this dual-path configuration is confusing for CMS users who may not realize they're setting the same property twice.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/core/cms/faststore/schema.json` around lines 2968 - 2983, The schema
exposes two properties that configure the same aria-label
(accessibilityLabels.searchButtonAriaLabel and
searchInput.submitButtonAriaLabel), causing redundant configuration; remove the
duplicate by deleting searchInput.submitButtonAriaLabel from the schema and keep
accessibilityLabels.searchButtonAriaLabel as the single source-of-truth (ensure
its default remains "Submit Search"), and if code still supports the fallback,
add a short deprecation note to searchInput.submitButtonAriaLabel’s schema entry
(or omit it entirely) and update any schema descriptions to state that
accessibilityLabels.searchButtonAriaLabel is preferred.
## What's the purpose of this pull request? Bring `dev` into `main` so the next CD run on `main` cuts and publishes `@faststore/*@4.1.0`. Includes the publish-pipeline fix from #3309, so this is also the first release that exercises the `pnpm -r publish` flow end-to-end (broken `4.0.0` is superseded by `4.1.0` as `latest`). ## What's included since v4.0.0 - #3308 — fix: PLP "Load more products" overwriting list instead of appending - #3306 — feat: user details adjusts — SFS-2950 - #3304 — fix: updates schemas vtex.faststore - #3301 — fix: localization selector stale and reset selection for unsaved changes - `d1e40abe7` — fix: add repository field to diagnostics package for OIDC provenance - #3309 — fix: publish releases with pnpm to resolve workspace and catalog protocols (already on `main`, kept by 3-way merge) ## How CD will behave on merge 1. `lerna version --conventional-commits --conventional-graduate --yes` graduates `4.1.0-dev.1` → `4.1.0`, creates tag `v4.1.0`, and pushes the `[no ci] Release: 4.1.0` commit. 2. `pnpm release:verify` packs every public package and asserts no `workspace:` / `catalog:` literal survives the pack step. 3. `pnpm -r publish --access public --no-git-checks` uploads the 8 public packages with all `workspace:*` / `catalog:` references rewritten to concrete versions. ## Sanity checks already performed locally - `git merge-tree` between `origin/main` and `origin/dev`: clean, no conflicts. - `pnpm install --frozen-lockfile` on the merged tree: no lockfile drift. - `pnpm release:verify` on `release/4.1.0`: all 8 public packages clean at `4.1.0-dev.1` (the same manifests that will be bumped to `4.1.0`). ## Follow-ups (not blocking) - Once `4.1.0` is on `latest`, consider `npm deprecate @faststore/<pkg>@4.0.0 "Broken release: workspace:/catalog: not resolved. Use 4.1.0+"` for `cli`, `core`, `api`, `ui`, `components`, `sdk`, `diagnostics`, `lighthouse`. - Optional: add `workflow_dispatch` to `release.yml` so future hotfix releases without `packages/*` changes can be triggered manually with `--force-publish`. Made with [Cursor](https://cursor.com) --------- Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Matheus P. Silva <[email protected]> Co-authored-by: Leandro Rodrigues <[email protected]> Co-authored-by: vtexgithubbot <[email protected]> Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Luiz Falcão <[email protected]> Co-authored-by: Artur Santiago <[email protected]> Co-authored-by: Sahan Jayawardana <[email protected]> Co-authored-by: Mateus Pontes <[email protected]> Co-authored-by: Matheus Martins <[email protected]> Co-authored-by: renatomaurovtex <[email protected]> Co-authored-by: Leandro Rodrigues <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Arthur Andrade <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Thiago Pereira <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Giuliana Rigaud <[email protected]> Co-authored-by: renato <[email protected]> Co-authored-by: Bruna Santos <[email protected]> Co-authored-by: BrunaCubos <[email protected]> Co-authored-by: Ícaro Oliveira <[email protected]> Co-authored-by: Bruna Santos <[email protected]> Co-authored-by: Everton Ataide <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Otavio Moreira Meirelles <[email protected]> Co-authored-by: Marco Cardoso <[email protected]> Co-authored-by: Gabriel Paladino <[email protected]> Co-authored-by: CodeRabbit <[email protected]>
What's the purpose of this pull request?
Summary by CodeRabbit
Release Notes