mirror of
https://github.com/simonw/datasette.git
synced 2026-09-18 22:44:07 +02:00
Keep modal documentation in the JavaScript plugin docs, refs #2790
This commit is contained in:
parent
71600f1c0a
commit
8220413a8a
1 changed files with 0 additions and 13 deletions
|
|
@ -132,19 +132,6 @@ If you are not using ``just``, the equivalent ``uv run`` commands are:
|
|||
uv run --group playwright playwright install chromium
|
||||
uv run --group playwright pytest tests/test_playwright.py --playwright --browser chromium
|
||||
|
||||
.. _contributing_modals:
|
||||
|
||||
Modal dialogs
|
||||
-------------
|
||||
|
||||
Core dialogs use the same ``<datasette-modal>`` component available to plugins. See :ref:`javascript_plugins_modals` for examples, lifecycle methods, dismissal guards and shared styles.
|
||||
|
||||
The implementation lives in ``datasette/static/modal.js`` and ``datasette/static/modal.css``. Dialogs are part of the main document, including those in ``<navigation-search>`` and ``<column-chooser>``. Scope component-specific styles in ``app.css`` to the component or dialog.
|
||||
|
||||
Keep focus restoration, backdrop hit testing, busy-state dismissal guards and the Safari Escape/confirmation workaround in the shared component. Each consumer owns its content, submission logic, discard-confirmation policy and cleanup. In particular, preserve the intentional differences between Cancel and Escape in the editing dialogs.
|
||||
|
||||
Add lifecycle coverage to ``tests/test_playwright.py`` when changing the shared component. Exercise focus restoration, busy state, nested controls consuming Escape, backdrop clicks and disconnect cleanup. Run these checks in Chromium, Firefox and WebKit; keyboard changes should include real confirmation prompts in WebKit.
|
||||
|
||||
.. _contributing_using_fixtures:
|
||||
|
||||
Using fixtures
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue