1
2
Fork
You've already forked userscripts
1

HTML dialog as a notification method #19

Open
opened 2026年04月09日 09:16:45 +02:00 by jacksonchen666 · 3 comments

This has been building over time already in the dialog-box, just adding this into the tracker now.

Originally sparked from a complaint about alert() blocking the web page from doing things, like loading.

Now my goal is to make it function as close to alert() as possible in all ways, doing better when possible.

List of behaviors off the top of my head that must be replicated perfectly correctly or needs more thought:

  • Keyboard shortcuts (space, enter, escape, scrolling keys, that's it maybe?)
    • Space should be a configurable dismiss or scroll, and default to scroll since accidental dismissal is going to be annoying.
    • What would Enter be? It should probably not close when used with keyboard navigation
  • Scrolling (don't transfer scrolling to behind dialog lol)
    • Page up/down scrolling
  • Screen readers (needs external user testing because the only screen reader experience I have is a bit of macOS Voiceover, but current dev state is suboptimal announcing the close button)
  • Probably more that I forgot

Eventual advantages of the dialog box:

  • It's HTML, so things can be turned into clickable links, which is plainly better than having to copy links and pasting them right back into your browser
This has been building over time already in the `dialog-box`, just adding this into the tracker now. Originally sparked from a complaint about `alert()` blocking the web page from doing things, like loading. Now my goal is to make it function as close to `alert()` as possible in all ways, doing better when possible. List of behaviors off the top of my head that must be replicated perfectly correctly or needs more thought: - [ ] Keyboard shortcuts (space, enter, escape, scrolling keys, that's it maybe?) - [ ] Space should be a configurable dismiss or scroll, and default to scroll since accidental dismissal is going to be annoying. - [ ] What would Enter be? It should probably not close when used with keyboard navigation - [ ] Scrolling (don't transfer scrolling to behind dialog lol) - [ ] Page up/down scrolling - [ ] Screen readers (needs external user testing because the only screen reader experience I have is a bit of macOS Voiceover, but current dev state is suboptimal announcing the close button) - Probably more that I forgot Eventual advantages of the dialog box: - It's HTML, so things can be turned into clickable links, which is plainly better than having to copy links and pasting them right back into your browser
jacksonchen666 changed title from (削除) HTML dialog as a notificafion method (削除ここまで) to HTML dialog as a notification method 2026年04月09日 09:19:10 +02:00
Author
Owner
Copy link

Idea: With running multiple checks (to fix the problem of #13), each checks could be split into like headers and then show their own result. That presentation of information should also mean I probably don't have to write special case text for every case of checks run and checks not run.

Idea: With running multiple checks (to fix the problem of #13), each checks could be split into like headers and then show their own result. That presentation of information should also mean I probably don't have to write special case text for every case of checks run and checks not run.
Author
Owner
Copy link

Pushed random changes I had lying around.

Some TODOs I think:

  • Dialog having dual scrollbars when small enough
  • Page down/up scrolling should affect the scrolling container
Pushed random changes I had lying around. Some TODOs I think: - Dialog having dual scrollbars when small enough - Page down/up scrolling should affect the scrolling container
Author
Owner
Copy link

Dumping some thoughts

Idea: Table layout (consistent size for each column of info)

Input handling, and Tridactyl taking the escape key: I'm not sure if taking control of the escape key away from Tridactyl is a good idea. Escape is used for canceling actions in Tridactyl, and it's still (technically) possible to use Tridactyl on a <dialog> box (the CSS for Tridactyl is broken on <dialog>'s though, but that's Tridactyl's problem). If the userscript took priority over Tridactyl, it could lead to the user unexpectedly closing the userscript's alert (either via userscript not giving it to Tridactyl, or escape key being used multiple times). However, I'm still kind of conflicted about this, because I do expect the <dialog> to be closed because I specified an attribute that makes it closed on the escape key, and then it doesn't.

Not sure what the right behavior would be, I think Tridactyl's escape key behavior should remain because of the multiple escape key presses. I'm not the most advanced Tridactyl user (I use it to scroll and click things essentially, not a whole lot else), and kind of expected the escape key to work on the dialog, even though I press the escape key multiple times usually to get rid of whatever mode I'm in for good.

Dumping some thoughts Idea: Table layout (consistent size for each column of info) Input handling, and Tridactyl taking the escape key: I'm not sure if taking control of the escape key away from Tridactyl is a good idea. Escape is used for canceling actions in Tridactyl, and it's still (technically) possible to use Tridactyl on a `<dialog>` box (the CSS for Tridactyl is broken on `<dialog>`'s though, but that's Tridactyl's problem). If the userscript took priority over Tridactyl, it could lead to the user unexpectedly closing the userscript's alert (either via userscript not giving it to Tridactyl, or escape key being used multiple times). However, I'm still kind of conflicted about this, because I do expect the `<dialog>` to be closed because I specified an attribute that makes it closed on the escape key, and then it doesn't. Not sure what the right behavior would be, I think Tridactyl's escape key behavior should remain because of the multiple escape key presses. I'm not the most advanced Tridactyl user (I use it to scroll and click things essentially, not a whole lot else), and kind of expected the escape key to work on the dialog, even though I press the escape key multiple times usually to get rid of whatever mode I'm in for good.
Sign in to join this conversation.
dialog-box
main
navigation-api
dialog-box
dev
ai-files-gitignore-check
github-ai-use-0.4.0
github-ai-use-0.1
github-ai-use-0.1.1
github-ai-use-0.1.2
github-ai-use-0.1.3
github-ai-use-0.1.4
github-ai-use-0.1.5
github-ai-use-0.1.6
github-ai-use-0.1.7
github-ai-use-0.1.8
github-ai-use-0.1.9
github-ai-use-0.1.10
github-ai-use-0.2.0
github-ai-use-0.3.0
github-ai-use-0.3.1
github-ai-use-0.3.2
github-ai-use-0.3.3
Milestone
Clear milestone
No items
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks Depends on
Reference
jacksonchen666/userscripts#19
Reference in a new issue
jacksonchen666/userscripts
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?