Skip to content

fix(rtl): flip arrows, tabs, menus, and layout for right-to-left languages - #3295

Merged
raizasafeel merged 6 commits into
frappe:developfrom
raizasafeel:fix/rtl-directional-icons
Nov 16, 2026
Merged

raizasafeel merged 6 commits into
frappe:developfrom
raizasafeel:fix/rtl-directional-icons

Conversation

@raizasafeel

@raizasafeel raizasafeel commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Makes LMS read and point correctly for Arabic, Hebrew, Persian, and Urdu users, and for sites with the "Right to Left" text direction setting.

Why

  • Right-to-left users saw arrows pointing the wrong way, tabs and menus opening left to right, and layouts with elements on the wrong side.
  • The existing lint gate only catches physical left/right CSS classes, so these problems were not caught.
  • No change for English users.

What changed

  • Arrows and chevrons point the right way: lesson previous/next, back buttons, collapsed chapter chevrons, sidebar collapse icon, log out, external-link and send icons, PDF previous/next.
  • Tabs, menus, and popovers follow the page direction. The app is wrapped in reka-ui's ConfigProvider with the page direction, and EditorJS lesson blocks get the same wrapper. Before this, tabs on Courses, Batches, Programs, Jobs, and Profile, the Settings dialog, and sidebar rows opened left to right.
  • reka-ui is now a declared dependency, using the same version range frappe-ui uses. No lockfile change.
  • frappe-ui parts that hardcode left/right are patched in index.css until frappe-ui fixes them:
    • Toasts appear on the other side so they no longer cover the sidebar.
    • Editor placeholder, sidebar icon/label gap, progress bar fill, list selection banner divider, and keyboard shortcut key order.
    • Select, combobox, and multiselect fields: the value and dropdown arrow sit in the correct place (for example, course Instructors and batch Medium).
  • Centered items (cover image editor, Unsplash picker, profile cover, install prompt) stay centered.
  • Inline lesson notes menu and notification panel open from the correct edge.
  • Audio player's played fill runs the correct way.
  • Tooltips and dropdowns use the inline-end side instead of a hardcoded right.
  • Code editors (programming exercises, settings code field) stay left to right. URLs and image sizes are isolated so they do not scramble inside right-to-left text.

Screenshots

Arabic UI with right-to-left on. Each pair is cropped to the part of the page that changed. Before: develop. After: this PR. Both use develop's existing Arabic translations, so only layout and direction differ.

Sidebar (1)
Screen Before After
Home while the admin's evaluations request is out
Admin pages (6)
Screen Before After
The notifications panel for the student
Settings opened from the user menu, on its first section
Settings, Payment Configuration
Settings, Users
Settings, Progress
Settings, Communication General
Assignments (6)
Screen Before After
Submit pressed with no answer
Create pressed with nothing filled in
All 21 assignment submissions across the four assignments, newest first
A row opened
Enable Scheduling switched on
A student opening /assignments is sent to the course list.
Batch learning (2)
Screen Before After
The ongoing sprint's billing page opened by a student already in it
A student's batch list
Batches (6)
Screen Before After
Create pressed on the empty form
Billing page for the free, upcoming Winter Cohort 2027, opened directly by an admin who is
New Email Template form, opened from the confirmation email field's Create New.
Add Course form, opened from the Courses section in Settings.
Enroll Students form, opened from the dashboard header.
Dashboard tab
Course admin (4)
Screen Before After
The student picker open
Title cleared
The course options menu on the Settings tab
Import Course from ZIP form, with the empty drop zone.
Courses (2)
Screen Before After
The Import menu
New Course form, opened over the list.
Jobs (4)
Screen Before After
Save on the empty New Job form
More actions on the first application
Filtered to Part Time
The job form filled from the Learning Experience Designer job, with Status for an existing
Learning (2)
Screen Before After
Enroll Now pressed signed out
The course details request failed
Profile (2)
Screen Before After
First name cleared and Save pressed
Her availability request failed
Programming Exercises (6)
Screen Before After
Ashley opening her own Passed submission
A Failed Reverse a String submission seen by the admin
All 11 programming exercise submissions across the three exercises, nine Passed and two Fa
Preview
FizzBuzz opened
The code runner script fails to load
Programs (2)
Screen Before After
Create clicked with no title
Add Course to Program, stacked on the new program dialog.
Taking a quiz (1)
Screen Before After
Check pressed with no option chosen
Quizzes (3)
Screen Before After
Submissions filtered to a course with none
The New question dialog, empty, with Save disabled until it is valid.
One quiz selected

Testing

  • Vitest suite passes, including new tests for the direction helpers.
  • 6 failures in setupPage.test.ts. They fail the same way on develop on our bench, because the bench's frappe predates SetupFlow. Not caused by this PR.
  • Semgrep RTL and vue-directives gates are clean.
  • All 13 UI-state flows captured in Arabic RTL and compared against develop.

🤖 Generated with Claude Code

raizasafeel and others added 3 commits November 16, 2026 18:36
Semgrep's tailwind-rtl gate only sees physical utility classes. This covers
what it can't: prev/next and back chevrons, icons passed to frappe-ui as
names (moved to slots), always-directional lucide icons mirrored in
index.css, centred overlays built from start-1/2 -translate-x-1/2, the
inline lesson menu and notification panel positioning, the audio played
fill, and tooltip/dropdown sides through inlineStartSide/inlineEndSide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Wrap the app in reka-ui's ConfigProvider with the document direction.
  Reka stamped dir="ltr" on TabButtons, the Settings dialog tabs and the
  sidebar scroll area, so tabs read left to right, the Settings dialog
  laid out LTR and the sidebar rows kept their icons on the left.
- Port CRM's index.css patches for frappe-ui parts that hardcode a side:
  the TextEditor placeholder, the sidebar item padding and label gap
  (which also offset the collapsed sidebar's bottom icons), and toasts,
  which now sit bottom-left instead of over the sidebar.
- Mirror frappe-ui Progress so it fills from the right, flip the
  ListSelectBanner divider, and keep keyboard shortcuts left to right.
- Force the CodeMirror editors LTR; isolate the YouTube URL input and the
  thumbnail dimensions so they no longer show only their tail or wrap
  around the ×. Batch time ranges take dir="auto": forced LTR, the
  localized "10:00 ص - 11:30 ص" came out scrambled.
- Give the batch dashboard chart's axis labels room for Arabic
  descenders, which echarts clipped into stray commas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
frappe-ui's Select, Combobox and MultiSelect triggers use a physical
text-left for the value and ml-auto for Select's chevron, so in RTL the
value sat at the far end and the chevron right beside it (Instructors,
Medium and every other picker with a value). Patch both from index.css
next to the other frappe-ui RTL fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raizasafeel added a commit to raizasafeel/lms that referenced this pull request Nov 16, 2026
raizasafeel and others added 2 commits November 16, 2026 20:49
frappe-ui's SettingsNavItem stretches the label with a physical left
alignment, so in RTL each label sat at the far edge, away from its icon,
and SettingsSidebar drew its divider on the outer side. Settings.vue tags
the sidebar so index.css can align the label to the start and move the
divider, alongside the other frappe-ui RTL patches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raizasafeel

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] RTL layout changes reach shared LMS controls across student and admin pages.

Appears safe to merge, with one small RTL icon correction.

Reviews (1) · Last reviewed commit: "Merge branch 'develop' into fix/rtl-dire..." · Reviewed by Greptile

Comment thread frontend/src/components/PdfBlock.vue Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raizasafeel
raizasafeel merged commit 3097dc7 into frappe:develop Nov 16, 2026
12 of 13 checks passed
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.

1 participant