userVisibleOnly should be standardized to match browser behaviour
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- html
- Área
- documentation
Línea de trabajo
Read the Push API sections linked in the issue: §7 on subscribe, §10.4 on receiving a push message, and §7.2 on subscription options. The issue proposes normative changes and coordination with the Web Notifications spec; first determine whether those changes have been decided. Done means the spec clearly defines userVisibleOnly and user-visible effects, including how user agents should respond when no effect occurs.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The current spec text does not actually require anything relating to user-visible actions, while browsers have all sorts of requirements around this concept. It currently only says this:
The
userVisibleOnlymember, when set totrue, indicates that the push subscription will only be used for push messages whose effect is made visible to the user, for example by displaying a Web Notification.
"indicates that ... will only be used for push messages" suggests that this member is a hint passed from the site to the UA indicating how it intends to behave. Not only doesn't it require any specific action on the UA, it doesn't even suggest that the UA should do anything.
My understanding (based on a private email with @beverloo ) is that some browsers (e.g., Chrome) require userVisibleOnly (effectively making it a de facto requirement that sites set userVisibleOnly), and that many browsers (whether userVisibleOnly is set or not) impose some sort of penalty for sites that do not show a notification when receiving a push (the penalty could be showing a UA-generated notification or unsubscribing from push).
Contrary to that, it is reasonable for a developer reading this spec text to assume that both:
a) They can set userVisibleOnly to false (the default) and then receive pushes without showing a notification, and that
b) If they do set userVisibleOnly to true, it won't actually do anything, so perhaps it's fine to set it to true with the intention of showing a notification, but conditionally deciding not to show a notification in certain situations.
I understand the need to avoid mandating a particular UX in the spec, but I think the spec text could be worded a bit stronger and closer to reality.
How about:
- Mandating that
userVisibleOnlybe set totrue(and note that its existence is a historical artifact). Or even removinguserVisibleOnlywith the assumption that it's true. - Properly defining the set of actions that constitute a "user-visible effect" (at this time, just displaying a Web Notification).
- Suggesting (via a SHOULD requirement) what the user agent should do in the event that the message did not make a "user-visible effect".
In more detail (assuming we won't delete userVisibleOnly for now):
- In §7, "The
subscribemethod", there needs to be an explicit step which rejects the promise ifuserVisibleOnlyisfalse. - A definition of "user-visible effect", possibly creating a "user-visible effect" flag, then adding to the Web Notifications spec "set the user-visible effect" flag.
- In §10.4, after "Then run the following steps in parallel, with dispatchedEvent," a step which checks if a "user-visible effect" was triggered during processing the event, and if not, saying that the user agent SHOULD take some action to either notify the user that non-user-visible pushes are occurring, or prevent future non-user-visible events from happening (for example, showing a notification, or removing the push registration).
- A non-normative summary of this in §7.2 where
userVisibleEffectis described.
This way, the spec creates precise logic for detecting "non-user-visible pushes", and while it doesn't mandate a specific UX response, suggests that the UA take some punitive action in this case.
- Lenguaje dominante
- HTML
- Estrellas
- 158
- Forks
- 43
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de w3c/push-api
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Do we want to allow a subscription from window.pushManager to fire push event for non-DWP messages?Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
Todos los issues de w3c/push-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
SkillsAbiertowayfinder:grilling
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
DigiBanks99/lopen#37 ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
iausathub/satchecker#286 ·
Los mantenedores suelen responder en 1 día
-
help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
LukeSmithxyz/landchad#325 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
jqlang/awesome-jq#66 ·