Repository navigation
feat(DropdownMenu): One menu component for actions, tabs and nav overflow - #8996
talissoncosta wants to merge 12 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
ee16aff to
9f9f33d
Compare
3b8a120 to
270b264
Compare
270b264 to
c7a8e20
Compare
9f9f33d to
4fcad7a
Compare
4fcad7a to
85c4880
Compare
c7a8e20 to
40e2108
Compare
bc598f9 to
71b5671
Compare
DropdownMenu takes DropdownMenuItem children (icon, current, destructive, disabled with a reason) and is built on Popover, so it opens as a bottom sheet on phones, with larger rows there. Disabled items stay focusable and show why under the label. The action menus in stale flags, experiments, release pipelines and integrations, and the "More tabs" overflow, move onto it. The old items-based DropdownMenu is deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The project, organisation and environment navs open their overflow as a DropdownMenu instead of an InlineModal, so it is a sheet on phones. Each nav names its button with a required label, and E2E finds it by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two Grafana integrations both read "Actions for Grafana"; numbered when there are several. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docker builds report
|
There was a problem hiding this comment.
All reported issues were addressed across 27 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23824 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #23824 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #23824 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #23824 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #23822 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23822 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #23822 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #23822 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
❌ private-cloud · depot-ubuntu-latest-16 — run #23820 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise ✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23820 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #23820 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #23820 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Skipped testsfirefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss |
Visual Regression29 screenshots compared. See report for details. |
<DropdownMenuItem><Icon name='copy' /> Copy</DropdownMenuItem>: the item spaces and sizes it, so any icon works, and the reason lines up with the text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ements read One icon colour rule, sheet sizes as variables instead of nested selectors, one gap, and the tick named __check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A popover in a clickable row (stale flags, integrations) also ran the row's click, since React bubbles through the portal. Popover now stops clicks on its trigger and inside its panel or sheet; keys still pass so Escape works. It also closes when the route changes, as the old nav overflow did, so the wrapper div in IntegrationList goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…flowed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The project and environment navs looked different in their overflow menus, as each kept its own link styles. DropdownMenuLink is a menu row that navigates, with the selected look for the current page; NavSubLink and SidebarLink render through it when inside a menu. DropdownMenuRow goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
Turn on auto-fix | Re-trigger cubic
Compare and the usage charts use the project's difference and bar-chart icons, and the overflow button its more-vertical dots, so no ionicon reaches a menu and DropdownMenu drops its ion-icon rule. Environments, Projects and the environment menu button keep theirs until the icon library lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Confidence score: 4/5
- In
ProjectNavbar.tsx, the Compare icon’s open stroke paths get filled, adding visible wedges. Exempt stroke-based icons from the fill rule.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/web/components/navigation/navbars/ProjectNavbar.tsx">
<violation number="1" location="frontend/web/components/navigation/navbars/ProjectNavbar.tsx:110">
P3: `difference` uses open, stroke-only paths, but `.nav-sub-link svg path` forces them to fill, adding filled wedges to the visible Compare icon. Exempt stroke-based icons from that fill rule.</violation>
</file>
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
Turn on auto-fix | Re-trigger cubic
| )} | ||
| <NavSubLink | ||
| icon={gitCompare} | ||
| icon={<Icon name='difference' />} |
There was a problem hiding this comment.
P3: difference uses open, stroke-only paths, but .nav-sub-link svg path forces them to fill, adding filled wedges to the visible Compare icon. Exempt stroke-based icons from that fill rule.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At frontend/web/components/navigation/navbars/ProjectNavbar.tsx, line 110:
<comment>`difference` uses open, stroke-only paths, but `.nav-sub-link svg path` forces them to fill, adding filled wedges to the visible Compare icon. Exempt stroke-based icons from that fill rule.</comment>
<file context>
@@ -107,7 +107,7 @@ const ProjectNavbar: FC<ProjectNavType> = ({ environmentId, projectId }) => {
)}
<NavSubLink
- icon={gitCompare}
+ icon={<Icon name='difference' />}
id='compare-link'
to={`/project/${projectId}/compare`}
</file context>
…ws into the menu Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
Turn on auto-fix | Re-trigger cubic
docs/if required so people know about the feature.Changes
Contributes to ENG-643
DropdownMenutakesDropdownMenuItemchildren (currentwith a tick,destructive,disabledwith an optionaldisabledReason). An item's icon is a child before its label (<Icon name='copy' /> Copy); the item sizes, colours and spaces it. Disabled items stay focusable (aria-disabled) and show the reason under the label, as their description. The trigger defaults to a "more" button named by the menu'saria-label, or takes any element. Built onPopover, so menus open as a bottom sheet on phones, with larger rows there (16px label, 20px icon, 48px rows). Items close the menu afteronSelect.DropdownMenuLinkis a row that navigates, marked as current on its page.Popoverstops clicks on its trigger and panel from reaching a clickable row, and closes on a route change.Consumers:
DropdownMenuinStaleSection,ExperimentActionDropdown,ReleasePipelinesList,IntegrationList(deleted).Tabsoverflow: "More tabs", a sheet on phones. Scrolling tabs on phones is in feat(Tabs): Scroll tabs sideways on phones #9115.OverflowNav(project, organisation and environment navs) instead ofInlineModal, with a requiredlabelso each button has its own name.NavSubLinkandSidebarLinkrender asDropdownMenuLinkrows inside the menu, so both navs' overflows look the same.TabLabelrenders a tab's label and unsaved-changes dot for both the tab and the menu.data-test.How did you test this code?
At 393px and 1440px: