Fallback to default client configuration if `requestConfigFromFrame` configuration is invalid
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
Sigue la ruta de inicio del cliente que lee requestConfigFromFrame e inspecciona cómo se validan los niveles de los ancestros. Reproduce el lanzamiento directo de H-VS con un ancestorLevel fuera de rango y, después, verifica que la configuración no válida se ignore con una advertencia en la consola, mientras que la configuración iniciada mediante LMS siga funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The Hypothesis white-label VitalSource book reader at https://hypothesis.vitalsource.com is configured for use inside the Hypothesis LMS app. To enable the Hypothesis client to talk to our LMS app, the book reader frame that loads the client sets the requestConfigFromFrame key:
// `window.hypothesisConfig` function in the iframe where the client is loaded
function () {return {requestConfigFromFrame: {origin: "https://lms.hypothes.is",ancestorLevel: 3},openSidebar: true};} = $1
If you try to access a book at https://hypothesis.vitalsource.com directly, the client fails to load due to this configuration. It logs this error on startup:
The preferred solution here would be that https://hypothesis.vitalsource.com changes the Hypothesis client configuration depending on whether it was launched by our LMS app or not:
- When launched by our LMS app, the H-VS book reader should use the above configuration
- Otherwise, the H-VS reader should omit the
requestConfigFromFramekey
As a fallback we can implement purely on our side, ignore the requestConfigFromFrame configuration with a console warning if it is invalid (eg. specifies that the configuration should be retrieved from the ancestor N levels up the frame tree, and N is greater than the number of ancestors). The console warning is important in case the code path ever ends up getting executed when it shouldn't be.
- Lenguaje dominante
- Mustache
- Estrellas
- 743
- Forks
- 227
- Merge medio
- 6 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 hypothesis/client
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
hypothesis/client#7592 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
hypothesis/client#7586 ·
-
Common anti-FOUC styling technique hides sidebar with `hypothesis-sidebar {visibility: hidden}`Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
hypothesis/client#7498 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
hypothesis/client#7341 ·
-
accessibility
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
hypothesis/client#7315 ·
Todos los issues de hypothesis/client
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
SACGF/variantgrid#2737 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug frontend ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
Los mantenedores suelen responder en 1 día
-
Choosing a folder while continuing an Antigravity session submits a history fork the runtime rejectsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
swombat/souls-house#842 ·
Los mantenedores suelen responder en 1 día