Discussion: Reconsider the route/template structure for donate and thank-you
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Esamina la struttura indicata di project.hbs e project/{index,settings,tasks,donate,thank-you}.hbs, concentrandoti sul layout duplicato e sull’azione joinProject del componente project-details. Leggi la documentazione dell’hook renderTemplate di Ember e confronta le tre opzioni di routing nell’issue. Il lavoro è completato quando viene selezionata e documentata una struttura di route/layout che eviti il codice di layout duplicato e assegni all’azione un responsabile chiaro.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Right now, our route structure is as follows:
project.hbs
project/
index.hbs
settings.hbs
tasks.hbs
donate.hbs
thank-you.
project.hbs is just an {{outlet}}. index, settings and tasks share most of the same layout, but the code needs to be duplicated because donate and thank-you have a completely different layout.
This is somewhat confusing by itself. An additional, unfortunate side-effect is that the index, settings and tasks share the same project-details component, which internally, defines a joinProjectaction. This action can't be handled at route level, because it's used in 3 different routes. Instead, right now, it's handled by the component internally.
I'm really not sure what the best architecture here is, but it doesn't feel right. I think project.hbs should have the outlet for the varying content, but it should also have the default project layout components such as the header, etc. The subroutes should either share the layout or not be subroutes, or we should find a third way to render it.
That means that our options are either:
donateandthank-youshould not be part of the project route structure.donateandthank-youcan be part of the project route structure, but should then share the project layout- we should add a named outlet to our application route. "Layoutless" routes such as
donateandthank-youshould render directly into this named outlet. This gives us an explicit way to specify a route as layoutless. We could use the route'srenderTemplatehook to achieve this behavior
- Lingua principale
- JavaScript
- Stelle
- 120
- Fork
- 75
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
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 code-corps/code-corps-ember
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
code-corps/code-corps-ember#1616 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
code-corps/code-corps-ember#1613 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
code-corps/code-corps-ember#1612 ·
-
Difficulty: Medium Skill: ember-cli-page-object
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
code-corps/code-corps-ember#1063 · 1 reazione ·
-
greenkeeper
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
code-corps/code-corps-ember#1765 · 1 commento ·
Tutte le issue di code-corps/code-corps-ember
Issue simili
-
Update HugeIcons library Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
antfu-collective/icones#398 ·
-
ECmail.com Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
wesbos/burner-email-providers#554 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
components-web-app/docs#92 ·