Converter: emit NavbarNav for Bootstrap navbar lists #2

Closed
opened 2026-06-23 16:46:20 +00:00 by mik-tf · 1 comment
Owner

Context

dioxus-bootstrap-css 0.5.4 added NavbarNav, the typed Dioxus wrapper for Bootstrap's .navbar-nav list inside NavbarCollapse.

The migration converter should now preserve that Bootstrap structure without leaving a raw ul { class: "navbar-nav" } in converted RSX.

Desired behavior

Convert static navbar list markup to typed dbcss components:

  • <ul class="navbar-nav"> -> NavbarNav { ... }
  • <ul class="navbar-nav navbar-nav-scroll"> -> NavbarNav { scroll: true, ... }
  • Preserve extra utility classes through class, for example ms-auto.
  • Keep the existing converter rule: deterministic static cases should convert, dynamic or ambiguous class strings should be flagged for manual review instead of guessed.

Acceptance criteria

  • Migration fixtures cover base .navbar-nav, .navbar-nav-scroll, and extra utility classes.
  • npm run test:migrate passes.
  • npm run lint:bootstrap still passes against examples.

Signed-by: mik-tf mik-tf@noreply.invalid

## Context `dioxus-bootstrap-css` 0.5.4 added `NavbarNav`, the typed Dioxus wrapper for Bootstrap's `.navbar-nav` list inside `NavbarCollapse`. The migration converter should now preserve that Bootstrap structure without leaving a raw `ul { class: "navbar-nav" }` in converted RSX. ## Desired behavior Convert static navbar list markup to typed dbcss components: - `<ul class="navbar-nav">` -> `NavbarNav { ... }` - `<ul class="navbar-nav navbar-nav-scroll">` -> `NavbarNav { scroll: true, ... }` - Preserve extra utility classes through `class`, for example `ms-auto`. - Keep the existing converter rule: deterministic static cases should convert, dynamic or ambiguous class strings should be flagged for manual review instead of guessed. ## Acceptance criteria - Migration fixtures cover base `.navbar-nav`, `.navbar-nav-scroll`, and extra utility classes. - `npm run test:migrate` passes. - `npm run lint:bootstrap` still passes against examples. Signed-by: mik-tf <mik-tf@noreply.invalid>
Author
Owner

Implemented in 16c4779.

Changes:

  • Converter now maps static ul { class: "navbar-nav" } to NavbarNav.
  • navbar-nav-scroll becomes scroll: true.
  • Residual utility classes, such as ms-auto, are preserved through class.
  • Added migration fixtures covering base navbar lists, scroll lists, and extra utility classes.
  • Updated the raw-Bootstrap migration gate to reject navbar-nav and navbar-nav-scroll now that the typed surface exists.

Validation:

  • npm run test:migrate passed.
  • npm run lint:bootstrap passed.
  • Direct raw-gate check rejects raw navbar-nav navbar-nav-scroll.
  • Dynamic conditional navbar class strings still produce manual-review warnings.
  • Forge Actions run 17 succeeded: MSRV 1.85 and Check/lint/format.

Signed-by: mik-tf mik-tf@noreply.invalid

Implemented in `16c4779`. Changes: - Converter now maps static `ul { class: "navbar-nav" }` to `NavbarNav`. - `navbar-nav-scroll` becomes `scroll: true`. - Residual utility classes, such as `ms-auto`, are preserved through `class`. - Added migration fixtures covering base navbar lists, scroll lists, and extra utility classes. - Updated the raw-Bootstrap migration gate to reject `navbar-nav` and `navbar-nav-scroll` now that the typed surface exists. Validation: - `npm run test:migrate` passed. - `npm run lint:bootstrap` passed. - Direct raw-gate check rejects raw `navbar-nav navbar-nav-scroll`. - Dynamic conditional navbar class strings still produce manual-review warnings. - Forge Actions run 17 succeeded: MSRV 1.85 and Check/lint/format. Signed-by: mik-tf <mik-tf@noreply.invalid>
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/dioxus-bootstrap-css#2
No description provided.