Repository navigation
fix: resolve navigation memory leaks, component anti-pattern & CSS syntax - #587
Conversation
|
thanks, this is way better and a lot easier to review. the listener fix checks out ( one blocker though: moving giving push that and i'll be glad to green flag this. also small thing: please actually open the site and resize it before saying navigation was verified, this shows up on the very first page load. |
|
Thanks @SunightMC for catching the Geist \Tabs\ registration quirk and providing the exact key solution! I've added \key={\-\}\ to \MenuBar\ and pushed the commit. Also appreciate the note @geeky-lynx, keeping the PR clean. |
|
looks great now, thanks! but one small thing: your PR description got mangled. personally don't see a reason why this couldn't be merged, so green flagging this 👍 |
|
I gotta ask, which LLM model are you using Pranav? |
Sammy99jsp
left a comment
There was a problem hiding this comment.
LGTM. Nice that the listener is cleaned up now, and good job with the functional component.
Summary
Following the feedback on #586 from @SunightMC and @Sammy99jsp, this pull request isolates the core navigation maintenance and memory leak fixes into a small, focused change without touching any copywriting, design direction, or translations.
Changes
dynamic-width.ts:callbackin auseRef(savedCallback) so that callers passing inline arrow functions do not trigger listener removal/re-addition on every render.resizeevent listener once on mount with properremoveEventListenercleanup on unmount.MenuBarinmenu.tsx:MenuBaroutside ofMenuas a standard React functional component with typed props, removing the class-in-function anti-pattern.menu.tsx:.header-dark-tabsCSS declaration with the missing closing brace._app.tsx:data-bs-toggle="collapse") continues to function properly on phones.Verification
npm run buildsucceeds across all 18 routes).