Skip to content

Group navbar tabs into dropdown menus for improved navigation#209

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/group-navbar-tabs-into-dropdowns
Draft

Group navbar tabs into dropdown menus for improved navigation#209
Copilot wants to merge 3 commits intomasterfrom
copilot/group-navbar-tabs-into-dropdowns

Conversation

Copy link

Copilot AI commented Dec 16, 2025

The top navigation bar contained 20+ flat links causing visual clutter and poor discoverability. This groups related links into three logical dropdown menus while preserving all destinations.

Changes

Navigation Structure

  • Grouped 12 links into 3 dropdowns:
    • Apps: Pharmmaker, coMD, ESSA, CryoDy, ClustENMD, InSty, WatFinder, Scipion
    • Learn: Tutorials, Workshops
    • Resources: Downloads, Statistics
  • Preserved 8 individual links: ProDy, Evol, NMWiz, SignDy, membrANM, MechStiff, PRS, DruGUI
  • Search form remains right-aligned

Bootstrap Compatibility

  • Replaced Bootstrap 3.3.6 CDN with local Bootstrap 2.x JS to match existing Bootstrap 2.3.1 CSS
  • Applied Bootstrap 2 dropdown markup: li.dropdown > a.dropdown-toggle[data-toggle="dropdown"] > ul.dropdown-menu

Interaction & Accessibility

  • Dropdowns open via click (Bootstrap JS), hover (CSS), and keyboard focus (focus-within)
  • Added aria-haspopup="true", aria-expanded="false", and role="menu" attributes

Example

<li class="dropdown">
  <a class="dropdown-toggle" data-toggle="dropdown" href="#" 
     aria-haspopup="true" aria-expanded="false">
    Apps <b class="caret"></b>
  </a>
  <ul class="dropdown-menu" role="menu">
    <li title="Pharmmaker"><a href="{{ pathto('pharmmaker', 1) }}">Pharmmaker</a></li>
    <!-- ... -->
  </ul>
</li>

Screenshots

Apps dropdown expanded:
Apps Dropdown

Learn dropdown expanded:
Learn Dropdown

Original prompt

Goal
Group the top navigation tabs into logical dropdown categories in the site navbar, using existing Bootstrap (v2.x) styles already present in the repo, without removing or renaming any destinations. Keep the right-aligned search form intact. This improves organization and discoverability of many top-level links.

Context

  • Repo: prody/ProDy-website
  • The current top navigation is defined in _template/index.html as a flat list of <li> items (Pharmmaker, coMD, ESSA, CryoDy, ClustENMD, InSty, WatFinder, Scipion, Downloads, Tutorials, Workshops, Statistics, plus a right-aligned search form).
  • The site ships with Bootswatch United CSS for Bootstrap 2 (_static/css/bootswatch-united.css) and custom CSS (_static/css/prodydocs.css) that already include navbar and dropdown menu styling.
  • Page-local nav tabs (e.g., in _template/downloads.html) are unrelated and should not be changed.

Requirements

  1. Update _template/index.html to convert the existing flat top nav into three dropdown groups:

    • "Apps": Pharmmaker, coMD, ESSA, CryoDy, ClustENMD, InSty, WatFinder, Scipion
    • "Learn": Tutorials, Workshops
    • "Resources": Downloads, Statistics
      Keep the search form as a right-aligned item (li.pull-right) exactly as-is.
  2. Use Bootstrap 2 navbar dropdown markup:

    • li.dropdown > a.dropdown-toggle[data-toggle="dropdown"] with a nested ul.dropdown-menu
    • Preserve existing title attributes and {{ pathto(...) }} Jinja calls for each link.
  3. Do not change the destinations, slugs, or search form action/inputs.

  4. Accessibility: add role="menu" to dropdown menus and aria-haspopup="true" to toggles. This is optional in Bootstrap 2 but improves semantics.

  5. Ensure the dropdowns work with the current JS includes. If Bootstrap dropdown JS is not already included globally, add it in the appropriate base template include used by _template/index.html so that click-to-open works. Do not downgrade or change framework versions; only include the necessary Bootstrap 2 dropdown behavior if missing.

  6. (Optional, non-blocking) Add CSS to enable hover-to-open on non-touch devices for better discoverability:
    In _static/css/prodydocs.css, append:

    .navbar .dropdown:hover .dropdown-menu { display: block; }

    This should not break click behavior.

File changes

  • _template/index.html: Replace the existing top-level <ul class="nav"> ... </ul> block that contains the nav links with the grouped dropdown structure below. Do not alter surrounding layout or the right-aligned search form.

Proposed replacement for the nav list in _template/index.html:

(Optional) CSS addition to _static/css/prodydocs.css at the end of the file:

/* Show dropdowns on hover as well as click */
.navbar ...

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 16, 2025 19:28
…ources

Co-authored-by: AnthonyBogetti <34397256+AnthonyBogetti@users.noreply.github.com>
Co-authored-by: AnthonyBogetti <34397256+AnthonyBogetti@users.noreply.github.com>
Copilot AI changed the title [WIP] Update site navbar to use dropdown categories Group navbar tabs into dropdown menus for improved navigation Dec 16, 2025
Copilot AI requested a review from AnthonyBogetti December 16, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments