Skip to content
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

Navbar Migration #1931

Merged
merged 2 commits into from May 23, 2022
Merged

Navbar Migration #1931

merged 2 commits into from May 23, 2022

Conversation

akshaaatt
Copy link
Member

@akshaaatt akshaaatt commented Mar 27, 2022

  • Bootstrap imports have been fixed in this PR so that JS can be worked on as well.
  • The navbar broke after switching from version 3 to 5 and hence the necessary fixes have been made.

@akshaaatt akshaaatt requested a review from MonkeyDo March 27, 2022 18:04
@MonkeyDo
Copy link
Contributor

MonkeyDo commented Apr 20, 2022

Finally coming back to this, thanks for your patience !

This is what I see first thing after compiling everything and opening the landing page locally:
Either I'm doing something wrong, or you are :)
Any ideas? Would you mind trying to run it with a fresh local copy?

The collapsible part doesn't collapse, and everything else looks a bit wrong.
image

@MonkeyDo
Copy link
Contributor

Looks like I would need navbar-expand-md instead of -lg for my size screen to have the navbar full-width.
But regardless of my screen size, the navbar looks broken on smaller sizes.

I would also expect that the goal of this PR is to recreate the current navbar, but there are currently lots of changes here from colors to fonts to spacing.
My main review and advice is to aim for reproducing the existing navbar.

@MonkeyDo
Copy link
Contributor

MonkeyDo commented Apr 20, 2022

A thought occurred regarding the non-collapsing navbar: could it be an issue with the JS rather than CSS/HTML?

Edit: no I don't think so, looking at the BS docs, it looks like it's the collapse css property that isn't defined properly

@MonkeyDo MonkeyDo closed this Apr 20, 2022
@MonkeyDo MonkeyDo reopened this Apr 20, 2022
@MonkeyDo
Copy link
Contributor

(Sorry, wrong button !)

Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see it all work!
Thanks for working on this, it's not an easy cycle you've started, good work so far :)

I have a few items of feedback, happy to discuss with you at your convenience:

  1. Navbar dropdowns
    I find the navbar dropdowns too narrow, which results in a lot of unnecessarily wrapping text:

image

Modifying the .dropdown-menu class to have a wider min-width (for example 13rem instead of 10rem) or even using width: max-content; gives the container a bit more width to avoid wrapping text, which results in less space on the page:
image

Considering these changes would have to be done in the design system (IIUC), they don't necessarily need to be done for this PR; I'm sure we will have other css changes to do and it seems somehow wasteful to deploy a new version for a one number change :)

  1. Navbar items hover
    Did we decide to use the orange color as hover color for the menu items?
    I did like that each project's navbar had a bit of flavor each with its own color.
    Similarly, I'm not in love with the gray color of the navbar items' text or the font change, and the hover color should (probably?) be lighter and not darker. Grey/dark gray on orange is not very readable IMO; for comparison here it is with white text:
    image
    image

  2. One last non-navbar related thing: I definitely definitely think the absence of any padding on the page is very jarring and looks like a mistake.

Comment on lines -329 to -355
// Navs
// -------------------------

@nav-link-padding: 10px 15px;
@nav-link-hover-bg: @gray-lighter;

@nav-disabled-link-color: @gray-light;
@nav-disabled-link-hover-color: @gray-light;

@nav-open-link-hover-color: @white;
@nav-open-caret-border-color: #fff;

// Tabs
@nav-tabs-border-color: #ddd;

@nav-tabs-link-hover-border-color: @gray-lighter;

@nav-tabs-active-link-hover-bg: @body-bg;
@nav-tabs-active-link-hover-color: @gray;
@nav-tabs-active-link-hover-border-color: #ddd;

@nav-tabs-justified-link-border-color: #ddd;
@nav-tabs-justified-active-link-border-color: @body-bg;

// Pills
@nav-pills-active-link-hover-bg: @component-active-bg;
@nav-pills-active-link-hover-color: @white;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't seem related to the navbar itself (there are other nav elements like tabs etc.).
I think this results in the tabs looking broken (although I'm guessing we'll also replace those in another PR I gather):
image

listenbrainz/webserver/templates/navbar.html Outdated Show resolved Hide resolved
@MonkeyDo
Copy link
Contributor

Ah, found another couple of issues:

  1. the navbar doesn't seem to collapse in small sizes. the hamburger button doesn't do anything.

  2. in screen sizes between collapsed navbar and full width, the navbar doesn't shrink and some items are hidden behind a horizontal scroll:
    image

Bootstrap imports corrects and navbar.html fixed

Fix navbar implementstaion

Update main.less

Fix Search bar

Fix navbar

Fixed dropdowns
@akshaaatt
Copy link
Member Author

Ah, found another couple of issues:

  1. the navbar doesn't seem to collapse in small sizes. the hamburger button doesn't do anything.
  2. in screen sizes between collapsed navbar and full width, the navbar doesn't shrink and some items are hidden behind a horizontal scroll:
    image

Thank you! All fixed :)

@akshaaatt akshaaatt requested a review from MonkeyDo May 23, 2022 13:54
Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks a lot better, thanks!

There is still one comment from the previous review that is still relevant:
I'm not sure we should be removing the nav-tabs-… and nav-pills-… LESS rules.
Navbar one yes, but nav ones are more general…

<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Explore<span class="caret"></span>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes cursor pointer style on hover:

Suggested change
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button">

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

<a class="dropdown-toggle" data-toggle="dropdown" href="#">
About<span class="caret"></span>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes cursor pointer style on hover:

Suggested change
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button">

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@akshaaatt
Copy link
Member Author

That looks a lot better, thanks!

There is still one comment from the previous review that is still relevant: I'm not sure we should be removing the nav-tabs-… and nav-pills-… LESS rules. Navbar one yes, but nav ones are more general…

Makes sense! Fixed

@akshaaatt akshaaatt requested a review from MonkeyDo May 23, 2022 15:21
@akshaaatt akshaaatt merged commit cc861c2 into bootstrap5 May 23, 2022
@akshaaatt akshaaatt deleted the fix-navbar branch May 23, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants