Skip to content

DITA Bootstrap v6 - #103

Draft
jason-fox wants to merge 7 commits into
dita-bootstrap:developfrom
jason-fox:v6
Draft

DITA Bootstrap v6#103
jason-fox wants to merge 7 commits into
dita-bootstrap:developfrom
jason-fox:v6

Conversation

@jason-fox

Copy link
Copy Markdown
Collaborator

The v6 branch modifies the Lunr offline search plugin to integrate the search layout and result rendering with the new Bootstrap 6 components, transitioning from modals to native dialogs and updating color/layout classes.


1. Native <dialog> Integration for Search Results

The search results box has been completely overhauled to use the native HTML5 <dialog> component instead of custom modal mockups:

  • HTML Structure: The results container was converted from a generic article container to a <dialog> element using the Bootstrap 6 dialog utility classes:
    • <dialog class="dialog-lg dialog dialog-scrollable" id="searchDialog">
    • Inner elements changed from .modal-header / .modal-body to .dialog-header / .dialog-body.
    • The dismiss button now uses data-bs-dismiss="dialog".
  • Programmatic Invocation: Added a top-level ESM import for the new Dialog class from Bootstrap and instantiated it to trigger the search box programmatically:
    import { Dialog } from 'bootstrap';
    
    const dialogInstance = new Dialog(dialogElement);
    dialogInstance.show();

2. Navigation Markup Updates (Bootstrap 6 Layouts)

The navigation headers packaged for search compatibility have been adapted to the new Bootstrap 6 component classes and layout rules:

  • Menu Classes: Migrated dropdown triggers and items from the legacy .dropdown-menu / .dropdown-item structure to the new Bootstrap 6 Menu system:
    • data-bs-toggle="dropdown" $\rightarrow$ data-bs-toggle="menu"
    • .dropdown-menu $\rightarrow$ .menu
    • .dropdown-item $\rightarrow$ .menu-item
  • Toggler & Sidebar: The mobile menu toggler now triggers the drawer component using data-bs-toggle="drawer" instead of the previous offcanvas/collapse indicators.
  • Layout Utilities: Refactored responsive classes to align with the new colon-based breakpoint prefix syntax (e.g. d-none lg:d-flex instead of d-none d-lg-flex, and 2xl:container instead of container-2xl).

@jason-fox
jason-fox marked this pull request as draft August 1, 2026 11:58
@jason-fox

Copy link
Copy Markdown
Collaborator Author

There is an issue with the importmap at the moment - this should resolve once the library is available on a CDN

@jason-fox jason-fox added the enhancement New feature or request label Aug 10, 2026
Comment thread README.md
```console
dita install fox.jason.extend.css
dita install org.dita-bootstrap.html
dita install org.dita-bootstrap.lunr

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this the correct dita-ot plugin name? Looking at the dita-ot plugin registry, it should be net.infotexture.dita-bootstrap.lunr. Sorry if I'm misunderstanding something. Thanks :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

org.dita-bootstrap.lunr is an updated plugin name now that this repository lies in its own organisation. net.infotexture.dita-bootstrap.lunr is the old name and location. I've just raised a PR to alias it - dita-ot/registry#175

So yes net.infotexture.dita-bootstrap.lunr works with the registry today, but both should work going forward.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for the clarification!

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants