Feature/open tutorial page in new tab and move playback buttons to left#63
Merged
Feature/open tutorial page in new tab and move playback buttons to left#63
Conversation
meganrm
reviewed
Nov 5, 2020
| import { useLocation, NavLink } from "react-router-dom"; | ||
| import { TUTORIAL_PATHNAME } from "../../routes"; | ||
|
|
||
| const HeaderFooter: React.FunctionComponent<{}> = () => { |
Contributor
There was a problem hiding this comment.
Small thing, but I think it would be clearer to call this "TutorialLink" or something like that. HeaderFooter is a little confusing
Contributor
Author
There was a problem hiding this comment.
Hah, yeah I admit it's a bad name. I'm going to change it to HeaderDropdowns because it will soon contain both the "Load model" and "Support" dropdowns.
Contributor
Author
There was a problem hiding this comment.
Actually I'll call it TutorialLink in this PR so it reflects its current state and then change it to HeaderDropdowns for my future PR
meganrm
approved these changes
Nov 5, 2020
Contributor
meganrm
left a comment
There was a problem hiding this comment.
Looks good to me, just one component name change suggestion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: open tutorial in new tab
AND Move all the playback buttons to the left of the slider
To use the
useLocationReact Router hook, I had to make a new separate function component to house the Getting Started link in the header. All ears if someone has a better way. Just using the built-inlocation.pathnamewithout usinguseLocationdidn't work -- if I went to the viewer, then came back to the landing page using the Simularium Home link, then clicked on Getting Started in the header, then the tutorial page would open in a new tab.Pull request recommendations:
Thanks for contributing!