Extract project join status from project-card component into a separate component
@daveconnis 已经在做这个了。
开始于 2017年10月18日。
评估
这个 Issue 还没有评估数据。
描述
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
- 主要语言
- JavaScript
- 星标
- 120
- 派生
- 75
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
code-corps/code-corps-ember 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
code-corps/code-corps-ember#1616 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
code-corps/code-corps-ember#1613 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
code-corps/code-corps-ember#1612 ·
-
Difficulty: Medium Skill: ember-cli-page-object
难度 2/5 1-3 小时 新手友好度 62/100
code-corps/code-corps-ember#1063 · 1 个 reaction ·
-
greenkeeper
难度 3/5 1-2 天 新手友好度 25/100
code-corps/code-corps-ember#1765 · 1 条评论 ·
查看 code-corps/code-corps-ember 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100
-
Issue-Bug
难度 2/5 1-3 小时 新手友好度 68/100
sugarlabs/musicblocks#8924 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled 未关闭customer-eng status: needs triage
难度 2/5 1-3 小时 新手友好度 84/100