-
Notifications
You must be signed in to change notification settings - Fork 3
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
Share modal #419
Share modal #419
Conversation
Pull Request Test Coverage Report for Build 818733565
💛 - Coveralls |
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.
Couple of comments but nothing show stopping!
<UrlText>{urlToShare}</UrlText> | ||
<ShareButtons> | ||
<Button onClick={() => copyUrl()}>Copy URL</Button> | ||
<EmailShareButton url={urlToShare}> |
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.
Is there a setting to have this open in a new tab? After sending the email it closes the tab so I lose the dashboard completely.
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.
unfortunately there is not, but I guess it would be pretty trivial to just write my own mailto
link here instead ... I was just using this because it was already there but that's a good point!
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.
after digging around some more I found that there actually is a way to do this via the library, and it actually seems to work more consistently than a plain mailto
link with target="_blank"
despite being slightly kludgy, so that's what I went with!
@@ -0,0 +1,4 @@ | |||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"> |
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.
Are these things we would want to include in the component library?
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.
yeah, probably? I should do a pass to move all of the icons in this application over to that package (if they're not there already) but I didn't want to block on that here.
Description of the change
Includes a modal in the main navigation with buttons for copying the page URL or sharing it directly to email, facebook, or twitter. Including the section number is optional.
(it will reflect whatever the current host is, which is why it's just showing my local dev URL)
It's possible we might add more copy to the modal or the links besides just the URL, but no one has given me anything yet so I didn't want to continue waiting for it. Wouldn't change the basic functionality anyway so easy enough to add later if needed.
Type of change
Related issues
Checklists
Development
These boxes should be checked by the submitter prior to merging:
Code review
These boxes should be checked by reviewers prior to merging: