-
Notifications
You must be signed in to change notification settings - Fork 143
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
Remove History menu option for the tryit notebook (fixes #2114) #2125
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good minus the one requested change I have. Could you also add an entry to CHANGELOG.md per the pull request instructions?
Also, generally we add a "(fixes #xxx)" to end in a PR/commit message when a PR fixes an existing issue. If you could add/change that, that would be great too :)
}; | ||
|
||
render() { | ||
return ( | ||
<NotebookIconMenu> | ||
{this.props.isServer && <NotebookMenuItem task={tasks.newNotebook} />} | ||
{this.props.isServer && ( | ||
{!this.props.isTrialNotebook && ( | ||
<NotebookMenuItem task={tasks.toggleHistoryModal} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer to disable the item in this case, since there is a way to get access to the functionality (log in). Try this instead:
<NotebookMenuItem task={tasks.toggleHistoryModal} disabled={this.props.isTrialNotebook} />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good point! Total React n00b - it seems the above code won't work either since the item doesn't get rerendered on login? I'll try to figure out how this actually works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason is that the notebook tryit mode boolean isn't set to false after login and notebook creation - PR updated, hope this works!
@wlach thanks for the review! Saw the checklist after submitting - will fix now. |
Works great, thank you! |
Addresses #2114 by not showing the History option for the tryit notebook.
Pull Request checklist