-
Notifications
You must be signed in to change notification settings - Fork 12
Chore: Simplify Badging API to app-only scope #126
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
Conversation
- Remove navigator.setClientBadge() and clearClientBadge() methods - Remove document/tab badging functionality and examples - Focus API exclusively on app badging with setAppBadge()/clearAppBadge() - Update usage examples to demonstrate app badging only - Simplify feature detection section - Remove references to dual API approach - Update design questions to reflect app-only focus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies the Badging API explainer by removing the document/tab badging functionality and focusing exclusively on app-level badging. The changes streamline the API surface from a dual API approach to a single app-only API.
- Removes all references to
setClientBadge()
andclearClientBadge()
methods for document badges - Updates all usage examples to demonstrate only the app badge API (
setAppBadge()
andclearAppBadge()
) - Simplifies feature detection and removes fallback logic for document badges
Comments suppressed due to low confidence (1)
explainer.md:416
- The section heading references
navigator
but there's no corresponding section content explaining why the API is attached tonavigator
. This creates a broken anchor link and leaves the design decision unexplained.
### Why is this API attached to `navigator` instead of `window` or `notifications`?
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
In the Explainer:
This pull request refactors the Badging API explainer to simplify the API surface, remove the document badge functionality, and clarify the API's scope and usage. The changes focus the explainer on the app badge API, update usage examples, and clean up outdated references and feature detection logic. The result is a clearer, more concise document that describes only the app-level badging API.
API Surface and Scope Simplification
setClientBadge
andclearClientBadge
) and updated the explainer to describe only the app badge API (setAppBadge
andclearAppBadge
). [1] [2] [3]navigator.setAppBadge
only. [1] [2]Usage and Examples
Design and Rationale
navigator
and why a declarative approach is less suitable for the app API. [1] [2]Cleanup and Consistency
Minor Corrections
This change (choose at least one, delete ones that don't apply):