You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "bikash-barnwal (via GitHub)" <gi...@apache.org> on 2026/08/14 21:48:41 UTC
[PR] fix(roles): let the permissions dropdown size to its content [superset]
bikash-barnwal opened a new pull request, #43196:
URL: https://github.com/apache/superset/pull/43196
### SUMMARY
In the role modal, the **Permissions** dropdown inherits the trigger's width, so options are truncated. Permission labels are long — `all datasource access on all_datasource_access`, `can write on DashboardFilterStateRestApi` — and once cut off, entries become impossible to tell apart, which is exactly what the screenshot in #40430 shows.
`popupMatchSelectWidth={false}` lets the popup size to its content instead. `AsyncSelect` forwards unrecognized props to the antd `Select`, so no wrapper change is required.
Scoped to the permissions field on purpose: the neighbouring Users and Groups selects show short names and are not affected.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: dropdown is trigger-width; every permission is cut off mid-label.
After: the dropdown widens to fit the longest option.
### TESTING INSTRUCTIONS
```bash
cd superset-frontend
npm run test -- src/features/roles
```
45 tests across 5 suites still pass.
**No unit test accompanies this change, deliberately.** jsdom never applies antd's popup sizing, so a computed-style assertion passes with or without the fix — I wrote one, confirmed it was vacuous, and removed it rather than leave a test that proves nothing. The alternative, mocking `@superset-ui/core/components` to inspect the prop, breaks that barrel's circular imports (`Cannot read properties of undefined (reading 'ActionButton')`). Verification is visual: open **Settings → List Roles → Edit**, click **Permissions**, and confirm long entries are fully readable.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #40430
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #43196:
URL: https://github.com/apache/superset/pull/43196#issuecomment-5398403669
Thanks @bikash-barnwal - will merge as soon as CI passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43196:
URL: https://github.com/apache/superset/pull/43196
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #43196:
URL: https://github.com/apache/superset/pull/43196#discussion_r3845589106
##########
superset-frontend/src/features/roles/RoleFormItems.tsx:
##########
@@ -72,6 +72,12 @@ export const PermissionsField = ({
.replace(/_/g, ' ')
.includes(input.toLowerCase().replace(/_/g, ' '))
}
+ // Permission labels are long ("all datasource access on all_datasource_access",
+ // "can write on DashboardFilterStateRestApi"), and the dropdown otherwise
+ // inherits the trigger's width inside the modal, so every option was truncated
+ // to the point of being indistinguishable. Let the popup size to its content
+ // instead. See #40430.
+ popupMatchSelectWidth={false}
Review Comment:
**Suggestion:** Disabling width matching makes the popup size to the longest option without any maximum width or wrapping constraint. Because this popup is mounted inside `.ant-modal-container`, sufficiently long permission labels can extend beyond the modal or viewport and be clipped, leaving options inaccessible. Constrain the popup to the available viewport/modal width and allow labels to wrap, or use a popup container that can safely overflow the modal. [css layout issue]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Long permission options can remain partially inaccessible.
- ⚠️ Narrow-screen role editing may require horizontal scrolling.
- ⚠️ Popup can extend beyond the modal viewport.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=ec8ec16c10f0477ab05272d3fec64700&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=ec8ec16c10f0477ab05272d3fec64700&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/features/roles/RoleFormItems.tsx
**Line:** 80:80
**Comment:**
*Css Layout Issue: Disabling width matching makes the popup size to the longest option without any maximum width or wrapping constraint. Because this popup is mounted inside `.ant-modal-container`, sufficiently long permission labels can extend beyond the modal or viewport and be clipped, leaving options inaccessible. Constrain the popup to the available viewport/modal width and allow labels to wrap, or use a popup container that can safely overflow the modal.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43196&comment_hash=c0583db02d4b12ca1ff19252eb18278017ccf59414083e77ea26fa3cd3b7c588&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43196&comment_hash=c0583db02d4b12ca1ff19252eb18278017ccf59414083e77ea26fa3cd3b7c588&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43196:
URL: https://github.com/apache/superset/pull/43196#issuecomment-5299765304
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43196:
URL: https://github.com/apache/superset/pull/43196#issuecomment-5400488106
**Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #43196:
URL: https://github.com/apache/superset/pull/43196#issuecomment-5398419684
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 26518977a1f361d9b3e23ca9e485a0f77d3d337b |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a8c75121c34e000097a5bbe |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-43196--superset-docs-preview.netlify.app](https://deploy-preview-43196--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DYtJDoQwDMD-kjMV2zAsP-AZbRNEJWiitBKDRvyd-uSD_QdRPiXDAlCBUxv9XnwLv1r5ICOkZ0gpcEwGlQX5iuYKmPeSI8nB94pl-NrJj0Pbtb7_UFOYRzs4R_C8) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-43196--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43196:
URL: https://github.com/apache/superset/pull/43196#issuecomment-5298648470
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43196?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 66.64%. Comparing base ([`f458721`](https://app.codecov.io/gh/apache/superset/commit/f4587218dd19d046c3e4d00063e7d27f8a2ed354?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8a275cb`](https://app.codecov.io/gh/apache/superset/commit/8a275cb4d3d02d44d5384ee10718078d3a13bfd8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #43196 +/- ##
==========================================
- Coverage 66.64% 66.64% -0.01%
==========================================
Files 2873 2873
Lines 163625 163625
Branches 37767 37767
==========================================
- Hits 109056 109050 -6
- Misses 52440 52446 +6
Partials 2129 2129
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/43196/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/43196/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.75% <ø> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43196?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43196:
URL: https://github.com/apache/superset/pull/43196#issuecomment-5298504188
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(roles): let the permissions dropdown size to its content [superset]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #43196:
URL: https://github.com/apache/superset/pull/43196#discussion_r3797579411
##########
superset-frontend/src/features/roles/RoleFormItems.tsx:
##########
@@ -72,6 +72,12 @@ export const PermissionsField = ({
.replace(/_/g, ' ')
.includes(input.toLowerCase().replace(/_/g, ' '))
}
+ // Permission labels are long ("all datasource access on all_datasource
+ // _access", "can write on DashboardFilterStateRestApi"), and the
+ // dropdown otherwise inherits the trigger's width inside the modal, so
+ // every option was truncated to the point of being indistinguishable.
+ // Let the popup size to its content instead. See #40430.
Review Comment:
The comment splits `all_datasource_access` across lines as `all_datasource` + ` _access`, which makes the example string inaccurate and harder to read. Consider keeping the permission label intact (or split without inserting a space) so the comment matches the real value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org