Skip to content

fix(addons): flip collapsed group chevron in RTL - #1137

Merged
khaira777 merged 5 commits into
mainfrom
fm/flocafe-issue-1099-r1
Oct 14, 2026
Merged

khaira777 merged 5 commits into
mainfrom
fm/flocafe-issue-1099-r1

Conversation

@khaira777

@khaira777 khaira777 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 existing rtl-flip utility class to the collapsed ChevronRight icon so it mirrors properly in RTL locales. Deliver via the no-mistakes pipeline as its own PR with Fixes #1099 in the PR summary.

What Changed

  • Add the rtl-flip utility class to the collapsed ChevronRight icon in frontend/src/app/(dashboard)/addon-groups/page.tsx so it mirrors horizontally in RTL locales.
  • Add rendered RTL regression assertions in tests/rtl-dashboard-pos-common.test.ts verifying that AddonGroupsPage renders ChevronRight with rtl-flip when collapsed and toggles to ChevronDown without rtl-flip when 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 Playwright frontend/e2e/rtl-dashboard-pos-common.spec.ts browser suite, and a live Playwright Chromium verification against an isolated tests/e2e-server.cjs instance with a seeded Add-On Group; confirmed that the collapsed ChevronRight carries rtl-flip and computes matrix(-1, 0, 0, 1, 0, 0) in RTL (fa), swaps to an un-flipped ChevronDown (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.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
In an RTL locale (Persian fa), viewing the Add-On Groups page with a collapsed group mirrors the header ChevronRight icon horizontally via rtl-flip (transform: matrix(-1, 0, 0, 1, 0, 0)) ✅ pass live ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-collapsed-rtl-fa.png and ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-rtl-liv…
In an RTL locale (Persian fa), clicking the Add-On Group header toggles between collapsed ChevronRight (with rtl-flip) and expanded ChevronDown (without rtl-flip, transform: none) and back… ✅ pass live ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-expanded-rtl-fa.png and ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-rtl-live…
Adversarial / LTR boundary check: in an LTR locale (English en), the collapsed Add-On Group ChevronRight carrying rtl-flip does not flip (transform: none) because [dir="rtl"] .rtl-flip is sc… ✅ pass live ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-collapsed-ltr-en.png and ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-rtl-liv…

Add-On Groups collapsed header in RTL (Persian fa) showing mirrored ChevronRight (rtl-flip, matrix(-1, 0, 0, 1, 0, 0))
Add-On Groups expanded header in RTL (Persian fa) showing un-flipped ChevronDown (transform: none) and expanded add-on items
Add-On Groups collapsed header in LTR (English en) showing un-flipped right-pointing ChevronRight (transform: none)

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" } }

{
  "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.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
In an RTL locale (Persian fa), viewing the Add-On Groups page with a collapsed group mirrors the header ChevronRight icon horizontally via rtl-flip (transform: matrix(-1, 0, 0, 1, 0, 0)) ✅ pass live ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-collapsed-rtl-fa.png and ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-rtl-liv…
In an RTL locale (Persian fa), clicking the Add-On Group header toggles between collapsed ChevronRight (with rtl-flip) and expanded ChevronDown (without rtl-flip, transform: none) and back… ✅ pass live ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-expanded-rtl-fa.png and ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-rtl-live…
Adversarial / LTR boundary check: in an LTR locale (English en), the collapsed Add-On Group ChevronRight carrying rtl-flip does not flip (transform: none) because [dir="rtl"] .rtl-flip is sc… ✅ pass live ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-collapsed-ltr-en.png and ~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG/addon-groups-rtl-liv…
  • npm run test:rtl-dashboard-pos-common
  • EVIDENCE_DIR=~/.no-mistakes/evidence/01M4W1QEJRD9ZKF2ESNJZ6RDTG npx --prefix frontend playwright test --config=frontend/playwright.config.ts frontend/e2e/rtl-dashboard-pos-common.spec.ts
  • Live 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.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ef245ec1-f07d-4c76-8cea-ff632af026d3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@khaira777

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Adds RTL styling to a collapsed chevron icon.

The PR appears safe to merge, with a non-blocking test-maintenance concern.

Findings

  1. P2 Unrelated changes break this test ▶

Summary

Adds rtl-flip to the collapsed Add-On Groups chevron while leaving the expanded chevron unchanged.

  • Collapsed Add-On Group arrows mirror in right-to-left locales.

Reviews (1) · Last reviewed commit: "no-mistakes(document): docs: verify docu..." · Reviewed by Greptile

Comment thread tests/rtl-dashboard-pos-common.test.ts Resolved
khaira777 added a commit that referenced this pull request Oct 14, 2026
…*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)
@khaira777 khaira777 changed the title fix(frontend): flip collapsed Add-On Groups chevron in RTL fix(addons): flip collapsed group chevron in RTL Oct 14, 2026
khaira777 added a commit that referenced this pull request Oct 14, 2026
…*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)
@khaira777
khaira777 force-pushed the fm/flocafe-issue-1099-r1 branch from a2fc203 to 11e3663 Compare October 14, 2026 02:05
@khaira777 khaira777 changed the title fix(addons): flip collapsed group chevron in RTL fix(frontend): flip collapsed Add-On Groups chevron in RTL locales Oct 14, 2026
@khaira777 khaira777 changed the title fix(frontend): flip collapsed Add-On Groups chevron in RTL locales fix(rtl): flip collapsed chevron in addon-groups Oct 14, 2026
@khaira777 khaira777 changed the title fix(rtl): flip collapsed chevron in addon-groups fix(addons): flip collapsed group chevron in RTL Oct 14, 2026
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
…*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)
@khaira777
khaira777 force-pushed the fm/flocafe-issue-1099-r1 branch from 11e3663 to 52bf566 Compare October 14, 2026 02:18
@khaira777
khaira777 enabled auto-merge (squash) October 14, 2026 02:18
@khaira777
khaira777 merged commit bf3928f into main Oct 14, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/flocafe-issue-1099-r1 branch October 14, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(i18n): apply rtl-flip class to addon groups accordion chevron in RTL locales

1 participant