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

Feature request: Allow additional symbols as the badge value #65

Open
mgiuca opened this issue Jan 10, 2020 · 2 comments
Open

Feature request: Allow additional symbols as the badge value #65

mgiuca opened this issue Jan 10, 2020 · 2 comments
Labels
question Further information is requested

Comments

@mgiuca
Copy link
Collaborator

mgiuca commented Jan 10, 2020

We had an anonymous feature request from the Chrome origin trial feedback:

It would be great to allow a limited set of other characters in the badge - like a + when there is an unknown (not everything yet loaded) or large count to display (e.g. "999+")

Filing an issue to track it, though note that we aren't planning to address this in the first version.

Note that in the original proposal, we allowed any single Unicode character (or, more formally, any grapheme cluster) to be set as the badge value. This feature was dropped because it presented a compatibility risk: some platforms would be able to support certain characters, and others would not. For example, Windows only supports a small set of hand-picked symbols, which do not even necessarily correspond to Unicode characters. There was a risk that browsers implement a hand-picked subset of Unicode characters, and then developers choose to set characters based on that, creating sites that work well on some platforms, and set empty badges on other platforms.

Were we to bring this back, we'd likely hand-pick a small set of symbols that we're sure can be represented on all platforms. Unfortunately, we'd likely be restricted to the lowest common denominator, which is Windows UWP's very restrictive set. It would not be ideal to have a web standard "controlled" by the Windows API. So for the time being, it is probably best to leave this out, until we see a stronger need for it.

@mgiuca mgiuca added the question Further information is requested label Jan 10, 2020
@g-ortuno
Copy link

IIUC we currently don't badge app tiles on Windows so we don't use that API. IIUC we just draw our own badge on top of the taskbar icon. So we should be able to support whatever characters we want. Or are you concerned that if we ever expand support to app tiles then we won't be able to add support for those characters there?

@mgiuca
Copy link
Collaborator Author

mgiuca commented Jan 10, 2020

Yes, Chrome's current implementation on Windows would be able to support any symbols we want.

It's more that if we, or any other browser, wants to implement the API using the UWP API instead of the Windows 7 image-based badge API, they would be restricted by the above. And even though there are currently no such implementations, we don't want to restrict the API such that it is not implementable on UWP.

It is possible that future versions of Windows remove the Windows 7 version of the API (and possibly some restricted Windows devices already have).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants