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
[WebProfiler] Add copy button on runnable and formatted queries #1056
Conversation
36015ff
to
f812c0b
Compare
I'm wondering whether we should bundle the clipboard.js library here (and maybe again in another bundle wanting to provide such button), or whether we should add a feature in the WebProfilerBundle JS to allow having such copy button easily anywhere in the WebProfilerBundle (no duplicate in each bundle) using native APIs. Note that clipboard.js does 2 things mainly:
|
Having a copy button in Symfony's core totally makes sense indeed 👍 Replacing clipboard.js by custom code is fine as well. However, as a new feature, this copy button would now be available in Symfony WPB 5.1 while we support 3.4 here. Can we add it like this firstly and if someone ever implements it in core (I personally don't have the skills to do it), we then remove our "own" copy button implementation from the DoctrineBundle? |
btw, even if we keep it in DoctrineBundle, we could avoid bundling the library. |
I want to back @stof here with |
Agreed. @fancyweb can you please remove bundling of library and replace with native API? Then we don't need this upstream. |
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 for continuing this @ostrolucky!
6015e5f
to
9df8ef3
Compare
5be06d3
to
a09ffb6
Compare
a09ffb6
to
aa730eb
Compare
This PR adds a "copy" button on runnable queries.
I also took the opportunity to copy paste all the specific CSS for the Doctrine panel from Symfony core inside this bundle so we can remove it from Symfony core (in 5.0). Let me know if you prefer to have the two things splitted for clarity.
Screenshot: