FolderView Plus ships one theme-aware UI layer on Settings, Docker, VM, Dashboard, and the modern folder editor:
styles/ui.primitives.cssowns visual tokens and thefv-ui-*component classes.scripts/folderviewplus.ui.jsowns rendering and behavior.
FolderViewPlusUI exposes renderers for buttons, icon buttons, badges, disclosures, fields, dropdowns, multiselects, empty states, and loading states. It also exposes managed modal/action-sheet, alert, confirmation, toast, and progress APIs.
Managed dialogs provide dialog semantics, focus trapping, Escape and backdrop policy, nested-modal ordering, body scroll locking, initial focus, live announcements, busy state, and focus restoration. Callers provide content and labels; they do not recreate that behavior.
New static markup should use data-fv-ui-action="name" and register the handler once:
const dispose = FolderViewPlusUI.registerAction('folder-save', ({ trigger, data }) => {
// Run the action.
});Do not add new inline onclick, onchange, or similar attributes. Existing handlers are migrated by surface as those modules are changed.
- Compose
fv-ui-*classes with a surface class when a component needs local layout. - Use theme tokens; do not hard-code dark-mode colors.
- Do not add
!importanttoui.primitives.css. - Keep native focus visible through the shared focus ring.
- Use a tone (
neutral,primary,info,success,warning, ordanger) to communicate meaning. Hover is neutral and does not add an orange fill. - Keep modal width and scrolling owned by the modal primitive. Content modules should not position dialogs.
node scripts/ui_debt_guard.mjs records a downward-only baseline for first-party !important declarations, SweetAlert references, and inline page event handlers. A migration may lower those counts. A change may not increase them or introduce !important into the primitive stylesheet.
Behavior is covered by tests/ui-primitives-contract.test.mjs and the real Chromium fixture in scripts/fixture_browser_tests.mjs.