Strip filtering parameters from URL query within a browser after page is rendered

Aperta
#1,386 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
40/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, rails, ruby
Ambito
frontend

Direzione di ricerca

The payload names no files. Start by finding the Rails pages that apply filters or options from URL query parameters, then check where their JavaScript runs after render. The fix is to call history.pushState with the URL minus its query string on those pages only, leaving pages that need query params untouched. Done means that going back and forward no longer reapplies old filters, and the other pages still keep their parameters. Confirm the exact pages with the maintainers first, since the thread has been silent for about 877 days.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Enhancement Priority: Normal User Interface

Some links in CBRAIN send the user to a page with filters and options applied instantaneously through the use of URL query parameters; when these users move back and forth in their history, these filtering parameters take effect again, confusingly replacing whatever new filters the user has applied since then.

The solution is that whenever a page is rendered with such query params, the page should run at the end this type of javascript to edit the browser's history:

history.pushState(null, "", location.href.split("?")[0]);

We have to be careful not to do that everywhere, there are other pages where query params are OK and need to be preserved.

Lingua principale
Ruby
Stelle
82
Fork
64
Merge medio
6g 13h
PR unite (30g)
36

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aces/cbrain

Tutte le issue di aces/cbrain

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.