Skip to content

fix(ui): polish SideNavigation and DataGridCell font-size revert#1778

Open
edda wants to merge 19 commits into
mainfrom
fix/datagrid-font-size-and-sidenav-overflow
Open

fix(ui): polish SideNavigation and DataGridCell font-size revert#1778
edda wants to merge 19 commits into
mainfrom
fix/datagrid-font-size-and-sidenav-overflow

Conversation

@edda

@edda edda commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Polishes overflow, alignment, hover, spacing, and indentation in SideNavigationItem and SideNavigationGroup.
  • Reverts the default DataGridCell font size back to 1rem.

SideNavigation

  • Long labels in SideNavigationItem and SideNavigationGroup clamp to two lines and break mid-word, instead of overflowing the fixed-width sidenav. String labels are exposed as a native title tooltip.
  • Wrapped labels are left-aligned, and the expand/collapse chevron and optional leading icon both stay aligned with the first line.
  • SideNavigationItem and its expand chevron show a hover background.
  • The whole SideNavigationGroup row is clickable to expand/collapse, and its direct children are indented to match nested children of SideNavigationItem.
  • A SideNavigationGroup nested inside another group or a SideNavigationItem now indents its own label and propagates depth to its children, so items at the same nesting depth indent identically regardless of whether their parent is a Group or an Item.
  • Internal: LevelContext was extracted into a shared module so both SideNavigationItem and SideNavigationGroup can drive the indentation, and Item/Group CSS was consolidated into a single sidenavigation.css keyed on shared level-N classes.

DataGrid

  • Reverts DataGridCell default font size from 0.875rem back to 1rem. A smaller, opt-in size may be reintroduced as a configurable option in the future.

Linked issues

Closes #1776
Closes #1777
Closes #1773
Closes #1755

Test plan

  • Storybook: verify SideNavigationItem and SideNavigationGroup with long, unbreakable labels (long IDs, URLs, camelCase tokens) clamp to two lines.
  • Storybook: verify the second wrapped line is left-aligned.
  • Storybook: verify the chevron stays aligned with the first line when the label wraps.
  • Storybook: verify a leading icon on SideNavigationItem stays aligned with the first line when the label wraps.
  • Storybook: verify hover background appears on SideNavigationItem and its expand chevron, in both light and dark themes.
  • Storybook: verify clicking anywhere on a SideNavigationGroup row expands/collapses it.
  • Storybook: verify direct children of SideNavigationGroup are indented like nested children of SideNavigationItem.
  • Storybook: verify a SideNavigationGroup nested inside another group or a SideNavigationItem indents its own label and its children at the correct depth.
  • Storybook: verify SideNavigationGroup and SideNavigationItem row heights match.
  • Storybook: verify DataGridCell renders at 1rem font size by default.
  • pnpm test passes.
  • pnpm typecheck passes.

edda added 10 commits June 12, 2026 18:07
The reduced 0.875rem default from #1710 was not deliberate; revert for now.

A configurable smaller size may be reintroduced later.

Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
…spacing

Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Copilot AI review requested due to automatic review settings June 17, 2026 15:38
@edda edda requested review from a team and franzheidl as code owners June 17, 2026 15:38
@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4d65ee3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@cloudoperators/juno-ui-components Patch
@cloudoperators/juno-app-carbon Patch
@cloudoperators/juno-app-doop Patch
@cloudoperators/juno-app-example Patch
@cloudoperators/juno-app-greenhouse Patch
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-supernova Patch
@cloudoperators/juno-app-template Patch
@cloudoperators/juno-messages-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

🚀 View preview at
https://cloudoperators.github.io/juno/pr-preview/pr-1778/

Built to branch gh-pages at 2026-06-18 17:32 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR polishes SideNavigationItem/SideNavigationGroup behavior and styling for overflow/wrapping/hover + alignment, and restores DataGridCell’s default typography by removing the smaller text-sm default.

Changes:

  • Adds title-tooltip support and wrapping/overflow handling improvements for SideNavigationItem, plus hover styling for the expand chevron.
  • Refactors LevelContext into a shared module and updates SideNavigationGroup to make the header row clickable.
  • Reverts DataGridCell default font size back to 1rem by removing jn:text-sm.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/ui-components/src/components/SideNavigationItem/SideNavigationItem.test.tsx Adds tests for the new title attribute behavior on SideNavigationItem.
packages/ui-components/src/components/SideNavigationItem/sidenavigationitem.css Adds hover background + clamp/wrapping styles and hover styling for the expand icon.
packages/ui-components/src/components/SideNavigationItem/SideNavigationItem.component.tsx Uses shared LevelContext, improves alignment for wrapped labels, and adds title attribute logic.
packages/ui-components/src/components/SideNavigationGroup/SideNavigationGroup.component.tsx Makes the group header row clickable and introduces clamping/wrapping styles; now uses shared LevelContext for indentation.
packages/ui-components/src/components/SideNavigation/levelContext.ts New shared context module for indentation level.
packages/ui-components/src/components/DataGridCell/DataGridCell.component.tsx Removes jn:text-sm to revert default font size to 1rem.
.gitignore Ignores .mcp.json.
.changeset/sidenavigation-label-overflow.md Changeset entry for SideNavigation polish.
.changeset/revert-datagridcell-font-size.md Changeset entry for DataGridCell font-size revert.

@edda edda changed the title fix(ui): SideNavigation polish and DataGridCell font-size revert fix(ui): polish SideNavigation and DataGridCell font-size revert Jun 17, 2026
TilmanHaupt
TilmanHaupt previously approved these changes Jun 18, 2026
franzheidl
franzheidl previously approved these changes Jun 18, 2026
edda added 3 commits June 18, 2026 18:43
A SideNavigationGroup nested inside another group or a SideNavigationItem
did not indent its own label, and reset the level provided to its children
to 1 — so deeply nested items were under-indented.

Make the Group read LevelContext for its own depth, propagate level + 1 to
its children, and consolidate Item/Group CSS into a single
sidenavigation.css that drives indentation from shared `level-N` classes.

Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
When a SideNavigationItem label wraps to two lines, the leading icon now
stays aligned with the first line of text instead of centering against
the full two-line block, matching the chevron alignment fix.

Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
@edda edda dismissed stale reviews from franzheidl and TilmanHaupt via 4f09dd9 June 18, 2026 16:45
@edda edda requested a review from Copilot June 18, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.

Comment thread packages/ui-components/src/components/SideNavigation/sidenavigation.css Outdated
edda added 3 commits June 18, 2026 18:59
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
…button

Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants