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

People: Invites: Disable buttons on accept #1237

Merged
merged 2 commits into from
Dec 3, 2015

Conversation

lezama
Copy link
Contributor

@lezama lezama commented Dec 3, 2015

Closes #1197

cc @ebinnion @roccotripaldi for an early review

@ebinnion
Copy link
Contributor

ebinnion commented Dec 3, 2015

From a UX perspective I like that we're now showing the user that something is in progress.

However, when I tried to accept an invite while logged in, I was never redirected away from the invite accept page:

screen shot 2

When I checked out master and attempted to accept the invite, I was redirected.

<Button primary onClick={ () => acceptInvite( this.props.invite ) } href={ this.props.redirectTo } >
{ this.translate( 'Join', { context: 'button' } ) }
<Button primary onClick={ this.accept } disabled={ this.state.submitting }>
{ this.state.submitting ? this.translate( 'Joining…', { context: 'button' } ) : this.translate( 'Join', { context: 'button' } ) }
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could make this a shorter line by rewriting as:

{ 
    this.state.submitting 
    ? this.translate( 'Joining…', { context: 'button' } ) 
    : this.translate( 'Join', { context: 'button' } ) 
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@ebinnion
Copy link
Contributor

ebinnion commented Dec 3, 2015

LGTM. :shipit:

lezama added a commit that referenced this pull request Dec 3, 2015
…ns-after-accept

People: Invites: Disable buttons on accept
@lezama lezama merged commit 2aab6d3 into master Dec 3, 2015
@lezama lezama deleted the update/invites-disable-buttons-after-accept branch December 3, 2015 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants