Skip to content

feat: dropdown for navigation bar #723

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

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

Revathyvenugopal162
Copy link
Contributor

@Revathyvenugopal162 Revathyvenugopal162 commented Jun 5, 2025

In this PR:
This PR introduces support for a dropdown list in the navigation bar, allowing users to enable this option if desired.

  • Added theme options to support a dropdown navigation bar
  • Created the corresponding HTML layout
  • Styled the title bar for visual consistency
  • Updated the documentation to reflect the new option

Images

Images included below to showcase the updated navigation bar and dropdown functionality.
Screenshot 2025-06-27 at 13 38 32
Screenshot 2025-06-27 at 13 38 39

@github-actions github-actions bot added enhancement General improvements to existing features ui/ux Related with UI/UX design labels Jun 5, 2025
@github-actions github-actions bot added the ci Pipelines maintenance related label Jun 18, 2025
@github-actions github-actions bot added the docs Issues related to documentation label Jun 26, 2025
raise ValueError(f"Error parsing YAML file '{navigation_yaml_file}': {exc}")


NavEntry = Dict[str, Union[str, List["NavEntry"]]]
Copy link
Member

Choose a reason for hiding this comment

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

Let's add a docstring for this so we remember its goal.

Copy link
Member

@jorgepiloto jorgepiloto left a comment

Choose a reason for hiding this comment

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

Thanks for adding this feature, @Revathyvenugopal162. I left some suggestions.

@Revathyvenugopal162 Revathyvenugopal162 marked this pull request as ready for review June 27, 2025 11:42
@Revathyvenugopal162 Revathyvenugopal162 requested a review from a team as a code owner June 27, 2025 11:42
Copy link
Contributor

@germa89 germa89 left a comment

Choose a reason for hiding this comment

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

I don't think I am qualified to review this PR (at all), but I did enjoy doing it.

So feel free to discard all my comments.

Other than that, it looks like a great addition. If I were you I would consider it to port it to the upstream packages.

Good job!

divs = li.find_all("div", {"class": "navbar-dropdown"}, recursive=False)
if divs:
ref = li.find("div", {"class": "ref-container"})
ref.append(soup.new_tag("i", attrs={"class": "fa-solid fa-chevron-down"}))
Copy link
Contributor

Choose a reason for hiding this comment

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

I like that the chevrons have their class, so it is easier to customise it through CSS files.
I wonder if you have set an specific class name for the items in each dropdown, so we can do something similar (or use bs4 easily on them).

Copy link
Contributor Author

@Revathyvenugopal162 Revathyvenugopal162 Jul 1, 2025

Choose a reason for hiding this comment

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

yes, We have the specific container for navbar-dropdown as you can see in the line L#131.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Pipelines maintenance related docs Issues related to documentation enhancement General improvements to existing features ui/ux Related with UI/UX design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants