Skip to content

[Code scan] Update report navbar markup for Bootstrap 5 collapse #2450

Description

@njzjz

This issue is a Codex global repository scan finding for deepmodeling/reacnetgenerator at commit 4fa8e2b.

The report template still uses Bootstrap 4 collapse data attributes and spacing classes, while the frontend depends on Bootstrap 5.3.3.

Relevant code:

<button
class="navbar-toggler navbar-toggler-right"
type="button"
data-toggle="collapse"
data-target="#navbarResponsive"
aria-controls="navbarResponsive"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul id="navs" class="navbar-nav ml-auto">

Bootstrap 5 expects data-bs-toggle and data-bs-target; it ignores data-toggle and data-target. It also renamed directional utilities such as ml-auto to logical utilities such as ms-auto.

Impact:

  • the mobile navbar toggler does not open the collapsed nav
  • the time selector and dynamically generated nav entries can become inaccessible on small screens
  • generated reports look functional on desktop but fail in a common mobile/tablet layout

Suggested fix:

Update the template markup for Bootstrap 5, including collapse attributes and spacing classes. Add a lightweight frontend test or Playwright smoke check that verifies the navbar toggler expands #navbarResponsive in a mobile viewport.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjavascriptPull requests that update Javascript codetriage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions