Change URL behavior (parse the content to the url)

Aperta
#149 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
tooling

Direzione di ricerca

Inizia leggendo l’issue correlata #105 e il Vue SFC playground ReplStore collegato nell’issue. Poi esamina il comportamento attuale dell’URL, del token, degli utenti anonimi e del pulsante di condivisione. Il lavoro è completato quando è stato concordato un round trip da contenuto a URL e viceversa e sono stati chiariti gli effetti sul comportamento esistente della condivisione e dei token.

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

Descrizione

I think it's better to take inspiration from Vue SFC playground.
It seems like it creates a hash for the content, and parse it inside it's ReplStore. See https://github.com/vuejs/core/tree/main/packages/sfc-playground
This will make the link is a Bijective function to the content. Which means that we can create cool stuff like programmatically embed content to the url - like in https://github.com/LinusBorg/slidev-theme-vuetiful/blob/348090dff814bb97f835c2944daaf2fd77552d83/layouts/sfc.vue#L32 - the component embed its content programmatically so the content code is readable before injecting it into the url - and we can extract it from the url. The url get const encoded = window.btoa(JSON.stringify(content)) so we can do the reverse with const decodedString = JSON.parse(window.atob(encoded)).
This may affect the way the URL handles now with tokens and anonymous users and the behavior of the share button will be just to copy the URL instead of saving.
This issue is related to #105

Lingua principale
TypeScript
Stelle
246
Fork
71
Merge medio
5m
PR unite (30g)
6

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 solidjs/solid-playground

Tutte le issue di solidjs/solid-playground

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.