Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
Co-authored-by: MrHinsh <5205575+MrHinsh@users.noreply.github.com>
Co-authored-by: MrHinsh <5205575+MrHinsh@users.noreply.github.com>
Co-authored-by: MrHinsh <5205575+MrHinsh@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request adds RTL (Right-to-Left) language support for Persian content, addressing display issues where Persian text and UI elements were rendering incorrectly due to missing RTL configuration and CSS rules.
Changes:
- Added Persian language configuration with
languageDirection: rtlproperty in Hugo configuration - Implemented comprehensive RTL CSS overrides for dropdowns, breadcrumbs, timelines, Bootstrap utilities, and layout components
- Removed duplicate
.me-2RTL rule and consolidated utility class overrides into an organized section
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| site/hugo.yaml | Added Persian (fa) language configuration with RTL direction, weight, title, description, and keywords |
| module/assets/css/style.css | Added extensive RTL CSS rules using [dir="rtl"] selectors to mirror layout components; removed duplicate .me-2 rule; added RTL overrides for dropdowns, breadcrumbs, timelines, Bootstrap utilities, text alignment, floats, borders, and avatar overlays |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [dir="rtl"] .dropdown-submenu .dropdown-menu { | ||
| padding-right: 1.5rem; | ||
| padding-left: 0; | ||
| } |
There was a problem hiding this comment.
Missing RTL overrides for responsive timeline styles. The LTR responsive styles need RTL equivalents:
- Line 577:
.timeline-iconhasmargin-right: 0 !importantwhich needs an RTL version settingmargin-left: 0 !importantandmargin-right: 10pxor similar - Line 580-582:
.timeline-connectorhasmargin-left: 20pxwhich needs an RTL version withmargin-right: 20pxinstead
These missing overrides could cause misalignment of timeline elements in RTL mobile views.
| } | |
| } | |
| /* RTL overrides for timeline elements on mobile */ | |
| [dir="rtl"] .timeline-icon { | |
| margin-left: 0 !important; | |
| margin-right: 10px; | |
| } | |
| [dir="rtl"] .timeline-connector { | |
| margin-right: 20px; | |
| margin-left: 0; | |
| } |
There was a problem hiding this comment.
Added the missing RTL overrides for responsive timeline elements in commit caff582. The values (10px, 20px) mirror the existing LTR responsive styles at lines 587 and 592.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf7599573b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [dir="rtl"] .border-start { | ||
| border-left: 0 !important; | ||
| border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; | ||
| } |
There was a problem hiding this comment.
Preserve border color utilities in RTL borders
This RTL override hardcodes the border color to var(--bs-border-color) with !important, which overrides Bootstrap’s border-* color utilities that set border-color, so components like border-start border-primary (used in multiple guide cards) will render with the default gray border when dir="rtl" is active. This shows up only in RTL pages and only on elements that rely on colored border utilities; consider reusing the existing border-color (or only swapping sides without resetting the color) so the intended border-primary/border-warning colors are preserved.
Useful? React with 👍 / 👎.
|
@copilot tehre shoudl be no hard coding of anything that is not also hard coded in teh rest of the CSS. Can you validate this and see if this implemntation is good? |
Co-authored-by: MrHinsh <5205575+MrHinsh@users.noreply.github.com>
Validated the implementation - all RTL values are mirrored from existing LTR CSS, with no arbitrary hardcoding:
All RTL rules use |
Co-authored-by: MrHinsh <5205575+MrHinsh@users.noreply.github.com>
Co-authored-by: MrHinsh <5205575+MrHinsh@users.noreply.github.com>
RTL (Right-to-Left) Language Support Implementation - COMPLETED ✅
languageDirection: rtlin site/hugo.yamlSummary
This PR successfully implements comprehensive RTL language support for the Hugo Guides Module, enabling proper display of Persian and other RTL language content.
Key Changes:
languageDirection: rtlin site/hugo.yaml[dir="rtl"]selectors, ensuring LTR languages are unaffectedTechnical Details:
.Site.Language.LanguageDirectionto set thedirattributeOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.