Skip to content

add modal color and open-on-load visibility - #1526

Open
mvanhorn wants to merge 1 commit into
sqlpage:mainfrom
mvanhorn:fix/1258-modal-visible-color
Open

mvanhorn wants to merge 1 commit into
sqlpage:mainfrom
mvanhorn:fix/1258-modal-visible-color

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Oct 6, 2026

Copy link
Copy Markdown

The modal template and its parameter list now accept color and visible. A modal could not be given a header color, and it stayed closed when the page loaded.

Tests for this live in tests/end-to-end/fixtures/modal/index.sql and tests/end-to-end/fixtures/modal/test.ts.

Fixes #1258

The modal template and its parameter list now accept color and visible.
color applies a Tabler background and the same contrasting foreground
used by a colored toast to the header only, mapping white to the light
foreground and adding text-reset on the title; an empty or omitted color
adds no classes, and the body and footer are left alone. visible sets
data-modal-visible and does not emit a script. Client init then shows
the last marked modal through Bootstrap unless the URL hash already
names a different modal, removes every marker so a later fragment load
does not open an earlier dialog or reopen one the user closed, and
leaves the address unchanged.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'modal' component working like 'popup' component

1 participant