Extract project join status from project-card component into a separate component
@daveconnis is already working on this.
Since Oct 18, 2017.
Assessment
This issue has not been assessed yet.
Description
Problem
The logic for the project status/join button in the project card template is highly complex. We could simplify it by extracting a part.
The following code:
{{#if currentProjectMembership.isLoaded}}
{{#if (eq currentProjectMembership.role 'pending')}}
<button class="clear small" disabled>Request sent</button>
{{else}}
<button class="clear small" disabled>Member</button>
{{/if}}
{{/if}}
{{#unless currentProjectMembership}}
{{project-join-modal project=project skills=projectSkills}}
{{/unless}}
should be replaced with the equivalent of:
{{#if currentProjectMembership}}
{{membership-status membership=currentProjectMembership}}
{{else}}
{{project-join-modal project=project skills=projectSkills}}
{{/if}}
Subtasks
- Implement component
- Write integration tests for component
- If current project membership is loading, it renders nothing
- If current project membership is loaded and role is pending, it renders the "Request sent" button
- If current project membership is loaded and role is something else, it renders the "Member" button
- [ ] A page-object should be written for these tests
- Replace code with component
- Add integration tests for project card component
- If there is a current project membership, it renders the project-membership-subcomponent
- If there is no current project membership, it renders the project-join-modal subcomponent
- The project-card page object will need to be expanded with two new properties for this
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Issue-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sugarlabs/musicblocks#8924 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Opencustomer-eng status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100