Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,181 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@daveconnis ci sta già lavorando.

Dal 18/10/2017.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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
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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di code-corps/code-corps-ember

Tutte le issue di code-corps/code-corps-ember

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.