Skip to content
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

Sql copy button at line start #1675

Closed
wants to merge 1 commit into from
Closed

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Sep 20, 2024

I don't see much usability to put the button at the end of the query,
when the queries are very long it is annoying to go down and look for the button,
besides the position depends on the length of the last line of the query, the button place is being variable.

image

@tpetry
Copy link
Contributor

tpetry commented Sep 23, 2024

The idea was that the copy button is not the most important thing. And when the copy button is left to the text than you have "jumping" text: "transaction start" is completely left, and queries are slightly intended. thats a small ux issue.

@erikn69
Copy link
Contributor Author

erikn69 commented Sep 23, 2024

copy button is not the most important thing

It's the option that I use the most 😄
So is there possibility of returning it to its original position?
I have an app with quite large SQL, and I copy them to a formatter that creates a graph,
it helps me optimize or fix the queries

@barryvdh
Copy link
Owner

Hmm I think it probably looks better on the left indeed. Or completely to the right where the other buttons are?

@barryvdh
Copy link
Owner

On php-debugbar it's part of the rest of the buttons:
image

@erikn69
Copy link
Contributor Author

erikn69 commented Sep 24, 2024

completely to the right where the other buttons are?

It was originally like that, but it was changed
It can be on the left or right, the important thing is that it is easy to find

@erikn69
Copy link
Contributor Author

erikn69 commented Sep 25, 2024

@barryvdh hi, what about this idea:
When the sql is short the buttons appear on the same line, when it is very large the sql appears on a new line with width:100%, and the buttons are on top
image

currently the space under the buttons is wasted, if the filename is long it is wasted even more
image
Also depending on the length of the filename, some elements are wider than others, there is not much consistency

I can make a PR for that

@barryvdh
Copy link
Owner

With larger queries the buttons jump around a bit anyways, so not really sure.

@erikn69
Copy link
Contributor Author

erikn69 commented Sep 26, 2024

With larger queries the buttons jump around a bit anyways

IMO, no jump, just wasted space

AFTER/BEFORE
image

But if you don't consider it optimization, no problem. 👍

@erikn69 erikn69 closed this Oct 18, 2024
@erikn69 erikn69 deleted the patch-92 branch October 18, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants