Repository navigation
Conversation
…sellers (#1535) * fix(web): the product page shows specs and reviews before prices and sellers The product comes first: after the hero and scoreboard the page reads the spec groups, then the reviews, the price history, and the sellers last. The jump row follows the same order. It stays in the phone's first screen (#1517), as does the price strip with the best price. The unknown-size listings stay with the sellers. The item pages share this view, so they follow too. Closes #1530 * test(web): the section order tests name the new order Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): spec group labels show one language, not both (#1529) The Vietnamese spec group headings carried their English name in brackets and a decorative number ("1. Màn hình (Display)"). Every locale now shows its own label only, without the number: "Màn hình" on vi, "Display & panel" on en. The same pattern is gone from the vi field labels (Vi xử lý, Camera trước), the core-count values (8 nhân), and the catalogue filter, table and about-page labels in vi, en and cs. Acronyms (GPU, ROM, SAR, MSRP), names (DOSafe, JReviews, Official Mall) and units (VND) stay. * fix(web): compare group heads and exports drop numbers; cs labels one language (#1529 review) The compare table's market group no longer reads "0. ...", and the compare CSV and JSON exports use the same localized group heading as the table instead of the numbered English title. The Czech camera, model and filter labels lose their English or count suffixes, en drops its "(master product)" gloss, and "Mạng di động" and "Công nghệ sạc" take sentence case. * test(web): earbud spec headings have no number in the E2E check (#1529) The earbud page E2E still expected "1. Âm thanh" and "2. Pin"; the headings are now "Âm thanh & Đa phương tiện" and "Pin & Công nghệ sạc". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… words (#1534) * fix(web): ratings show as stars with a short count, without the extra words One StarRating component (components/elementary) draws every on-screen rating: five stars filled to the value, the value at one decimal (two where close scores are ranked) and the count in parentheses with the locale's thousands separator. Stars are green from 4.0, orange from 3.0, red below, judged on the printed value (lib/rating-display.ts). Screen readers get one label, "4.6 trên 5 sao, 11.204 đánh giá". Used on the product scoreboard, phone hero line and peer cards, product cards, compare, versus, leaderboard, deals, watchlist, search, inspect, merchant pages and the reviews section. "/ 5.0", "bài kiểm chứng", "chuẩn 10 nhóm", "(có trọng số)" and "(Bayes)" are gone; their meaning stays in tooltips. The lab score reads on 10 everywhere it shows. Score values do not change. Exports keep their fixed form. Closes #1528 * fix(web): star messages reach client pages and compare exports keep their form - starRating joins the shared client message scope, so client trees (compare, leaderboard, reviews and the rest) get the stars' label and empty text instead of the raw key. - The compare CSV and JSON cells keep "Lab x / 5.0" and the old review count text; only the on-screen cells show stars and the lab score on 10. - The versus verdict drops "/5.0". Leaderboard battle cards and each review's stars use StarRating. Criterion scores keep a "/5" marker next to the lab score on 10, and a criterion score of 0 reads "chưa có". - A tooltip's meaning is also a visually hidden sibling, since aria-label wins over title on role="img". * fix(web): a long star rating wraps inside narrow score boxes Checked on the live product page with the component's markup and CSS: at the large size, "4.6 (11.204)" ran past the half-width buyer score box. The stars, value and count now wrap as units. The product page's leaderboard badge drops its "/5.0", and the scale check also covers formatDecimal calls whose locale variable is named otherwise. * fix(web): the compare diff filter reads the lab score as the screen shows it Codex round 2: with lab scores 4.51 and 4.54 the table showed "Lab 9.0/10" and "Lab 9.1/10", but "only differences" compared the export text, which is "Lab 4.5 / 5.0" for both, and hid the row. A row's screenValue now feeds both the cell and the filter; renderValue stays the export text. * fix(web): empty star ratings and thin-data scores meet contrast axe flagged the empty state (muted ink is under 4.5:1 on #f1f5f9 cards) and the buyer score faded to 50% for thin data. The empty state takes the secondary ink and the score is no longer faded; the confidence badge already says the data is thin. The dark surface check also measures the stars' value, count and empty text, so /leaderboard still has text to measure. * Merge remote-tracking branch 'origin/dev' into fix/1528-star-ratings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Promote dev to main.
Merge with a merge commit, never squash (Docs/Resources/RELEASE.md).
📌 TL;DR
This PR refactors the product detail page to prioritize specs and reviews over sellers and price history, introduces a new accessible
StarRatingcomponent to replace verbose text-based scores, and cleans up UI copy by removing redundant bilingual labels and numeric prefixes.🎯 Type of Change
🔍 Changes Walkthrough
apps/web/e2e/category-spec-template.spec.tsapps/web/e2e/dark-hero-contrast.spec.ts.rate-starselements.apps/web/e2e/inspect-copy.spec.ts.rate-starscomponent.apps/web/e2e/item-model/item-product-page.spec.tsapps/web/e2e/product-above-fold.spec.tspdv-user-scoretest ID.apps/web/e2e/product-section-order.spec.tsORDERarray and test title to verify the new sequence: Specs, Reviews, Price History, Sellers.apps/web/e2e/star-rating.spec.tsStarRatingcomponent renders correctly witharia-label, visual fill, and band colors, and ensures verbose text is removed.apps/web/locales/cs.jsonstarRatingtranslation keys.apps/web/locales/en.jsonstarRatingtranslation keys.apps/web/locales/vi.jsonstarRatingtranslation keys.apps/web/package.jsonrating-display.test.tsto the unit test execution chain.apps/web/src/app/[locale]/merchants/[id]/page.tsxStarRatingcomponent for merchant and product ratings.apps/web/src/app/[locale]/page.tsxStarRatingcomponent for "Battle" scores and merchant ratings.apps/web/src/app/[locale]/smartphones/[slug]/page.tsx1. Replaced text-based scores with
StarRating.2. Reordered sections: moved
offers-tableandpdv-price-historyto the bottom, placingspecs-sectionandjreviews-sectionfirst.3. Updated jump navigation links to match the new order.
4. Removed numeric indexing from spec group headings.
📊 Architectural Flow
flowchart TD subgraph ProductDetailPage["Product Detail Page (smartphones/[slug])"] direction TB Hero["Hero / Price Strip"] subgraph JumpNav["Jump Navigation"] direction LR J1["Specs"] J2["Reviews"] J3["History"] J4["Sellers"] end subgraph NewOrder["New Section Order"] direction TB Specs["Specs Section"] Reviews["Reviews Section"] History["Price History"] Sellers["Offers / Sellers Table"] end Hero --> JumpNav JumpNav --> Specs Specs --> Reviews Reviews --> History History --> Sellers end subgraph StarRatingComponent["StarRating Component"] direction TB Input["Value, Count, Size"] Render["Visual Stars + Aria Label"] Input --> Render end Specs -.->|Uses| StarRatingComponent Reviews -.->|Uses| StarRatingComponent Sellers -.->|Uses| StarRatingComponent