Skip to content

Fix RTL language support in DevPortal#1362

Open
vinupa wants to merge 10 commits into
wso2:mainfrom
vinupa:rtl-arabic-support
Open

Fix RTL language support in DevPortal#1362
vinupa wants to merge 10 commits into
wso2:mainfrom
vinupa:rtl-arabic-support

Conversation

@vinupa
Copy link
Copy Markdown

@vinupa vinupa commented Jun 2, 2026

Purpose

This PR fixes RTL (Right-to-Left) language support in the DevPortal, enabling Arabic and other RTL languages to display correctly across all major sections of the portal.

Approach

  • Added stylis and stylis-plugin-rtl dependencies and wrapped the application in an Emotion CacheProvider at the root that switches between RTL and LTR style cache based on theme.direction. This enables automatic CSS property mirroring for MUI components throughout the app without component-level changes.

  • Migrated physical CSS properties to CSS logical properties across the API listing, API details, documents, key management, and chat sections so that spacing and positioning respond correctly to the active text direction. For example:

- paddingLeft: theme.spacing(3)
+ paddingInlineStart: theme.spacing(3)
 
- left: 0
+ insetInlineStart: 0
  • Fixed text encoding issue in userTheme.jsp which caused Unicode characters (such as Arabic strings) defined in userTheme.json to be garbled before they reached the frontend.
- response.setContentType("application/javascript");
+ response.setContentType("application/javascript; charset=UTF-8");
  • Applied dir='ltr' to content that must always render left-to-right regardless of the page direction.

  • Fixed directional icons that would be semantically incorrect in RTL. Breadcrumb separators now use reversed arrow icons in RTL, the AI chat window resize handle and slide-in direction are flipped, and the floating chat button tooltip placement is mirrored.

  • Fixed the API homepage left menu's collapsed/expanded arrow icons and the rotated sidebar text to render correctly in both directions.

  • Added MUIDataTableToolbar RTL cache support (CacheProvider) to the API listing and recommendations table views to prevent toolbar icon misalignment in RTL mode.

  • Added Arabic (ar) locale translations to ar.json.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Emotion RTL/LTR caching and dependencies, converts many components and CSS to logical inline properties, forces LTR where required in embedded consoles and code/token blocks, adjusts tooltip/popover placements for RTL, and expands Arabic localization strings.

Changes

RTL/LTR Support Across Developer Portal

Layer / File(s) Summary
Core RTL Infrastructure & Dependencies
portals/devportal/src/main/webapp/package.json, portals/devportal/src/main/webapp/services/settings/userTheme.jsp, portals/devportal/src/main/webapp/source/src/DevPortal.jsx
Adds stylis and stylis-plugin-rtl dependencies; updates userTheme Content-Type charset; creates RTL and LTR Emotion caches and selects cache based on theme.direction.
Page Layout & Sidebar Structure
source/src/app/components/Apis/Details/index.jsx
Replaces left/right CSS with logical inline properties for drawer, sidebar, content, accordion; sidebar toggle icons become direction-aware; DetailsLegacy.propTypes.theme tightened to include direction.
Listing & Navigation Layout
source/src/app/components/Apis/Listing/CommonListing.jsx, source/src/app/components/Shared/LeftMenuItem.jsx
Listing and left-menu components switch to logical padding/insets; rotated/slider elements and expand/collapse icons respond to theme.direction.
Table Components with Emotion RTL Caching
source/src/app/components/Apis/Listing/ApiTableView.jsx, source/src/app/components/Apis/Listing/Recommendations.jsx
ApiTableView/Recommendations create RTL/LTR Emotion caches, wrap tables in CacheProvider, update MUI theme overrides to use logical inline properties, and set table elevation to 0.
Console & Document Views (force LTR where needed)
source/src/app/components/Apis/Details/ApiConsole/*, AsyncApiConsole/*, GraphQLConsole/*, Documents/*, site/public/css/*
SwaggerUI/AsyncAPI/GraphQL wrappers set dir="ltr"; document viewer/list/view components use inline logical spacing; Stoplight Elements children forced to LTR via CSS override; markdown CSS updated to logical properties.
Breadcrumbs & Navigation Icons
source/src/app/components/Apis/Details/Breadcrumb.jsx, source/src/app/components/Apis/Listing/ApiBreadcrumbs.jsx
Breadcrumb separators render RTL/LTR-appropriate icons based on theme.direction and use logical inline padding.
Chat Components with RTL Positioning
source/src/app/components/Apis/Chat/ChatIcon.jsx, source/src/app/components/Apis/Chat/ChatWindow.jsx
Chat open/close fabs and window use insetInlineEnd, RTL-aware tooltip placements, flipped resize handles and flex direction based on theme.direction.
API Card & Thumbnail Display
source/src/app/components/Apis/Listing/APICards/ApiThumbClassic.jsx, source/src/app/components/Apis/Listing/APICardView.jsx
Card styling and ribbon/popover origins use logical inline properties; metadata tooltips forced LTR; stacked responsive overflow hidden in RTL.
Form Elements, Tokens & Language Selector
source/src/app/components/Base/Header/LanuageSelector.jsx, source/src/app/components/Shared/AppsAndKeys/*, source/src/app/components/Applications/Details/index.jsx
Language selector menu and form/token displays use paddingInlineStart and explicit dir="ltr" for token/curl blocks; small title spacing fixes applied.
Global CSS & Localization
site/public/css/main.css, site/public/locales/ar.json, source/src/app/components/Apis/Details/Documents/elements.css
Markdown CSS uses logical properties; APIM elements CSS uses padding-inline-end and adds RTL-only override; Arabic locale file expanded with many portal strings (chat, consoles, keys, secrets, session, etc.).

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 69.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change—enabling RTL language support in the DevPortal, which is the primary objective of this multi-file PR.
Description check ✅ Passed The description is well-structured and directly related to the changeset. It explains the purpose, approach, and specific fixes applied across multiple sections, all of which are present in the modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx (1)

214-214: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Use deep merge for consistent theme merging.

This line uses Object.assign() (shallow merge), while ApiTableView.jsx uses lodash merge() (deep merge) for the same pattern. Shallow merging can cause nested theme properties in Configurations to completely replace corresponding nested objects in muiTheme and themeAdditions, rather than merging them. This inconsistency may lead to theme override bugs.

♻️ Align with ApiTableView's deep merge pattern
+import merge from 'lodash.merge';
+import cloneDeep from 'lodash.clonedeep';

Then update the theme construction:

-        muiTheme = Object.assign(muiTheme, themeAdditions, Configurations);
+        const systemTheme = merge({}, muiTheme, themeAdditions, Configurations);
-        return createTheme(adaptV4Theme(muiTheme));
+        return createTheme(adaptV4Theme(systemTheme));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx`
at line 214, The line using Object.assign to combine muiTheme, themeAdditions,
and Configurations performs a shallow merge and can overwrite nested theme
objects; replace this with a deep merge (the same pattern used in
ApiTableView.jsx) using lodash.merge (or equivalent deep-merge utility) to merge
muiTheme, themeAdditions, and Configurations so nested properties are merged
rather than replaced—update the usage near the variable muiTheme assignment in
Recommendations.jsx to call merge(muiTheme, themeAdditions, Configurations)
(ensure lodash.merge is imported if not already).
portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/GraphQLConsole/GraphQLConsole.jsx (1)

52-76: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Incomplete RTL migration: Convert remaining physical CSS properties to logical properties.

The styled component still contains physical directional properties that should be migrated to logical properties for complete RTL support:

  • Line 53: marginRight: 10 should be marginInlineEnd: 10
  • Line 64: paddingRight: theme.spacing(2) should be paddingInlineEnd: theme.spacing(2)
  • Line 73: marginLeft: theme.spacing(2) should be marginInlineStart: theme.spacing(2)
♻️ Proposed fix to complete the RTL migration
 [`& .${classes.buttonIcon}`]: {
-    marginRight: 10,
+    marginInlineEnd: 10,
 },

 [`& .${classes.grid}`]: {
     marginTop: theme.spacing(4),
     marginBottom: theme.spacing(4),
-    paddingRight: theme.spacing(2),
+    paddingInlineEnd: theme.spacing(2),
     justifyContent: 'center',
 },

 [`& .${classes.titleSub}`]: {
-    marginLeft: theme.spacing(2),
+    marginInlineStart: theme.spacing(2),
     paddingTop: theme.spacing(2),
     paddingBottom: theme.spacing(2),
 },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/GraphQLConsole/GraphQLConsole.jsx`
around lines 52 - 76, The styled component still uses physical directional CSS;
update the properties in the rules for classes.buttonIcon, classes.grid, and
classes.titleSub to logical equivalents: replace marginRight (in the
classes.buttonIcon rule) with marginInlineEnd, replace paddingRight (in the
classes.grid rule) with paddingInlineEnd, and replace marginLeft (in the
classes.titleSub rule) with marginInlineStart so RTL layouts are supported; keep
values (10 and theme.spacing(...)) unchanged and leave classes.paper and
classes.userNotificationPaper rules as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/elements.css`:
- Line 3: The remaining inner gutter uses a physical property; locate the
.sl-elements rule that currently sets padding-right: 65px and replace that
physical padding with the logical equivalent (use padding-inline-end: 65px) so
the inner gutter follows RTL/LTR flows; remove the hard-coded padding-right or
keep it only as a fallback if you need legacy support.
- Around line 12832-12834: The current rule forcing LTR on [dir="rtl"]
.sl-elements-api > div is too broad and flips all descendants; remove that
selector and instead apply direction: ltr only to the code/example surfaces
(e.g. target selectors like .sl-elements-api pre, .sl-elements-api code,
.sl-elements-api .example, .sl-elements-api .request, .sl-elements-api
.response, .sl-elements-api .console or whichever classes render code/JSON/URLs)
under [dir="rtl"]; update the stylesheet so .sl-elements-api > div no longer
sets direction and the narrower selectors set direction: ltr to preserve RTL
prose/headings/tables while keeping code blocks LTR.

---

Outside diff comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/GraphQLConsole/GraphQLConsole.jsx`:
- Around line 52-76: The styled component still uses physical directional CSS;
update the properties in the rules for classes.buttonIcon, classes.grid, and
classes.titleSub to logical equivalents: replace marginRight (in the
classes.buttonIcon rule) with marginInlineEnd, replace paddingRight (in the
classes.grid rule) with paddingInlineEnd, and replace marginLeft (in the
classes.titleSub rule) with marginInlineStart so RTL layouts are supported; keep
values (10 and theme.spacing(...)) unchanged and leave classes.paper and
classes.userNotificationPaper rules as-is.

In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx`:
- Line 214: The line using Object.assign to combine muiTheme, themeAdditions,
and Configurations performs a shallow merge and can overwrite nested theme
objects; replace this with a deep merge (the same pattern used in
ApiTableView.jsx) using lodash.merge (or equivalent deep-merge utility) to merge
muiTheme, themeAdditions, and Configurations so nested properties are merged
rather than replaced—update the usage near the variable muiTheme assignment in
Recommendations.jsx to call merge(muiTheme, themeAdditions, Configurations)
(ensure lodash.merge is imported if not already).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: df217633-691e-46f1-a65c-c4996eb17f95

📥 Commits

Reviewing files that changed from the base of the PR and between 58bf129 and 84a4ea8.

⛔ Files ignored due to path filters (1)
  • portals/devportal/src/main/webapp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (31)
  • portals/devportal/src/main/webapp/package.json
  • portals/devportal/src/main/webapp/services/settings/userTheme.jsp
  • portals/devportal/src/main/webapp/site/public/css/main.css
  • portals/devportal/src/main/webapp/site/public/locales/ar.json
  • portals/devportal/src/main/webapp/source/src/DevPortal.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatIcon.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatWindow.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/AsyncApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Breadcrumb.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Comments/Comment.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Details.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/DocList.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/elements.css
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/GraphQLConsole/GraphQLConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICardView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICards/ApiThumbClassic.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiBreadcrumbs.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiTableView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Base/Header/LanuageSelector.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ApiKeyManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/LeftMenuItem.jsx

@vinupa vinupa force-pushed the rtl-arabic-support branch from 84a4ea8 to 1d6be8b Compare June 2, 2026 09:38
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/AsyncApiConsole.jsx (1)

50-71: ⚡ Quick win

Consider migrating to logical CSS properties for RTL consistency.

While the dir='ltr' addition is correct for the console content, the styles for titleSub (line 67) still use the physical property marginLeft. In contrast, GraphQLConsole.jsx was updated to use marginInlineStart for the same class. Since the title Typography (line 255) is outside the dir='ltr' Paper, it should respond to the global direction setting.

This creates a visual inconsistency in RTL mode where GraphQL console titles will mirror correctly but AsyncAPI console titles will not.

♻️ Suggested migration to logical properties
 [`& .${classes.titleSub}`]: {
-    marginLeft: theme.spacing(2),
+    marginInlineStart: theme.spacing(2),
     paddingTop: theme.spacing(2),
     paddingBottom: theme.spacing(2),
 },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/AsyncApiConsole.jsx`
around lines 50 - 71, The styles use the physical property marginLeft in the
classes.titleSub rule which breaks RTL mirroring (unlike GraphQLConsole.jsx
which uses marginInlineStart); update the AsyncApiConsole styles to replace
marginLeft with the logical property marginInlineStart for classes.titleSub so
the title Typography (outside the dir='ltr' Paper) respects global text
direction; search for classes.titleSub and change marginLeft ->
marginInlineStart, keeping the same theme.spacing(...) value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Base/Header/LanuageSelector.jsx`:
- Around line 60-62: The closed Select uses a physical textIndent which won't
mirror in RTL, causing inconsistent spacing vs the opened menu that uses
paddingInlineStart; update the style for classes.langText in LanuageSelector.jsx
to replace textIndent with paddingInlineStart (using theme.spacing(1)) so both
the closed Select (classes.langText) and the opened menu use the logical inline
padding and behave consistently in RTL; ensure you remove textIndent and apply
the same spacing value to paddingInlineStart.

---

Nitpick comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/AsyncApiConsole.jsx`:
- Around line 50-71: The styles use the physical property marginLeft in the
classes.titleSub rule which breaks RTL mirroring (unlike GraphQLConsole.jsx
which uses marginInlineStart); update the AsyncApiConsole styles to replace
marginLeft with the logical property marginInlineStart for classes.titleSub so
the title Typography (outside the dir='ltr' Paper) respects global text
direction; search for classes.titleSub and change marginLeft ->
marginInlineStart, keeping the same theme.spacing(...) value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e16ad60a-c8da-4f23-87f4-edaac4b8a029

📥 Commits

Reviewing files that changed from the base of the PR and between 84a4ea8 and 1d6be8b.

📒 Files selected for processing (28)
  • portals/devportal/src/main/webapp/site/public/css/main.css
  • portals/devportal/src/main/webapp/site/public/locales/ar.json
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatIcon.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatWindow.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/AsyncApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Breadcrumb.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Comments/Comment.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Details.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/DocList.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/elements.css
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/GraphQLConsole/GraphQLConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICardView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICards/ApiThumbClassic.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiBreadcrumbs.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiTableView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Base/Header/LanuageSelector.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ApiKeyManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/LeftMenuItem.jsx
✅ Files skipped from review due to trivial changes (5)
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ApiKeyManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICardView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx
🚧 Files skipped from review as they are similar to previous changes (20)
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Comments/Comment.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx
  • portals/devportal/src/main/webapp/site/public/css/main.css
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiBreadcrumbs.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Details.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/elements.css
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatIcon.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatWindow.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/LeftMenuItem.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/DocList.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Breadcrumb.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiTableView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICards/ApiThumbClassic.jsx
  • portals/devportal/src/main/webapp/site/public/locales/ar.json
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx

@vinupa vinupa force-pushed the rtl-arabic-support branch from 1d6be8b to 2ad2896 Compare June 2, 2026 11:36
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
portals/devportal/src/main/webapp/source/src/DevPortal.jsx (1)

48-55: ⚡ Quick win

Add prepend: true to the Emotion caches

Since DevPortal supplies a custom Emotion cache via CacheProvider, the style injection order is determined by the cache (not just StyledEngineProvider injectFirst). Adding prepend: true to both cacheRtl and cacheLtr keeps MUI/Emotion styles inserted earlier in the cascade, so they’re easier to override by the tenant’s tenantCustomCss.

♻️ Proposed change
 const cacheRtl = createCache({
     key: 'muirtl',
+    prepend: true,
     stylisPlugins: [prefixer, rtlPlugin],
 });

 const cacheLtr = createCache({
     key: 'muiltr',
+    prepend: true,
 });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@portals/devportal/src/main/webapp/source/src/DevPortal.jsx` around lines 48 -
55, Update the two Emotion cache creations (cacheRtl and cacheLtr) so the
createCache calls include the option prepend: true; specifically, add prepend:
true to the createCache invocation for cacheRtl and to the createCache
invocation for cacheLtr to ensure the custom CacheProvider injects styles
earlier in the cascade.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Details.jsx`:
- Line 111: The Box is passing a class-name string via sx (classes.viewWrapper /
'Details-viewWrapper') which is invalid; instead supply sx a style object or
move the paddingInlineStart into the same sx object (e.g., replace
sx={classes.viewWrapper} with sx={{...classes.viewWrapper, paddingInlineStart:
(theme) => theme.spacing(3)}} or convert classes.viewWrapper to an object), or
keep className for the CSS class and remove sx usage; update the Box in the
Details component so sx receives a style object/function and not a string, and
ensure paddingInlineStart remains inside sx if you use a theme function.

---

Nitpick comments:
In `@portals/devportal/src/main/webapp/source/src/DevPortal.jsx`:
- Around line 48-55: Update the two Emotion cache creations (cacheRtl and
cacheLtr) so the createCache calls include the option prepend: true;
specifically, add prepend: true to the createCache invocation for cacheRtl and
to the createCache invocation for cacheLtr to ensure the custom CacheProvider
injects styles earlier in the cascade.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3705eaf3-b9da-472e-afb3-d17196ff5c2a

📥 Commits

Reviewing files that changed from the base of the PR and between 1d6be8b and 2ad2896.

⛔ Files ignored due to path filters (1)
  • portals/devportal/src/main/webapp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (30)
  • portals/devportal/src/main/webapp/package.json
  • portals/devportal/src/main/webapp/site/public/css/main.css
  • portals/devportal/src/main/webapp/site/public/locales/ar.json
  • portals/devportal/src/main/webapp/source/src/DevPortal.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatIcon.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatWindow.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/AsyncApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Breadcrumb.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Comments/Comment.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Details.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/DocList.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/elements.css
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/GraphQLConsole/GraphQLConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICardView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICards/ApiThumbClassic.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiBreadcrumbs.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiTableView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Base/Header/LanuageSelector.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ApiKeyManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenManager.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/LeftMenuItem.jsx
✅ Files skipped from review due to trivial changes (6)
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICardView.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenManager.jsx
🚧 Files skipped from review as they are similar to previous changes (22)
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ApiKeyManager.jsx
  • portals/devportal/src/main/webapp/site/public/css/main.css
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/AsyncApiConsole.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Breadcrumb.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Base/Header/LanuageSelector.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatWindow.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Shared/LeftMenuItem.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Chat/ChatIcon.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Comments/Comment.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/elements.css
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/GraphQLConsole/GraphQLConsole.jsx
  • portals/devportal/src/main/webapp/site/public/locales/ar.json
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiBreadcrumbs.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/DocList.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/APICards/ApiThumbClassic.jsx
  • portals/devportal/src/main/webapp/package.json
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/Recommendations.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/index.jsx
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/ApiTableView.jsx

@vinupa vinupa force-pushed the rtl-arabic-support branch from 2ad2896 to 35dd0f3 Compare June 2, 2026 16:32
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 2, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 2, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 3, 2026

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