Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #29 - Show batch (i.e. stint) info after name on correct guess #49

Merged
merged 2 commits into from
Apr 29, 2019

Conversation

jaryncolbert
Copy link
Collaborator

@jaryncolbert jaryncolbert commented Apr 24, 2019

This commit resolves #29 by adding information about a member of the RC community's stint or tenure depending on their role and the dates of their involvement.

  • Batches are identified solely by their short names, e.g. m3'19 or SP1'19.
  • Other roles are described as such:
    • residency: Resident
    • employment: Their title, if specified. Otherwise, Staff.
    • experimental: Experimental Batch
    • research fellowship: Research Fellow
    • facilitatorship: Facilitator
  • Dates of involvement are only shown for non-batch stints and are identified by abbreviated month and year, e.g. Apr '19.
    • If they are currently involved, the date will appear as <role> since <start_date>, e.g. Facilitator since Jan '14.
    • If their involvement has ended, the date will appear as <role>, <start_date> - <end_date>, e.g. Resident, Sep '13 - Dec '13. If the start and end dates have the same abbreviation, only a single date will be shown, e.g. <role>, <start_date>, e.g. Experimental Batch, Jul '17.
  • Multiple stints/roles will be separated by semi-colons and ordered by date from earliest to latest.

Screenshots -

  • Multiple batches plus non-batch Facilitatorship stint with different start and end dates: Screen Shot 2019-04-24 at 2 24 05 PM
  • Residency with identical start and end date abbreviations: Screen Shot 2019-04-24 at 2 24 26 PM
  • Current employment with title of Career Facilitator but without end date: Screen Shot 2019-04-24 at 2 24 52 PM
  • Regular plus experimental batch: Screen Shot 2019-04-24 at 2 23 14 PM

@jaryncolbert
Copy link
Collaborator Author

jaryncolbert commented Apr 24, 2019

Would love to hear your thoughts, @botwhytho and @brainwane, since you were the original submitter and commenter on #29. But no pressure if you don't have the bandwidth to weigh in!

Copy link
Owner

@jasonaowen jasonaowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome work, @jaryncolbert ! Thank you so much. It looks amazing, and you handled the edge cases really well; I really appreciate your thoroughness.

There are some opportunities to clean up the code a little bit, or places where I don't quite follow, and I've commented on them below. They're all optional, though - if you want to work on it further, I'm happy to pair on and/or review that work, and if not then please merge away!

src/components/guess.js Outdated Show resolved Hide resolved
src/components/guess.js Outdated Show resolved Hide resolved
src/components/guess.js Outdated Show resolved Hide resolved
src/components/guess.js Outdated Show resolved Hide resolved
update-data.py Outdated Show resolved Hide resolved
src/api.js Show resolved Hide resolved
faces.py Outdated Show resolved Hide resolved
faces.py Outdated Show resolved Hide resolved
faces.py Outdated Show resolved Hide resolved
src/components/guess.js Show resolved Hide resolved
return stint.get('short_name');
}

switch (type) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the 'retreat' case is a simple return, I think it makes sense to merge the if statement into the switch statement, like:

switch (type) {
  case 'retreat':
    return stint.get('short_name');
  case 'residency':

@jaryncolbert jaryncolbert merged commit 22a1af9 into jasonaowen:master Apr 29, 2019
@jaryncolbert jaryncolbert deleted the 29_display_batch branch April 29, 2019 19:18
@jasonaowen
Copy link
Owner

Thanks, @jaryncolbert ! 💜

@jaryncolbert jaryncolbert restored the 29_display_batch branch April 29, 2019 19:19
@jaryncolbert jaryncolbert deleted the 29_display_batch branch April 29, 2019 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When you guess correctly display the person's batch information after their name
2 participants