-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat: Added Navbar component #6072
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Here are some of my concerns
|
Lighthouse Results
|
TBH, this was bugging me too. As I didn't see the style for the active item in the design file like in the mobile view, I skipped to add it. |
I'd say the NavItem styles are wrong then, as active item with light theme should have white text. I think you can fix these styles directly on NavItem component :) |
I went through the |
But why on the Mobile View Port it works? That's what bugs me k |
Also @Rounak-stha can you check why ActiveLocalizedLink is not working? I think there might be a bug there (I had to change the logic there... The unit tests are passing but they are weird and I don't even know why they are passing 😅 |
Because I am adding those styles from the NavigationBar component (as in design file; right now looks like I kinda forced it) |
Hmm, I think we shouldn't force those styles (active styles) IMO, are they really needed? The pathname checks for ActiveLocalizedLink are fine, and I feel that's how we should also check. I think we can remove the |
- Set Cursor to Pointer on Mobile Item Toggler Label - Remove NavigationBar Dependency on Current NavItem
So on actual usages it works well? I wonder if we can mock next router on storybook so that it returns the path that we want. If you feel like spending tile investigating on that, that's an extra, as it'd be cool to test the active item happy path on storybook (mostly to see if the designs look well) Otherwise, let it be |
Sure. I'll take a look at mocking that data |
Just don't forget about this (@Rounak-stha) > #6072 (comment) (didn't see you giving it a 👍 so maybe you missed that one) |
@Rounak-stha I was able to find the bug with ActiveLocalizedLink on storybook and pushed a fix on So no need for more investigations on your side. |
Yeap, I checked. In the edfault SB state, the The SB nextjs addon should handle the |
wdym?
Yeah, that's how I tested. I had to update the Storybook settings to "enable" the App Router functionality. So working fine now :) |
Honestly speaking, I think there's nothing else blocking us and everything seems to be working! So let's get this merged 🎉 I don't think I've missed anything else and all styles seem correct :) We can leave the "mock" of usePathname for another PR. |
Description
This PR creates
Navbar
component. The figma design is followed and the component is tested visually.Validation
Related Issues
Addresses #6060
Check List
npx turbo lint
to ensure the code follows the style guide. And runnpx turbo lint:fix
to fix the style errors if necessary.npx turbo format
to ensure the code follows the style guide.npx turbo test
to check if all tests are passing.