Discussion: Reconsider the route/template structure for donate and thank-you
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Review the listed project.hbs and project/{index,settings,tasks,donate,thank-you}.hbs structure, focusing on the duplicated layout and the project-details component's joinProject action. Read Ember's renderTemplate hook documentation and compare the three routing options in the issue. Done means selecting and documenting a route/layout structure that avoids duplicated layout code and gives the action a clear owner.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 120
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from code-corps/code-corps-ember
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
code-corps/code-corps-ember#1616 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
code-corps/code-corps-ember#1613 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
code-corps/code-corps-ember#1612 ·
-
Difficulty: Medium Skill: ember-cli-page-object
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
code-corps/code-corps-ember#1063 · 1 reaction ·
-
greenkeeper
Difficulty 3/5 1-2 days Newbie friendliness 25/100
code-corps/code-corps-ember#1765 · 1 comment ·
All issues in code-corps/code-corps-ember
Similar issues
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100