nextcloud-vue icon indicating copy to clipboard operation
nextcloud-vue copied to clipboard

feat(NcAppNavigationItem): use exact route matching

Open wofferl opened this issue 1 month ago • 1 comments

Resolves: #7965

updated

This PR changes the state to use from isActive to isExactActive and made active an optional prop to overwrite the default behaviour.

old

exact - Pass in true if you want the matching behaviour to be non-inclusive: https://router.vuejs.org/api/#exact

The exact prop for NcAppNavigationItem was removed in v9 without replacement.

The news app could now use this for a new feature (https://github.com/nextcloud/news/pull/3148), to use /starred for all items and /starred/:feedId for sub items.

This PR adds the exact prop to control which active state - isExactActive or isActive - to use.

isExactActive: true if the [exact active class](https://v3.router.vuejs.org/api/#exact-active-class) should be applied. Allows to apply an arbitrary class

🏁 Checklist

  • [x] ⛑️ Tests are included or are not applicable
  • [x] 📘 Component documentation has been extended, updated or is not applicable

wofferl avatar Dec 01 '25 18:12 wofferl

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 52.99%. Comparing base (e5737a2) to head (51c2d1f). :warning: Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7939   +/-   ##
=======================================
  Coverage   52.99%   52.99%           
=======================================
  Files         100      100           
  Lines        3119     3119           
  Branches      867      868    +1     
=======================================
  Hits         1653     1653           
  Misses       1228     1228           
  Partials      238      238           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 01 '25 18:12 codecov[bot]