Change the button for the link to a conversation (feedback responses to exercise by specific student) so that it copies the link to the clipboard rather than redirecting to said page.
Change tooltip text respectively.
If copying the text to clipboard works (secure connection and permission to write to clipboard), there is a popover open for ~2 seconds:
If copying didn't work, there is a popover open for ~5 seconds, which notifies that it didn't work and provides the link text (so it can be copied manually):
Why?
Because typically the teacher doesn't actually want to go to the page displaying just that conversation, only copy the link so they can send it to another teacher or save it for themselves.
How?
Changing the "button" from a link to an actual button (to reflect behavior) and adding an onclick handler that copies the link text to the clipboard.
Fixes #62
Testing
Remember to add or update unit tests for new features and changes.
I tested that without a secure connection (e.g. with the domain being something like 172.18.0.4) clicking on the button works as it should (popover indicates copying didn't work, provides text, stays open for ~5 seconds). When running on a secure connection (localhost), the button works as it should, the link is copied to the clipboard, and there is a popover notifying that the link was copied to the clipboard (stays open for ~2 seconds).
Did you test the changes in
[x] Chrome
[x] Firefox
[ ] This pull request cannot be tested in the browser.
Think of what is affected by these changes and could become broken
Description
What?
Change the button for the link to a conversation (feedback responses to exercise by specific student) so that it copies the link to the clipboard rather than redirecting to said page. Change tooltip text respectively.
If copying the text to clipboard works (secure connection and permission to write to clipboard), there is a popover open for ~2 seconds:
If copying didn't work, there is a popover open for ~5 seconds, which notifies that it didn't work and provides the link text (so it can be copied manually):
Why?
Because typically the teacher doesn't actually want to go to the page displaying just that conversation, only copy the link so they can send it to another teacher or save it for themselves.
How?
Changing the "button" from a link to an actual button (to reflect behavior) and adding an onclick handler that copies the link text to the clipboard.
Fixes #62
Testing
Remember to add or update unit tests for new features and changes.
What type of test did you run?
I tested that without a secure connection (e.g. with the domain being something like 172.18.0.4) clicking on the button works as it should (popover indicates copying didn't work, provides text, stays open for ~5 seconds). When running on a secure connection (localhost), the button works as it should, the link is copied to the clipboard, and there is a popover notifying that the link was copied to the clipboard (stays open for ~2 seconds).
Did you test the changes in
Think of what is affected by these changes and could become broken
Translation
Programming style
Have you updated the README or other relevant documentation?
Is it Done?
Clean up your git commit history before submitting the pull request!