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

Fav button into ES6 #3717

Merged
merged 5 commits into from Apr 12, 2017
Merged

Fav button into ES6 #3717

merged 5 commits into from Apr 12, 2017

Conversation

srallen
Copy link
Contributor

@srallen srallen commented Apr 11, 2017

Converts the favorites button component into ES6 and adds unit tests. Fixed a bug in show-list.cjsx if the favorites collection does not have any subject links.

https://fav-button-es6.pfe-preview.zooniverse.org/

Review Checklist

  • Does it work in all major browsers: Firefox, Chrome, Edge, Safari?
  • Does it work on mobile?
  • Can you rm -rf node_modules/ && npm install and app works as expected?
  • Did you deploy a staging branch?
  • Did you get any type checking errors from Babel Typecheck

Optional

  • If it's a new component, is it in ES6? Is it clear of warnings from ESLint?
  • Have you replaced any ChangeListener or PromiseRenderer components with code that updates component state?
  • If changes are made to the classifier, does the dev classifier still work?
  • Have you added in flow type annotations?

@mention-bot
Copy link

@srallen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @eatyourgreens, @amyrebecca and @camallen to be potential reviewers.

className={`favorites-button ${this.props.className || ''}`}
type="button"
title={(this.state.favorited) ? 'Unfavorite' : 'Favorite'}
onClick={this.toggleFavorite}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add aria-label={(this.state.favorited) ? 'Unfavorite' : 'Favorite'} here since the button doesn't have a text label.

@eatyourgreens
Copy link
Contributor

Looks good to me. One suggestion about adding a text label to the button.

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.

None yet

3 participants