-
Notifications
You must be signed in to change notification settings - Fork 526
fix(navbar): highlighting on browser back #2425
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
Conversation
lidel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @SuchitraSwain, works as expected.
Small nits inline for the future
Also, it is useful to use "Closes #issue-number" phrasing, this way merging PR automatically resolves the issue it fixes:
(I made change here alread, juts fyi in the future)
| @@ -1,5 +1,5 @@ | |||
| .navbar-item-active { | |||
| border-bottom: 5px solid rgba(201, 210, 215, .4); | |||
| border-bottom: 5px solid rgba(201, 210, 215, 0.4); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SuchitraSwain nit: in the future please try to avoid unrelated changes like this, they make reviews harder
| return ( | ||
| // eslint-disable-next-line jsx-a11y/anchor-is-valid | ||
| <a href={disabled ? undefined : href} className={anchorClass} role='menuitem' title={children}> | ||
| <a href={disabled ? undefined : href} onClick={(e) => e.currentTarget.blur()} className={anchorClass} role='menuitem' title={children}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: in the future explain why things like this are added
for example:
Why this was added:
The navbar highlighting bug fix ensures the correct nav item is highlighted based on the URL. However, after clicking a nav item, it would retain the focus outline (often a blue
ring), creating a "double highlight" effect:
- The active route highlight (from the CSS class)
- The focus outline (from browser focus state)
By blurring on click, only the route-based highlighting remains visible.
## [4.9.0](v4.8.0...v4.9.0) (2025-09-17) CID `bafybeietkqxghs3hm56e3w64s4papqlvvzqzjigs4eyuy24plkpz652fee` --- ### Features * add Agent Version column to peers table ([#2433](#2433)) ([614f30d](614f30d)), closes [ipfs/kubo#9465](ipfs/kubo#9465) [ipfs/js-kubo-rpc-client#342](ipfs/js-kubo-rpc-client#342) [ipfs/kubo#9465](ipfs/kubo#9465) * add close button to file viewer for improved navigation ([#2401](#2401)) ([84969a5](84969a5)) * add diagnostics screen ([#2392](#2392)) ([f3a8179](f3a8179)), closes [#2424](#2424) [ipfs-check#102](ipfs/ipfs-check#102) [/github.com/ipfs/ipfs-check/pull/102#pullrequestreview-3214396503](https://github.com/ipfs//github.com/ipfs/ipfs-check/pull/102/issues/pullrequestreview-3214396503) [#2434](#2434) * **files:** advanced sorting options ([#2421](#2421)) ([c9251eb](c9251eb)) * migrate Tooltip from Javascript to Typescript ([#2381](#2381)) ([dc9e9ac](dc9e9ac)) ### Bug Fixes * create redux-bundler migration helpers ([#2388](#2388)) ([d1fdb87](d1fdb87)) * display UX friendly error for missing files ([#2346](#2346)) ([d4e7fca](d4e7fca)) * **files:** rename in Grid View ([#2422](#2422)) ([e39bce6](e39bce6)) * **i18n:** prevent English replacements in translation sync workflow ([#2418](#2418)) ([323c59e](323c59e)) * macos input focus issue in draggable regions ([#2416](#2416)) ([5382688](5382688)) * migrate error boundary to typescript ([#2402](#2402)) ([b33775a](b33775a)) * **navbar:** highlighting on browser back ([#2425](#2425)) ([cec6dfd](cec6dfd)) * Prevent layout breaks with long filenames in file preview ([#2415](#2415)) ([f82efcd](f82efcd)) * reference to `global` in browser environment ([#2408](#2408)) ([03b2e92](03b2e92)) * shared max for bandwidth chart ([#2426](#2426)) ([cd17032](cd17032)) * typecheck more files ([#2409](#2409)) ([fb967ee](fb967ee)) ### Tests * fix bring-your-own kubo node functionality ([#2396](#2396)) ([0883cfa](0883cfa)) * make e2e tests more robust ([#2438](#2438)) ([3de544b](3de544b)) ### Trivial Changes * **readme:** update links ([dc6f8f4](dc6f8f4)) * remove selectApiUrl selector ([#2412](#2412)) ([d4710e8](d4710e8))
|
🎉 This PR is included in version 4.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes #2423
Navbar.mp4