routerLinkActive not supported by anchor tabs and breadcrumb
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 39
- Forks
- 14
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 13
Description
🐛 Bug Report
In Angular, routerLinkActive is an attribute used to help style an active link element, e.g. the active anchor tab, or the breadcrumb item for the current page. Currently, we use different schemes to style the active item in each of those components. We need to consider integration with the routerLinkActive attribute.
💻 Repro or Code Sample
<nimble-anchor-tabs activeid="1">
<nimble-anchor-tab id="1" [nimbleRouterLink]="url1" routerLinkActive="active">Tab 1</nimble-anchor-tab>
<nimble-anchor-tab id="2" [nimbleRouterLink]="url2" routerLinkActive="active">Tab 2</nimble-anchor-tab>
</nimble-anchor-tabs>
🤔 Expected Behavior
When the user activates a tab by clicking or Space/Enter, we should have a way to set the nimble-anchor-tabs activeid to the id of that tab. This could be communicated via an example program, or by a custom directive (e.g. nimbleRouterLinkActive) that encapsulates that logic.
We need to investigate if/how the breadcrumb needs to support routerLinkActive in its own way, e.g. clearing href on active breadcrumb item.
😯 Current Behavior
Anchor tabs and breadcrumb don't care about routerLinkActive.
💁 Possible Solution
Anchor tabs: Set activeid of tabs based on isActive property of RouterLinkActive directives of child anchor tab elements.
🔦 Context
Came up in discussion on PR #987
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the anchor tabs and breadcrumb components described in the issue, then read Angular's RouterLinkActive documentation and the discussion in PR #987. Determine how active router links should update tab activeid and whether the breadcrumb needs separate handling; done means both components have an agreed, demonstrable integration path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100