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

feat: Remove interrupt and update priority’s values to align with latest spec #10

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

Conversation

smockle
Copy link
Contributor

@smockle smockle commented Feb 19, 2025

Fixes #9

@Copilot Copilot bot review requested due to automatic review settings February 19, 2025 12:59
@smockle smockle requested a review from a team as a code owner February 19, 2025 12:59

Choose a reason for hiding this comment

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

PR Overview

This PR removes the interrupt functionality and updates the priority values from the legacy spec ("important"/"none") to the latest spec ("high"/"normal"). Key changes include:

  • Removal of the interrupt property, its associated getter, and related code in the Message class.
  • Updates to the priority type and default value in the Message class and the ariaNotify method.
  • Adjustments in the enqueue method for inserting messages according to the new "high" priority.

Changes

File Description
ariaNotify-polyfill.js Removed interrupt support and updated priority values in accordance with the latest spec.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

ariaNotify-polyfill.js:37

  • The 'matches' method has been removed along with interrupt-based comparisons. Please ensure that any message equivalence or queue filtering logic relying on this method is refactored appropriately according to the new spec.
matches(message) {

ariaNotify-polyfill.js:169

  • The interrupt parameter has been removed from the 'ariaNotify' method. Please double-check that all callers and any related tests or downstream logic have been updated to work with the new priority-only design.
Element.prototype["ariaNotify"] = function ( message, { priority = "normal" } = {} ) {

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

Looks great!

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.

Update polyfill to align with v1 implementations
3 participants