Skip to content

Update the API and content model for supplying actions#43

Merged
domenic merged 3 commits intomasterfrom
api-updates
Jul 4, 2019
Merged

Update the API and content model for supplying actions#43
domenic merged 3 commits intomasterfrom
api-updates

Conversation

@domenic
Copy link
Collaborator

@domenic domenic commented Jul 3, 2019

Closes #11 by providing an initial design for the action option, getter, and setter
Closes #12 by deciding only to accept text; use the innerHTML setter to set HTML.
Closes #21 by settling on a specific content model and chosing the slot="action" attribute pattern.

Closes #11 by providing an initial design for the action option, getter, and setter
Closes #12 by deciding only to accept text; use the innerHTML setter to set HTML.
Closes #21 by settling on a specific content model and chosing the slot="action" attribute pattern.
@domenic domenic requested review from fergald and jackbsteinberg July 3, 2019 18:30
That doesn't work so well in a world with custom elements.
- All children except an action need to be [phrasing content](https://html.spec.whatwg.org/#phrasing-content-2)
that is not [interactive content](https://html.spec.whatwg.org/#interactive-content-2).
These children provide the toast's message.
- There may be zero or one actions,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any accessibility links or arguments that we can add near this section to back up the zero / one choice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have any accessibility arguments for this at this point in time. Although you can imagine some (e.g. if there were a keyboard shortcut), for now I think it's more just about simplicity and "what is a toast"

<std-toast>
<p>Hello world!</p>
<button>Click me!</button>
<std-toast id="toast3">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also a bit confused, are these meant to be the result of the JS below, or just a parallel way of doing it? If the first thing, maybe just add comments above each of the HTML representations matching them to the # of toast in the js, this one has an ID but the others don't. Otherwise it might make sense to move the snippet query selecting this element up next to it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's meant to be parallel, per the "These can equivalently be created via JavaScript:". I'll move the snippet up next to this; let me know if you have other thoughts on how to make it clearer.

that don't fit the above content model,
would require more custom handling on the part of the developer:
would require custom handling on the part of the developer,
as they are stepping outside of the supported use case:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have accessibility backup for why those are the supported ones, or is it just that we want to reduce complexity?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is an accessibility thing, as much as a "what is a toast" thing.

@domenic domenic merged commit 3223700 into master Jul 4, 2019
@domenic domenic deleted the api-updates branch July 4, 2019 03:05
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 11, 2019
Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 11, 2019
Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
aarongable pushed a commit to chromium/chromium that referenced this pull request Jul 11, 2019
Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676482}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 11, 2019
Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676482}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 11, 2019
Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676482}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 24, 2019
Automatic update from web-platform-tests
Create toast action setter

Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676482}

--

wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748
wpt-pr: 17780
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jul 25, 2019
Automatic update from web-platform-tests
Create toast action setter

Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676482}

--

wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748
wpt-pr: 17780
natechapin pushed a commit to natechapin/wpt that referenced this pull request Aug 23, 2019
Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR web-platform-tests#43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676482}
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
Automatic update from web-platform-tests
Create toast action setter

Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinbergchromium.org>
Reviewed-by: Fergal Daly <fergalchromium.org>
Cr-Commit-Position: refs/heads/master{#676482}

--

wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748
wpt-pr: 17780

UltraBlame original commit: e1fec2bf3959430641d7cbd6cc628ba92faaad40
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
Automatic update from web-platform-tests
Create toast action setter

Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinbergchromium.org>
Reviewed-by: Fergal Daly <fergalchromium.org>
Cr-Commit-Position: refs/heads/master{#676482}

--

wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748
wpt-pr: 17780

UltraBlame original commit: e1fec2bf3959430641d7cbd6cc628ba92faaad40
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
Automatic update from web-platform-tests
Create toast action setter

Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinbergchromium.org>
Reviewed-by: Fergal Daly <fergalchromium.org>
Cr-Commit-Position: refs/heads/master{#676482}

--

wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748
wpt-pr: 17780

UltraBlame original commit: e1fec2bf3959430641d7cbd6cc628ba92faaad40
jwidar pushed a commit to jwidar/LatencyZeroGithub that referenced this pull request Sep 16, 2025
Automatic update from web-platform-tests
Create toast action setter

Additionally, this CL adds support for passing Elements
as action in showToast, using the action setter.
This change is the latest in a series of changes implementing
new behavior added to the toast explainer in PR #43
jackbsteinberg/std-toast#43.

Bug: 972945
Change-Id: I46004883cb3b794981029aa02369918dd0077391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786
Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676482}

--

wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748
wpt-pr: 17780
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.

Natively supported pattern discussion showToast() first argument: text or HTML? Handling Toast actions (buttons and links)

3 participants