-
Notifications
You must be signed in to change notification settings - Fork 1
fix(ui): polish SideNavigation and DataGridCell font-size revert #1778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
edda
wants to merge
19
commits into
main
Choose a base branch
from
fix/datagrid-font-size-and-sidenav-overflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
615558c
fix(ui): revert DataGridCell font size to default (1rem)
edda 7d0dbf5
feat(ui): add title attribute to SideNavigationItem string labels
edda 2d91866
test(ui): cover string-children fallback for SideNavigationItem title
edda 3b01f75
test(ui): assert SideNavigationItem omits title for ReactNode labels
edda 8c792b2
fix(ui): clamp SideNavigationItem labels to two lines
edda ca6ee30
fix(ui): allow SideNavigationItem label container to shrink for clamp
edda dfd3400
chore(ui): add changeset for SideNavigation label overflow fix
edda 08f869c
chore(config): add .mcp.json to gitignore
edda c0c91ee
fix(ui): left-align wrapped SideNavigationItem labels
edda 5adc904
fix(ui): polish SideNavigation overflow, alignment, hover, and group …
edda a68dc19
fix(ui): address review feedback on SideNavigation polish PR
edda a17fa15
Merge branch 'main' into fix/datagrid-font-size-and-sidenav-overflow
edda 2ab93c4
fix(ui): indent nested SideNavigationGroups correctly
edda e4b27c6
fix(ui): align SideNavigationItem icon with first line of wrapped label
edda 4f09dd9
chore(ui): drop stale selected flag from SideNavigation story
edda 2af0226
Merge branch 'main' into fix/datagrid-font-size-and-sidenav-overflow
edda 1aa8220
test(ui): drop overly specific DataGridCell font-size test
edda eb0f357
fix(ui): suppress hover background on disabled SideNavigation expand …
edda 4d65ee3
chore(ui): note disabled chevron hover fix in SideNavigation changeset
edda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@cloudoperators/juno-ui-components": patch | ||
| --- | ||
|
|
||
| Revert DataGridCell font size back to the default (1rem). The reduced font size (0.875rem) introduced in #1710 was made the default without sufficient consideration; a smaller, opt-in size may be reintroduced as a configurable option in the future. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| "@cloudoperators/juno-ui-components": patch | ||
| --- | ||
|
|
||
| SideNavigation polish: | ||
|
|
||
| - Long labels in `SideNavigationItem` and `SideNavigationGroup` now clamp to two lines and break mid-word, instead of overflowing the sidenav. String labels are exposed as a native `title` tooltip so users can read the full text on hover. | ||
| - Wrapped labels are left-aligned, and the expand/collapse chevron and optional icon stay aligned with the first line. | ||
| - `SideNavigationItem` and its expand chevron now show a hover background. The chevron's hover background is suppressed when the item is disabled. | ||
| - The whole `SideNavigationGroup` row is clickable to expand/collapse, and its children are indented to match nested `SideNavigationItem` children. | ||
| - Nested `SideNavigationGroup`s (a group inside another group, or inside a `SideNavigationItem`) now indent correctly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,3 +24,4 @@ act_*.json | |
| .out-of-code-insights | ||
| .claude | ||
| claude.md | ||
| .mcp.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/ui-components/src/components/SideNavigation/levelContext.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Juno contributors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| import { createContext } from "react" | ||
|
|
||
| export const LevelContext = createContext<number>(0) |
76 changes: 76 additions & 0 deletions
76
packages/ui-components/src/components/SideNavigation/sidenavigation.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Juno contributors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /* Shared nesting levels. | ||
| * Both SideNavigationItem and SideNavigationGroup tag the element that carries | ||
| * their label with one of these classes; the indentation lives here so an item | ||
| * and a group at the same nesting depth always indent identically. | ||
| * level-1 has no margin-left rule (top level, flush with the navigation edge). | ||
| */ | ||
| .level-2 { | ||
| margin-left: 1.75rem; | ||
| } | ||
|
|
||
| .level-3 { | ||
| margin-left: 2.5rem; | ||
| } | ||
|
|
||
| /* SideNavigationItem */ | ||
|
|
||
| .juno-sidenavigation-item { | ||
| border-radius: 0.25rem; | ||
| border-left: 0.25rem solid transparent; | ||
| color: var(--color-sidenav-item-text-default); | ||
| } | ||
|
|
||
| .juno-sidenavigation-item:hover { | ||
| color: var(--color-sidenav-item-text-hover); | ||
| } | ||
|
|
||
| .juno-sidenavigation-item:not(.juno-sidenavigation-item-selected):hover { | ||
| background-color: var(--color-sidenav-item-background-hover); | ||
| } | ||
|
|
||
| .juno-sidenavigation-item:focus { | ||
| outline: none; | ||
| box-shadow: 0 0 0 2px var(--color-accent); | ||
| } | ||
|
|
||
| .juno-sidenavigation-item-selected { | ||
| background-color: var(--color-sidenav-item-background-selected); | ||
| border-left: 0.25rem solid var(--color-accent); | ||
| } | ||
|
|
||
| .expand-icon { | ||
| display: flex; | ||
| align-items: center; | ||
| min-height: 1.875rem; | ||
| border-radius: 0.25rem; | ||
| } | ||
|
|
||
| .expand-icon:not(:disabled):hover { | ||
| background-color: var(--color-sidenav-item-background-hover); | ||
| } | ||
|
|
||
| /* Item label: clamp + per-level font weight, derived from the shared level-N classes. */ | ||
| .juno-sidenavigation-item .level-1, | ||
| .juno-sidenavigation-item .level-2, | ||
| .juno-sidenavigation-item .level-3 { | ||
| display: -webkit-box; | ||
| -webkit-box-orient: vertical; | ||
| -webkit-line-clamp: 2; | ||
| overflow: hidden; | ||
| overflow-wrap: anywhere; | ||
| text-align: left; | ||
| } | ||
|
|
||
| .juno-sidenavigation-item .level-1 { | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .juno-sidenavigation-item .level-2, | ||
| .juno-sidenavigation-item .level-3 { | ||
| font-weight: 500; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.