From ef8bd5fc0093544ff72d43a4413d7498f39848de Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Wed, 10 Sep 2025 14:53:53 +1000
Subject: [PATCH 1/2] chore: export badge value types
---
index.html | 51 +++++++++++++++++++++++++++------------------------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/index.html b/index.html
index cad17e1..886165b 100644
--- a/index.html
+++ b/index.html
@@ -137,25 +137,27 @@
of information, such as an unread count.
- A [=badge=] can have one of the following values:
+ A [=badge=] can have one of the following values:
-
- The special value "nothing":
+ The special value "nothing":
-
Indicates that there is no badge currently [=badge/set=].
-
- The special value "flag":
+ The special value "flag":
-
Indicates that the badge is [=badge/set=], but contains no specific
value.
-
- A number value:
+ A number value:
-
Indicates that the badge is [=badge/set=] to a numerical value
@@ -164,11 +166,12 @@
An [=installed web application=] has an associated [=badge=], which is
- initialized to [="nothing"=].
+ initialized to [=badge/"nothing"=].
- The user agent MAY (re)[=set=] an application's badge to [="nothing"=]
- at its discretion (for example, following system conventions).
+ The user agent MAY (re)[=set=] an application's badge to
+ [=badge/"nothing"=] at its discretion (for example, following system
+ conventions).
@@ -190,37 +193,37 @@
"[=notifications=]" permission.
- When the [=badge=] is [=badge/set=] to [="flag"=], the [=user agent=]
- or operating system SHOULD display an indicator with a non-specific
- symbol (for example, a colored circle).
+ When the [=badge=] is [=badge/set=] to [=badge/"flag"=], the [=user
+ agent=] or operating system SHOULD display an indicator with a
+ non-specific symbol (for example, a colored circle).
- When a [=badge=]'s value is [=badge/set=] to [="nothing"=], the [=user
- agent=] or operating system SHOULD clear the [=badge=] by no longer
displaying it.
- When the [=badge=] is [=badge/set=] to a [=number=], the [=user agent=]
- or operating system:
+ When the [=badge=] is [=badge/set=] to a [=badge/number=], the [=user
+ agent=] or operating system:
- SHOULD format and display the number according to the user's font
and formatting preferences. For example, as a number in a circle on top
of the application's icon on the home screen on a device.
- - MAY simplify or degrade a badge's [=number=] [=badge/value=] in any
- way that matches the platform's conventions for representing numbers in
- a badge. For example, a platform might choose to display a badge with a
- value of '100' as '99+'.
+
- MAY simplify or degrade a badge's [=badge/number=] [=badge/value=]
+ in any way that matches the platform's conventions for representing
+ numbers in a badge. For example, a platform might choose to display a
+ badge with a value of '100' as '99+'.
- SHOULD localize the number according to the user's locale
preferences. For example, the [=badge/value=] '7' should be displayed
as '7' in the locale 'en' (English) but as '٧' in 'ar' (Arabic).
- - MAY treat a [=number=] [=badge/value=] as [="flag"=], or whatever
- representation is most appropriate for the platform, if the platform
- does not support displaying [=numbers=] in a [=badge=].
+
- MAY treat a [=badge/number=] [=badge/value=] as [=badge/"flag"=],
+ or whatever representation is most appropriate for the platform, if the
+ platform does not support displaying [=badge/numbers=] in a [=badge=].
@@ -309,13 +312,13 @@
|contents| was not passed:
- [=badge/Set=] |badge| to [="flag"=].
+ [=badge/Set=] |badge| to [=badge/"flag"=].
|contents| is 0:
- [=badge/Set=] |badge| to [="nothing"=].
+ [=badge/Set=] |badge| to [=badge/"nothing"=].
|contents|:
From a746aa5a1e17e71f1d5d6fd0ecad7279fac4d065 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
Date: Wed, 10 Sep 2025 14:56:49 +1000
Subject: [PATCH 2/2] Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 886165b..64d88a8 100644
--- a/index.html
+++ b/index.html
@@ -157,7 +157,7 @@
value.
- A number value:
+ A number value:
Indicates that the badge is [=badge/set=] to a numerical value