Fallback to default client configuration if `requestConfigFromFrame` configuration is invalid
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Segui il percorso di avvio del client che legge requestConfigFromFrame e verifica come vengono convalidati i livelli degli antenati. Riproduci l'avvio diretto di H-VS con un ancestorLevel fuori intervallo, quindi verifica che la configurazione non valida venga ignorata con un avviso nella console, mentre la configurazione avviata tramite LMS continui a funzionare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Mustache
- Stelle
- 743
- Fork
- 227
- Merge medio
- 6m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hypothesis/client
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
hypothesis/client#7592 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
hypothesis/client#7586 ·
-
Common anti-FOUC styling technique hides sidebar with `hypothesis-sidebar {visibility: hidden}`Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
hypothesis/client#7498 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
hypothesis/client#7341 ·
-
accessibility
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
hypothesis/client#7315 ·
Tutte le issue di hypothesis/client
Issue simili
-
code-quality good-first-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenRailAssociation/netzgrafik-editor-frontend#1481 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
seek4science/seek#2784 ·
I maintainer di solito rispondono entro 2 giorni
-
area-clientside-dartpad
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
SACGF/variantgrid#2737 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno