Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog processing model has gotten disorganized #10963

Open
domenic opened this issue Jan 30, 2025 · 0 comments
Open

Dialog processing model has gotten disorganized #10963

domenic opened this issue Jan 30, 2025 · 0 comments
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project topic: dialog The <dialog> element

Comments

@domenic
Copy link
Member

domenic commented Jan 30, 2025

What is the issue with the HTML Standard?

https://html.spec.whatwg.org/#the-dialog-element has grown organically over time and has gotten a bit disorganized. This issue proposes rearranging some of its content, with no additions or removals, to make the structure clearer.

Current structure:

  • Discussion of dialogs and some examples
  • Definition of content attributes
  • domintro block for API
  • Concept: dialog toggle task tracker
  • Algorithm: queue a dialog toggle even ttask
  • Methods: show() and showModal()
  • Algorithms: set the dialog close watcher, computed closed-by state, dialog focusing steps
  • HTML element removing steps (plus, after Add attribute changed steps to dialog element #10954, attribute changed steps)
  • Methods: close(), requestClose()
  • Algorithm: close
  • Property: returnValue
  • Note discussing the show/close verbs
  • Concepts: dialog pointerdown target, close watcher, request close return value, enable close watcher for requestClose(), is modal, previously focused element
  • Properties: closedBy, open
  • Example of using the dialog element with strong

Suggested reordering:

  • Discussion of dialogs and some examples
    • Move the bottom "example of using the dialog element with strong" to here
  • <hr>?
  • Definition of content attributes, and things related to them like conformance requirements and the note about about open="" misuse
  • <hr>
  • domintro block for API
  • Methods: show(), showModal(), close(), requestClose()
  • Note discussing the show/close verbs
  • Properties: returnValue, closedBy, open
  • <hr>
  • Concepts: all of them go here. Arrange them by the object that owns them (e.g. Document vs. dialog element vs. all HTML elements)
  • <hr>?
  • Algorithms: all algorithms go here. Consider putting "more important" algorithms earlier.
@domenic domenic added clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project topic: dialog The <dialog> element labels Jan 30, 2025
domenic pushed a commit that referenced this issue Jan 31, 2025
This keeps the "strong" example together with the other examples. Part of #10963.
domenic pushed a commit that referenced this issue Jan 31, 2025
…odal()

This groups together all the methods of the HTMLDialogElement class. Part of #10963.
domenic pushed a commit that referenced this issue Jan 31, 2025
This groups all the properties (returnValue, closedBy, and open) together. Part of #10963.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project topic: dialog The <dialog> element
Development

No branches or pull requests

1 participant