Repository navigation
fix(addons): flip collapsed group chevron in RTL - #1137
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
@greptile review |
|
…*Invariant & Root Cause**: - `ci-1` (`Lint & Build Validation (Linux)`): Every changed repository file checked by `scripts/ci/check-changed-format.cjs` must conform to the project's `oxfmt` formatting standard. `tests/rtl-dashboard-pos-common.test.ts` (modified in this PR) failed `oxfmt --check`, while `frontend/src/app/(dashboard)/addon-groups/page.tsx` already passed. - `ci-2` (`Required Checks Gate`): Every upstream required CI job must succeed; it failed solely because `Lint & Build Validation (Linux)` exited with code 1. 2. **Fix**: - Formatted [tests/rtl-dashboard-pos-common.test.ts](file:///Users/gurkiratkhaira/.no-mistakes/worktrees/de2296f2e6f8/01M4VSMCFMZDTY0BEZ0SGET8X1/tests/rtl-dashboard-pos-common.test.ts) using `npx oxfmt --write -- tests/rtl-dashboard-pos-common.test.ts`. 3. **Verification**: - `node scripts/ci/check-changed-format.cjs --base 285dd32` (passed) - `npm run lint` (passed) - `npm run lint:budget` (passed) - `npm run test:rtl-dashboard-pos-common` (passed) - `npm run build:frontend` (passed) - `git diff --check` (passed)
…*Invariant & Root Cause**: - `ci-1` (`Lint & Build Validation (Linux)`): Every changed repository file checked by `scripts/ci/check-changed-format.cjs` must conform to the project's `oxfmt` formatting standard. `tests/rtl-dashboard-pos-common.test.ts` (modified in this PR) failed `oxfmt --check`, while `frontend/src/app/(dashboard)/addon-groups/page.tsx` already passed. - `ci-2` (`Required Checks Gate`): Every upstream required CI job must succeed; it failed solely because `Lint & Build Validation (Linux)` exited with code 1. 2. **Fix**: - Formatted [tests/rtl-dashboard-pos-common.test.ts](file:///Users/gurkiratkhaira/.no-mistakes/worktrees/de2296f2e6f8/01M4VSMCFMZDTY0BEZ0SGET8X1/tests/rtl-dashboard-pos-common.test.ts) using `npx oxfmt --write -- tests/rtl-dashboard-pos-common.test.ts`. 3. **Verification**: - `node scripts/ci/check-changed-format.cjs --base 285dd32` (passed) - `npm run lint` (passed) - `npm run lint:budget` (passed) - `npm run test:rtl-dashboard-pos-common` (passed) - `npm run build:frontend` (passed) - `git diff --check` (passed)
a2fc203 to
11e3663
Compare
Add the shared rtl-flip utility class to the collapsed ChevronRight icon on the Add-On Groups page and cover the page in the RTL dashboard/POS regression suite. Fixes #1099
…hevron RTL flip assertions"}
…*Invariant & Root Cause**: - `ci-1` (`Lint & Build Validation (Linux)`): Every changed repository file checked by `scripts/ci/check-changed-format.cjs` must conform to the project's `oxfmt` formatting standard. `tests/rtl-dashboard-pos-common.test.ts` (modified in this PR) failed `oxfmt --check`, while `frontend/src/app/(dashboard)/addon-groups/page.tsx` already passed. - `ci-2` (`Required Checks Gate`): Every upstream required CI job must succeed; it failed solely because `Lint & Build Validation (Linux)` exited with code 1. 2. **Fix**: - Formatted [tests/rtl-dashboard-pos-common.test.ts](file:///Users/gurkiratkhaira/.no-mistakes/worktrees/de2296f2e6f8/01M4VSMCFMZDTY0BEZ0SGET8X1/tests/rtl-dashboard-pos-common.test.ts) using `npx oxfmt --write -- tests/rtl-dashboard-pos-common.test.ts`. 3. **Verification**: - `node scripts/ci/check-changed-format.cjs --base 285dd32` (passed) - `npm run lint` (passed) - `npm run lint:budget` (passed) - `npm run test:rtl-dashboard-pos-common` (passed) - `npm run build:frontend` (passed) - `git diff --check` (passed)
11e3663 to
52bf566
Compare
Fixes #1099
Intent
Verify and implement the surgical fix for FreeOpenSourcePOS/FloCafe issue #1099 ("Add-On Groups collapsed ChevronRight icon does not flip in RTL"): in
frontend/src/app/(dashboard)/addon-groups/page.tsx, add the existingrtl-fliputility class to the collapsedChevronRighticon so it mirrors properly in RTL locales. Deliver via theno-mistakespipeline as its own PR withFixes #1099in the PR summary.What Changed
rtl-fliputility class to the collapsedChevronRighticon infrontend/src/app/(dashboard)/addon-groups/page.tsxso it mirrors horizontally in RTL locales.tests/rtl-dashboard-pos-common.test.tsverifying thatAddonGroupsPagerendersChevronRightwithrtl-flipwhen collapsed and toggles toChevronDownwithoutrtl-flipwhen expanded.Fixes #1099
Risk Assessment
✅ Low: The change surgically adds the shared rtl-flip class to the collapsed ChevronRight icon in AddonGroupsPage and covers the collapsed/expanded toggle behavior with executable rendering assertions.
Testing
Ran
npm run test:rtl-dashboard-pos-common, the Playwrightfrontend/e2e/rtl-dashboard-pos-common.spec.tsbrowser suite, and a live Playwright Chromium verification against an isolatedtests/e2e-server.cjsinstance with a seeded Add-On Group; confirmed that the collapsedChevronRightcarriesrtl-flipand computesmatrix(-1, 0, 0, 1, 0, 0)in RTL (fa), swaps to an un-flippedChevronDown(transform: none) when expanded and back when re-collapsed, and stays un-flipped (transform: none) in LTR (en), with visual screenshots saved to the evidence directory.fa), viewing the Add-On Groups page with a collapsed group mirrors the header ChevronRight icon horizontally viartl-flip(transform: matrix(-1, 0, 0, 1, 0, 0))fa), clicking the Add-On Group header toggles between collapsedChevronRight(withrtl-flip) and expandedChevronDown(withoutrtl-flip,transform: none) and back…en), the collapsed Add-On GroupChevronRightcarryingrtl-flipdoes not flip (transform: none) because[dir="rtl"] .rtl-flipis sc…Evidence: Live browser DOM and computed CSS transform probe across RTL collapsed, RTL expanded, RTL re-collapsed, and LTR collapsed states
{ "createGroupRes": { "status": 201, "groupId": "35164061-5148-4621-8b22-6243a723cbda" }, "rtlCollapsed": { "htmlDir": "rtl", "className": "lucide lucide-chevron-right text-gray-400 rtl-flip", "transform": "matrix(-1, 0, 0, 1, 0, 0)", "hasDown": false }, "rtlExpanded": { "htmlDir": "rtl", "className": "lucide lucide-chevron-down text-gray-400", "transform": "none", "hasRight": false }, "rtlRecollapsed": { "className": "lucide lucide-chevron-right text-gray-400 rtl-flip", "transform": "matrix(-1, 0, 0, 1, 0, 0)", "hasDown": false }, "ltrCollapsed": { "htmlDir": "ltr", "className": "lucide lucide-chevron-right text-gray-400 rtl-flip", "transform": "none" } }Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
fa), viewing the Add-On Groups page with a collapsed group mirrors the header ChevronRight icon horizontally viartl-flip(transform: matrix(-1, 0, 0, 1, 0, 0))fa), clicking the Add-On Group header toggles between collapsedChevronRight(withrtl-flip) and expandedChevronDown(withoutrtl-flip,transform: none) and back…en), the collapsed Add-On GroupChevronRightcarryingrtl-flipdoes not flip (transform: none) because[dir="rtl"] .rtl-flipis sc…npm run test:rtl-dashboard-pos-commonEVIDENCE_DIR=~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG npx --prefix frontend playwright test --config=frontend/playwright.config.ts frontend/e2e/rtl-dashboard-pos-common.spec.tsLive Playwright Chromium verification against isolated tests/e2e-server.cjs seeding an Add-On Group via POST /api/addon-groups and verifying collapsed/expanded/re-collapsed ChevronRight and ChevronDown DOM classes, computed CSS transforms, and screenshots in fa (RTL) and en (LTR)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.