Skip to content

PMM-15046 Move NavItem component to percona-ui and fix PMM sidebar inconsistencies#5328

Open
pmcf-percona wants to merge 81 commits into
v3from
PMM-15046-fix-sidebar-inconsistencies
Open

PMM-15046 Move NavItem component to percona-ui and fix PMM sidebar inconsistencies#5328
pmcf-percona wants to merge 81 commits into
v3from
PMM-15046-fix-sidebar-inconsistencies

Conversation

@pmcf-percona
Copy link
Copy Markdown
Contributor

@pmcf-percona pmcf-percona commented May 6, 2026

Refactors the sidebar navigation component to delegate leaf-item rendering to the upstream NavItem from @percona/percona-ui, reducing code at PMM level and making management of styling easier at a global level.

The old NavItem handled both sidebar behavior (collapse, tooltips, drawer state) and visual presentation (icon layout, text styling, dot indicators, badges). This made it fragile. Visual changes risked breaking sidebar logic and vice versa.

This refactor separates concerns:

  • Renamed NavItem → SidebarNavItem — clarifies its role as a sidebar-specific orchestration wrapper and avoids naming collision with the upstream component correctly named NavItem.
  • Delegates leaf rendering to @percona/percona-ui NavItem — icon + text + secondary text + badge + dot are now handled by Peak Design for any Percona product.
  • Removed code at PMM level — typography, colors, and spacing are now owned by the upstream component.
  • Deleted NavItemDot — dead code, fully replaced by the upstream showDot/dotColor props at NavItem (@ upstream level).

https://perconadev.atlassian.net/browse/PMM-15046

Dependencies

Based on #5163 to avoid collisions with previous changes in navigation.

Requires percona/percona-ui#new/navitem-and-chip-reorg to be merged and released first.

Non-breaking

The rendered output is visually very close/similar, as in, not drastic. This is a structural refactor with no user-facing behavior changes.

CleanShot 2026-05-06 at 13 23 29

matejkubinec and others added 30 commits March 19, 2026 11:43
…tings hook with query invalidation

Made-with: Cursor
… forms

- Add Settings page with SSH Key, Metrics Resolution, Advanced Settings tabs
- Add Settings.messages.ts with all copy from Grafana
- Add placeholder form components (to be implemented in next commits)
- Fix useUpdateSettings onSuccess signature for react-query v5
- Fix updateSnoozeDuration optional handling in useSnooze

Made-with: Cursor
- Updated esbuild packages in yarn.lock from version 0.21.5 to 0.25.12.
- Added scrollbar stability in GlobalStyles for improved UI experience.
- Refactored Page component layout to ensure proper flex behavior and added a Divider for better separation of the footer.
- Enhanced Sidebar component for better usability on narrow screens, so now it overlaps, instead of pushing, to open it in smaller screens.
- Promoted Metrics resolution as the 1st tab.
- Updated text capitalization in Settings.messages.
- Improved layout and styling in MetricsResolutionForm for better accessibility.
- Transformed the MetricsResolutionForm into inline info, for better accessibility.
- Updated tooltip texts and labels in Settings.messages for clarity.
- Refined layout and styling in AdvancedSettingsForm and SshKeyForm for better accessibility and usability.
- Added a sticky footer to all tabs for improved action visibility during form submission.
- Adjusted spacing and alignment in various components to enhance overall UI consistency.
- Added a new 'surface' prop to the Page component for customizable background styling.
- Integrated GlobalStyles to manage background color based on the 'surface' prop.
- Updated Settings page to utilize the new 'surface' prop for improved visual consistency.
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.42.0 to 0.43.0.
- [Commits](golang/sys@v0.42.0...v0.43.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.43.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* PMM-14980 Fix the healthcheck

* PMM-14980 Optimize the logs

* PMM-14980 Replace assert with require for higher reliability

* PMM-14980 Fix API test workflow
@pmcf-percona pmcf-percona requested review from matejkubinec and mattiasimonato and removed request for a team May 6, 2026 12:10
@pmcf-percona pmcf-percona changed the title PMM-15046 Move NavItem component to percona-ui and fix PMM sidebar in… PMM-15046 Move NavItem component to percona-ui and fix PMM sidebar inconsistencies May 6, 2026
@pmcf-percona
Copy link
Copy Markdown
Contributor Author

UI/CI test fails due to percona/percona-ui#16

Base automatically changed from PMM-14930-settings-page-native-ui to v3 May 14, 2026 16:45
@matejkubinec matejkubinec requested a review from a team as a code owner May 14, 2026 16:45
@matejkubinec matejkubinec requested review from 4nte and maxkondr and removed request for a team May 14, 2026 16:45
freenandes and others added 4 commits May 15, 2026 11:15
- Wrap renders with ThemeContextProvider/pmmThemeOptions: the upstream
  NavItem consumes the menuText typography variant from the percona-ui
  theme, which the bare MemoryRouter wrap did not provide.
- Replace getByTestId('navitem-dot') with querySelector('.MuiBadge-dot'):
  NavItemDot was removed in favor of MUI's Badge variant="dot".
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 15, 2026

CLA assistant check
All committers have signed the CLA.

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.

7 participants