Skip to content

RTL support for guide website theme#450

Open
Raghaddahi wants to merge 11 commits into
mainfrom
feature/rtl-support
Open

RTL support for guide website theme#450
Raghaddahi wants to merge 11 commits into
mainfrom
feature/rtl-support

Conversation

@Raghaddahi

@Raghaddahi Raghaddahi commented Jun 29, 2026

Copy link
Copy Markdown
Member

Fixes #447

Description

Adds RTL support to the User Guide theme, so pages render correctly under an RTL active translation (e.g. ar). The theme was hard-wired to LTR.

Four groups of changes:

  • Page direction: base.html derives dir from the active translation via get_current_language_bidi
  • Mixed Arabic/English content: dir="auto" on page titles, headings, navigation, search results, footer blocks, alerts, prev/next labels and bylines, so the browser picks the direction per string. Becomes visible once real Arabic translations land (current .po files are stubs).
  • Flipping directional icons: prev/next arrow, TOC arrow, and section explanation/tutorial icons mirrored via [dir='rtl'] transforms using a new svg_icon--flip-rtl opt-in class — avoids separate RTL SVG assets.
  • Logo and burger placement: logical inset properties so buttons anchor to the right corner; RTL-scoped grid overrides reposition the logo right at the large breakpoint without changing LTR. Mobile menu overlay switched absolute→fixed so it stops clipping when scrolled.

Areas needing careful review

  • header.scss: confirm logo mirrors right in RTL and LTR is unchanged.
  • tutorial.svg: its "1 2 3" digits share the path with the list bars, so scaleX(-1) mirrors the digits backward.

Testing

Each item below shows the RTL bug before this PR, and the fix after.

1. Logo cropped on mobile

Before:
logo cropped on mobile before fix

After:
logo showing correctly on mobile after fix

2. Logo alignment (desktop)

Before:
logo misaligned before fix

After:
logo aligned after fix

3. Mobile menu overlay

Before:
mobile menu overlay before fix

After:
mobile menu overlay after fix

4. Results count

Before:
results count before fix

After:
results count after fix

5. Flipped icons

Before:
flipped icons before fix, view 1
flipped icons before fix, view 2

After:
flipped icons after fix, view 1
flipped icons after fix, view 2

6. Feedback message

Before:
feedback message before fix

After:
feedback message after fix

7. Burger and search position

Before:
burger and search position before fix

After:
burger and search position after fix

8. dir="auto" to support mixed-language content

Before:
mixed language content before dir=auto fix

After:
mixed language content after dir=auto fix

AI usage

AI assisted with the PR description and portions of the SCSS code (model: GLM 5.2, via opencode). Reviewed and tested by me

@Raghaddahi Raghaddahi moved this to 🔍 Reviewing in GSoC 2026: Guide website revamp Jul 1, 2026
@Raghaddahi Raghaddahi changed the title Feature/rtl support RTL support for guide website theme Jul 1, 2026
@Raghaddahi Raghaddahi marked this pull request as ready for review July 1, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔍 Reviewing

Development

Successfully merging this pull request may close these issues.

RTL support for guide website theme

1 participant