Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

marcoscaceres
Copy link
Member

In the Explainer:

  • 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

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

  • Removed all references to the document badge API (setClientBadge and clearClientBadge) and updated the explainer to describe only the app badge API (setAppBadge and clearAppBadge). [1] [2] [3]
  • Updated feature detection logic and examples to reflect the removal of the document badge, focusing on checking for navigator.setAppBadge only. [1] [2]

Usage and Examples

  • Rewrote usage examples to demonstrate only app badge usage, including service worker context, and removed all document badge fallback logic. [1] [2] [3]

Design and Rationale

  • Updated the rationale and design questions to reflect the new API scope, clarifying why the API is attached to navigator and why a declarative approach is less suitable for the app API. [1] [2]

Cleanup and Consistency

  • Removed outdated sections and examples related to document badges, such as UI treatment and alternative API designs, and improved consistency in terminology and formatting. [1] [2] [3]

Minor Corrections

  • Fixed minor typos and improved markdown formatting for clarity and accessibility. [1] [2]

This change (choose at least one, delete ones that don't apply):

  • Is a "chore" (metadata, formatting, fixing warnings, etc).

- 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
Copy link

@Copilot Copilot AI left a 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() and clearClientBadge() methods for document badges
  • Updates all usage examples to demonstrate only the app badge API (setAppBadge() and clearAppBadge())
  • 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 to navigator. 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.

@marcoscaceres marcoscaceres merged commit 6b000cf into main Oct 6, 2025
2 checks passed
@marcoscaceres marcoscaceres deleted the simplify-api-to-app-only branch October 6, 2025 16:47
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.

3 participants