feat: add anchor link copying to clipboard on click#883
feat: add anchor link copying to clipboard on click#883stenin-nikita wants to merge 5 commits intomasterfrom
Conversation
6ee068d to
a63e072
Compare
Summary
Failed Tests
Github Test Reporter by CTRF 💚 |
Summary
Failed Tests
Github Test Reporter by CTRF 💚 |
Summary
Failed Tests
Github Test Reporter by CTRF 💚 |
91930c5 to
1495ef1
Compare
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
1495ef1 to
2756bc4
Compare
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
| const link = new URL(href, window.location.href).toString(); | ||
| const link = getLink(target); | ||
|
|
||
| copyToClipboard(link).then(() => { |
There was a problem hiding this comment.
copyToClipboard can reject (e.g. page out of focus, no Clipboard API, iframe restrictions). What should happen in that case - silently ignore?
There was a problem hiding this comment.
I'd say yes, silently ignore – we can't report it anyway. Not sure though, thoughts?
| @@ -1,4 +1,4 @@ | |||
| .inline_code_tooltip { | |||
There was a problem hiding this comment.
Have you checked the use of this class in tests, viewer, and in general in the arcadia (tests etc may be tied to this). As an option, it is to keep the old class for compatibility and add a new one
.inline_code_tooltip,
.yfm-tooltip
There was a problem hiding this comment.
I maintained backward compatibility in this code:
transform/src/js/inline-code/index.ts
Line 12 in 2756bc4
In this code section, there is no need to apply styles to the DOM element twice, so I removed the redundant CSS selector.
2756bc4 to
c56f7bd
Compare
c56f7bd to
eb29d10
Compare
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
|
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |

Description