Abdulrehman-PIAIC80387 opened a new pull request, #42529:
URL: https://github.com/apache/superset/pull/42529
### SUMMARY
Fixes #42467.
The active-tab logic in `superset-frontend/src/features/home/Menu.tsx`
matches the Datasets tab against the legacy FAB list URL prefix
`/tablemodelview`. Newer React-managed routes for creating and viewing datasets
live under `/dataset/*` (`/dataset/add/`, `/dataset/:datasetId`) and never
match, so the top-nav Datasets tab shows no active-state highlight when the
user is on those pages.
Adding `/dataset` as a second prefix restores the highlight without touching
any other tab or route.
**Note on Dashboard:** the issue reporter also mentioned Dashboard, but
tracing the routes shows all Dashboard URLs (`/dashboard/list/`,
`/dashboard/:idOrSlug/`, `/dashboard/new/`) already start with `/dashboard` and
match the current `Paths.Dashboard` prefix. Focused this PR on the confirmed
Datasets bug; happy to follow up if a Dashboard case is later confirmed.
Root cause diagnosis on the issue thread by @dosu.
### TESTING INSTRUCTIONS
Manual:
1. Log in, go to **Datasets** — tab highlighted ✓
2. Click **+ Dataset** (URL → `/dataset/add/`)
3. **Before fix:** Datasets tab NOT highlighted
4. **After fix:** Datasets tab remains highlighted (green underline)
5. Also verify direct dataset view: navigate to `/dataset/{id}` and confirm
the tab stays highlighted
Automated:
```bash
cd superset-frontend && pnpm test src/features/home/Menu.test.tsx
```
New parametrized test covers both `/dataset/add/` and `/dataset/{id}`
variants.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #42467
- [x] Required feature flags: none
- [x] Changes UI: yes (restores missing tab-highlight — no visual redesign)
- [x] Includes DB Migration: no
- [x] Includes CLI or Node.js commands: no
- [x] Breaking change: no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]