Skip to content
New issue

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

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

Already on GitHub? # to your account

Always limit the maximum number of actions to 2 #232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Feb 28, 2025

Closes #110

  • At least two implementers are interested (and none opposed):
    • Gecko
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: (N/A, actions are not supported yet)
    • WebKit: (N/A, actions are not supported yet)
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@@ -258,8 +259,10 @@ important information through, e.g., loss of color or clipped corners.
<li><p>Set <var>notification</var>'s <a for=notification>actions</a> to « ».

<li>
<p>For each <var>entry</var> in <var>options</var>["{{NotificationOptions/actions}}"], up to the
<a>maximum number of actions</a> supported (skip any excess entries):
<p>Let |actions| be a [=list=] of initial maximum two items from
Copy link
Member Author

@saschanaz saschanaz Feb 28, 2025

Choose a reason for hiding this comment

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

This is my best effort to make a sublist without actual corresponding infra term. Filed whatwg/infra#666.

I wonder we should throw instead for excess items, though.

@annevk
Copy link
Member

annevk commented Mar 1, 2025

I think not having maxActions is an improvement, but I'm not sure we should make the call what the maximum is going to be forever. That seems too early days.

@saschanaz
Copy link
Member Author

Not sure we can remove maxActions without saying actual max value?

@saschanaz
Copy link
Member Author

So the options are:

  1. have the spec say the specific number, or
  2. have maxActions but define it as "implementation defined, but should not depend on system limitation" (so that authors would have a way to detect UA-specific differences instead of having to do UA sniffing), or
  3. do not allow the callers to get any actual max value and still allow differences by system limitation (this would the most confusing option and would force authors to do heavy UA sniffing)

1 is my current preference for best simplicity.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Consider removing maxActions
2 participants