Skip to content

Display Full Scope Names in DevPortal#1267

Merged
PasanT9 merged 5 commits intowso2:mainfrom
O-sura:devportal-scope-fix
Mar 13, 2026
Merged

Display Full Scope Names in DevPortal#1267
PasanT9 merged 5 commits intowso2:mainfrom
O-sura:devportal-scope-fix

Conversation

@O-sura
Copy link
Copy Markdown
Contributor

@O-sura O-sura commented Mar 9, 2026

This PR adds the changes related to displaying the full scope name associated with a particular resource instead of truncating them when the scope name is too long. These changes will provide,

  • Full Visibility for Long Scopes
  • Scopes label and the list of scope names to start at the exact same top edge.
  • Increased the maximum width of the scope display area for a better balance horizontal space and prevent excessive vertical stretching.
Screenshot 2026-03-09 at 11 10 51

Summary by CodeRabbit

  • Style
    • Improved table cell vertical alignment in API displays.
    • Adjusted text wrapping to avoid truncation and allow multi-line scope names.
    • Increased header and scope display width for better readability.
    • Rendered scope lists inside a scrollable container with a 150px max height to keep layouts compact; small lists display fully without scrolling.
    • Constrained individual scope cell width and switched to a nested table layout for more consistent scope rendering.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

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

Aligns table cells to the top, changes scope cells to allow word wrapping (word-break: break-word, white-space: normal), adds a scrollable container for scopes with conditional overflow and max-height, increases a header cell maxWidth from 100 to 250, and nests scopes in a Table > TableBody > TableRow structure.

Changes

Cohort / File(s) Summary
API Console UI
portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx
Added verticalAlign: 'top' to StyledTableCell; changed scope cell from textOverflow: 'ellipsis' + whiteSpace: 'nowrap' to wordBreak: 'break-word' and whiteSpace: 'normal'; introduced ScrollContainer (maxHeight: 150px, overflowY: scroll, display: block, width: 100%) with conditional overflow when scopes.length <= 5; increased header maxWidth from 100 to 250; rendered scopes inside a nested Table > TableBody > TableRow with per-scope maxWidth: 240.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I nibble CSS and hop about,

Lines now break when scopes get stout,
A tiny scroll keeps things in view,
Wider headers welcome you,
Hooray — the console’s neat and sprout!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and directly summarizes the main change: displaying full scope names instead of truncating them in the DevPortal.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx`:
- Line 106: The Tooltip in the CustomPadLock component is using the deprecated
interactive prop; remove the interactive prop from the Tooltip JSX in the
CustomPadLock component (or replace it with disableInteractive if you need a
non-interactive tooltip) to restore MUI v5 compatibility—locate the Tooltip
element inside the CustomPadLock.jsx render/return and delete the interactive
attribute so the default interactive behavior in MUI v5 is used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 664bb707-dd0d-4f37-9069-eb8a7401df3b

📥 Commits

Reviewing files that changed from the base of the PR and between ce57ec5 and 0c7343f.

📒 Files selected for processing (1)
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx

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.

🧹 Nitpick comments (2)
portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx (2)

149-163: Consider simplifying by removing the conditional overflow logic.

The conditional styling at line 150-151 exists to work around the always-visible scrollbar issue. If you change ScrollContainer to use overflowY: 'auto' as suggested above, this conditional logic becomes unnecessary—the scrollbar will only appear when content exceeds maxHeight.

Additionally, using scope as the key instead of index would be more semantically appropriate if scope names are guaranteed unique within an operation.

Suggested simplification (if overflowY: 'auto' is adopted)
-                                                    <ScrollContainer
-                                                        style={scopes.length <= 5 ? { overflowY: 'visible', maxHeight: 'none' } : {}}
-                                                    >
+                                                    <ScrollContainer>
                                                         <Table>
                                                             <TableBody>
                                                                 {scopes.map((scope, index) => (
-                                                                    <TableRow key={index}>
+                                                                    <TableRow key={scope}>
                                                                         <StyledScopeCell style={{ maxWidth: 240 }}>
                                                                             {scope}
                                                                         </StyledScopeCell>
                                                                     </TableRow>
                                                                 ))}
                                                             </TableBody>
                                                         </Table>
                                                     </ScrollContainer>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx`
around lines 149 - 163, Remove the conditional overflowY styling on
ScrollContainer and instead set ScrollContainer to use overflowY: 'auto' so the
scrollbar only appears when content exceeds maxHeight; then simplify the map key
in scopes.map by using the scope value (e.g., TableRow key={scope}) instead of
index (ensure scope strings are unique within the operation). Update the
ScrollContainer usage (component name: ScrollContainer) and the map callback
(scopes.map → TableRow key) accordingly and delete the branches that apply {
overflowY: 'visible', maxHeight: 'none' }.

48-53: Use overflowY: 'auto' to avoid always-visible scrollbar.

overflowY: 'scroll' always displays a scrollbar even when content fits. Using 'auto' would only show the scrollbar when content actually overflows, providing a cleaner UX.

Suggested fix
 const ScrollContainer = styled('div')(() => ({
     maxHeight: '150px',
-    overflowY: 'scroll',
+    overflowY: 'auto',
     display: 'block',
     width: '100%',
 }));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx`
around lines 48 - 53, Update the styled component ScrollContainer to use
overflowY: 'auto' instead of 'scroll' so the scrollbar only appears when content
overflows; locate the ScrollContainer definition (styled('div')(...) in
CustomPadLock.jsx) and change the overflowY property value to 'auto' while
keeping maxHeight, display, and width unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx`:
- Around line 149-163: Remove the conditional overflowY styling on
ScrollContainer and instead set ScrollContainer to use overflowY: 'auto' so the
scrollbar only appears when content exceeds maxHeight; then simplify the map key
in scopes.map by using the scope value (e.g., TableRow key={scope}) instead of
index (ensure scope strings are unique within the operation). Update the
ScrollContainer usage (component name: ScrollContainer) and the map callback
(scopes.map → TableRow key) accordingly and delete the branches that apply {
overflowY: 'visible', maxHeight: 'none' }.
- Around line 48-53: Update the styled component ScrollContainer to use
overflowY: 'auto' instead of 'scroll' so the scrollbar only appears when content
overflows; locate the ScrollContainer definition (styled('div')(...) in
CustomPadLock.jsx) and change the overflowY property value to 'auto' while
keeping maxHeight, display, and width unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb5b50a8-cdda-47b7-b242-b953fe908d2a

📥 Commits

Reviewing files that changed from the base of the PR and between 7076d7a and e5e9ff8.

📒 Files selected for processing (1)
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx

@sonarqubecloud
Copy link
Copy Markdown

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.

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

48-53: Consider using overflowY: 'auto' instead of 'scroll'.

overflowY: 'scroll' always renders a scrollbar track even when content fits within the container. Using 'auto' will only display the scrollbar when content actually exceeds the maxHeight.

♻️ Suggested change
 const ScrollContainer = styled('div')(() => ({
     maxHeight: '150px',
-    overflowY: 'scroll',
+    overflowY: 'auto',
     display: 'block',
     width: '100%',
 }));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx`
around lines 48 - 53, The ScrollContainer styled component currently uses
overflowY: 'scroll' which always shows a scrollbar; update the ScrollContainer
definition (the styled('div') component named ScrollContainer) to use overflowY:
'auto' so the scrollbar only appears when content exceeds maxHeight, leaving
other styles (maxHeight, display, width) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx`:
- Around line 48-53: The ScrollContainer styled component currently uses
overflowY: 'scroll' which always shows a scrollbar; update the ScrollContainer
definition (the styled('div') component named ScrollContainer) to use overflowY:
'auto' so the scrollbar only appears when content exceeds maxHeight, leaving
other styles (maxHeight, display, width) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a0efc9b2-fb30-4efd-a3a0-a177131f2e99

📥 Commits

Reviewing files that changed from the base of the PR and between e5e9ff8 and 63132e3.

📒 Files selected for processing (1)
  • portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/CustomPadLock.jsx

@PasanT9 PasanT9 merged commit 001af73 into wso2:main Mar 13, 2026
4 of 5 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.

3 participants