Skip to content

fix(ActivityAppNavigation): use correct icon filter for NC34+ active nav items#2627

Open
miaulalala wants to merge 1 commit into
masterfrom
fix/nc34-active-nav-icon-color
Open

fix(ActivityAppNavigation): use correct icon filter for NC34+ active nav items#2627
miaulalala wants to merge 1 commit into
masterfrom
fix/nc34-active-nav-icon-color

Conversation

@miaulalala
Copy link
Copy Markdown
Collaborator

@miaulalala miaulalala commented May 28, 2026

Summary

  • The NcAppNavigationItem component in @nextcloud/vue 9.8.0 introduced a new active state design for NC34+: active items now use --color-primary-element-light as background with --color-main-text for text, rather than the full primary colour with --color-primary-element-text
  • The icon filter for active items was still using --primary-invert-if-dark, which is designed for icons on a full primary-coloured background — in dark mode on NC34+ this renders the icon dark/invisible
  • Switch to --background-invert-if-dark for the non-legacy (NC34+) case, keeping --primary-invert-if-dark only for the .app-navigation-entry--legacy class applied on NC<34

Also added in #2625 for NC34.

Test plan

  • Open the Activity app on NC34+ in dark mode — all navigation icons should be white/visible, including the active item
  • Check the same on NC<34 (legacy) — active item icon should still use the primary-colour invert filter

🤖 Generated with Claude Code

…nav items

The NcAppNavigationItem component in @nextcloud/vue 9.8.0 introduced a new
active state design for NC34+: active items now use --color-primary-element-light
as background with --color-main-text for text, rather than the full primary
color with --color-primary-element-text.

The icon filter for active items was still using --primary-invert-if-dark, which
is intended for icons on a full primary-colored background. On NC34+ this results
in dark/invisible icons in dark mode. Switch to --background-invert-if-dark for
the non-legacy (NC34+) case, keeping --primary-invert-if-dark only for the legacy
class applied on NC<34.

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala force-pushed the fix/nc34-active-nav-icon-color branch from e25dce6 to 757cc2b Compare May 28, 2026 11:35
@miaulalala miaulalala added this to the Nextcloud 35 milestone May 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AndyScherzinger
Copy link
Copy Markdown
Member

One thing we probably 8still) can't do (no judgment) is the active state icon switching given apps plug into the sidebar, so we face the same issue we have in files?

@miaulalala
Copy link
Copy Markdown
Collaborator Author

One thing we probably 8still) can't do (no judgment) is the active state icon switching given apps plug into the sidebar, so we face the same issue we have in files?

Unsure what you mean 😁 is the fix also needed in server?

@AndyScherzinger
Copy link
Copy Markdown
Member

Unsure what you mean 😁

click on the side bar items in the contacts app and you see the icons changing

is the fix also needed in server?

Yes, but I can't tell if the solution would be the same for both. Yet not in scope for this PR.

@AndyScherzinger
Copy link
Copy Markdown
Member

@miaulalala this is what I am referring to: nextcloud-libraries/nextcloud-vue#7273

@miaulalala
Copy link
Copy Markdown
Collaborator Author

@miaulalala this is what I am referring to: nextcloud-libraries/nextcloud-vue#7273

ah I see, let me check on monday what my fix actually looks like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants