openui / openui/open-ui

[dialog] Declarative indicator for dialog modality

Open
#920 18 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage
Dominant language
MDX
Stars
4.5k
Forks
226
Avg merge
2d 22h
Merged PRs (30d)
4

Description

The invokers proposal is a brilliant addition and really helps solve some of the developer ergonomic issues with dialogs (along with much more).

However, it misses one key case as I mentioned in https://github.com/whatwg/html/issues/3567, you can't have a modal dialog load open with just HTML, you need JS to call showModal() or a user to click an invoker button.

My use case is that I sometimes have modal dialogs that are linked to a client side router where the URL controls their visibility. I currently call .showModal() on component mount. But if I could instead just do this declaratively that would remove the requirement for client JS execution (think SSR scenarios)

<dialog open> works for non-modals but there's no equivalent for modal dialogs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading this issue and the linked discussion in whatwg/html#3567, then review the invokers proposal and the existing

and showModal() behaviors. Done means a standards-level declarative mechanism can represent a modal dialog's initial state, including SSR and URL-controlled visibility, without requiring client-side JavaScript.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.