Use dioxus-bootstrap-css thoroughly in hero_components #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Wire
hero_componentstodioxus-bootstrap-cssproperly, not as a half-step. The shared Hero admin app must use the crate as the Bootstrap layer: bundled/offline assets, typed Bootstrap components for generic Bootstrap UI, and Dioxus signals for interactive behavior.This issue is only for the
dioxus-bootstrap-css+hero_componentsfoundation. It is not the migration of every service-specific admin UI from home#309.Why
home#309 defines the frontend pattern as Dioxus admin in
hero_components, styled bydioxus-bootstrap-css, zero Bootstrap JavaScript, and offline-first assets. Todayhero_components_appstill loads Bootstrap and Bootstrap Icons from jsDelivr in bothDioxus.tomlandAdminRoot, and much of the app hand-writes Bootstrap component markup (btn,card,alert,badge,form-control,table, icons) instead of using typed wrappers.Design boundary
dioxus-bootstrap-cssowns generic Bootstrap 5.3 components and behaviors.hero_componentsowns Hero-specific composition: shell, islands, logs, process views, router diagnostics, service panes.hero_componentsneeds a generic Bootstrap component/prop/behavior that the crate does not expose, add it indioxus-bootstrap-cssfirst and then consume the pinned crates.io release fromhero_components.py-2,mb-0,d-flex,gap-2,text-secondary, etc.). Raw Bootstrap component widgets are not the target form when a typed crate component exists.Requirements
hero_components_app.dioxus-bootstrap-cssdependency tohero_components_app.BootstrapHead {}once at app root so Bootstrap CSS and icons are bundled/offline.ThemeProviderandThemesignals for dark/light mode instead of manually writingdata-bs-themestring state on local containers.Button,Card,Alert,Badge,Icon,Table,Input,Select,Textarea,ButtonGroup,InputGroup, etc.data-bs-*attributes.Island,Scaffold,TabHead,LogsPanel,ProcessTable,ServiceMenu, diagnostics, and service panes as Hero abstractions, but build their Bootstrap widgets from typed primitives.hero_componentswhen that wrapper belongs indioxus-bootstrap-css.Implementation Plan
Baseline audit
hero_components_appCDN loading inDioxus.tomlandsrc/lib.rs.dioxus-bootstrap-cssgap passhero_components.Foundation wiring in
hero_components_appdioxus-bootstrap-cssdependency.BootstrapHead {}.[web.resource.*].styleCDN entries fromDioxus.toml.Signal<Theme>andThemeProvider.Shared primitive conversion
admin/shell.rs,admin/layout.rs,admin/components/mod.rs, and common router table/status widgets from raw Bootstrap component classes to typed components.Pane conversion sweep
proc,router,aibroker,voice) to typed components where practical in this pass.Table,Input,Select,Textarea,Badge,Button, andIconwhile preserving current behavior.Verification
cargo checkindioxus-bootstrap-css/crates/dioxus-bootstrap.cargo checkinhero_components/crates/hero_components_app.dx build --platform webforhero_components_apporlab build hero_components --restart --installif local Hero services are available./hero_components/admin/and representative service routes throughhero_router: fleet console,?service=hero_proc, and at least one non-proc service if discovered.Acceptance Criteria
hero_components_apphas no jsDelivr Bootstrap or Bootstrap Icons runtime dependency.BootstrapHead {}is the only Bootstrap asset loader in the app root.ThemeProvidercontrols Bootstrap theme via aSignal<Theme>.new bootstrap.*, or behavior-drivingdata-bs-*attributes are introduced.dioxus-bootstrap-csscomponents for generic Bootstrap widgets.dioxus-bootstrap-css, not ad hoc inhero_components.class.Notes
The goal is not to delete every
class:attribute. The goal is to eliminate raw Bootstrap component markup when the crate owns a typed equivalent, while preserving Hero-specific layout components and normal Bootstrap utility-class usage.Progress update:
Implemented the safe foundation for the Dioxus Bootstrap integration:
Verification:
Important remaining work before this issue should be called complete:
Checkpoint update:
Verification:
Outstanding caveat:
Strict Bootstrap/Dioxus pass completed.
What changed:
hero_components_appnow usesBootstrapHead/ThemeProviderand localdioxus-bootstrap-css 0.5.2by path dependency.terminal_app.jsno longer injects Bootstrap HTML/classes. It now stays limited to terminal/session orchestration: xterm/PTTY lifecycle, panes, WebSocket attach/detach, session tree rendering, keyboard shortcuts, context coordinates, and event/state bridge to Dioxus.dioxus-bootstrap-css 0.5.2now includes the typed API gaps needed by this integration: form key/change handlers/min/max/autocomplete,Button::link,Badge::onclick,Checkbox::input_id,Checkbox::onclick, forwardedIconattributes, and standaloneDropdownMenu.Verification:
hero_components_app/src(btn btn,alert alert,dropdown-*,list-group,form-check*,btn-close,bi bi-*,data-bs-*, CDN refs,window.bootstrap, old modal helpers).cargo +1.96 check -qinhero_components_app: pass, existing warnings only.dx build --platform web --release --debug-symbols false: pass, exit 0. The existing dx 0.7.3 / Dioxus 0.7.9 compatibility banner still prints, but the bundle completes.cargo +1.96 test -qindioxus-bootstrap-css: pass, 10 tests plus 55 doctests passed, 7 doctests ignored.cargo +1.96 publish --dry-run --allow-dirty: pass fordioxus-bootstrap-css 0.5.2.Remaining release steps:
dioxus-bootstrap-css 0.5.2.hero_components_appfrom local path dependency to registry0.5.2after publish.Done.
dioxus-bootstrap-css:0.5.2is on crates.io.development_input_key_eventsat375ece3.v0.5.2.v0.5.2; it verified tag/version parity, detected crates.io already had0.5.2, skipped the publish step, and created the release: https://github.com/mik-tf/dioxus-bootstrap-css/releases/tag/v0.5.2hero_components:development_dioxus_bootstrap_cssat5943a30.hero_components_appnow uses registry dependencydioxus-bootstrap-css = "0.5.2", no local path.Dioxus.tomland app code.BootstrapHead/ThemeProviderload Bootstrap CSS/icons from the crate assets.hero_componentskeeps product shell/layout primitives.Validation passed:
dioxus-bootstrap-css:cargo +1.96 fmt --all -- --check,cargo +1.96 test -q,cargo +1.96 publish --dry-run --allow-dirty,git diff --check.hero_components_app:cargo +1.96 fmt --all -- --check,cargo +1.96 check -q, terminal JS parse including vendored xterm files, strict no-CDN/no-Bootstrap-JS scans,dx build --platform web --release --debug-symbols false, static Chromium DOM/screenshot smoke.Signed-by: mik-tf mik-tf@noreply.invalid
PRs opened for merge review:
hero_components: #3dioxus-bootstrap-css: https://github.com/mik-tf/dioxus-bootstrap-css/pull/39Both are left unmerged pending explicit go-ahead.
Signed-by: mik-tf mik-tf@noreply.invalid
Follow-up on
dioxus-bootstrap-cssPR CI:0when those images did not load in CI.3d932b8to make showcase media assets deterministic with inline SVG data images. Thev0.5.2release tag remains on375ece3; it was not moved.Signed-by: mik-tf mik-tf@noreply.invalid
Merged PR #3 into
developmentwith squash commit7a51d5b.Next verification session should run the live
hero_routerworkflow pass we discussed: router services/playground/diagnostics, proc processes/jobs/terminal, AI broker, and voice. Code-level Bootstrap ownership and static smoke are already complete; live workflow verification remains the acceptance pass.Signed-by: mik-tf mik-tf@noreply.invalid