Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Extract project join status from project-card component into a separate component

オープン
#1,181 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@daveconnis がすでに取り組んでいます。

2017年10月18日 から。

評価

この issue はまだ評価されていません。

説明

Difficulty: Easy Skill: ember-cli-page-object Skill: Ember.js Skill: JavaScript Skill: Testing

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 はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

code-corps/code-corps-ember のほかの issue

code-corps/code-corps-ember の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。