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

"Resolve macro as..." code action produces unreadable text in pop up #1539

Closed
hgranthorner opened this issue Feb 16, 2022 · 13 comments
Closed
Labels
lsp ux User experience related

Comments

@hgranthorner
Copy link

When using the code action "Resolve macro as...", the text on the buttons in the pop up in the bottom right hand side of the screen is cut off, making them basically unreadable. Luckily this can be worked around via mouseover tool tips (although they're a bit finicky), but making this pop up more readable would be a nice usability improvement.

Screenshot taken when calling the code action on clojure.test.check.properties/for-all.

Link to slack thread:
https://clojurians.slack.com/archives/CBE668G4R/p1645027436974109

Screenshot:
image

@bpringe bpringe added ux User experience related lsp labels Feb 19, 2022
@bpringe bpringe added this to To do in Brandon's Board via automation Feb 19, 2022
@PEZ
Copy link
Collaborator

PEZ commented Feb 19, 2022

@ericdallo is this something we can solve in Calva without any change in clojure-lsp, you think?

@ericdallo
Copy link
Contributor

Yes, calva can handle window/showDocumentRequest differently, showing a different vscode popup instead of the default vscode-languageclient uses.

@PEZ
Copy link
Collaborator

PEZ commented Feb 21, 2022

It's a bit unclear to me how showDocumentRequest is related to this. It looks like in the default languageclient this is about showing documents rather than showing messages:

https://github.com/microsoft/vscode-languageserver-node/blob/f72faa0975cb2aaa85ce84da819944f84e1aac52/client/src/common/client.ts#L3422

@PEZ
Copy link
Collaborator

PEZ commented Feb 21, 2022

Maybe you mean showMessageRequest? https://github.com/microsoft/vscode-languageserver-node/blob/f72faa0975cb2aaa85ce84da819944f84e1aac52/client/src/common/client.ts#L3401

I think this is what clojure-lsp uses:

https://github.com/clojure-lsp/clojure-lsp/blob/1754cdfa6da3f72477ea09868f9d9ae159db0bda/lib/src/clojure_lsp/feature/resolve_macro.clj#L73

It seems reasonable that Calva shows a message on such a request, like the default client does, right?

@ericdallo
Copy link
Contributor

Yes, sorry, I meant showMessageRequest

@ericdallo
Copy link
Contributor

IMO, the default one that vscode uses has a bad UX for multiple options

@PEZ
Copy link
Collaborator

PEZ commented Feb 21, 2022

Agreed. I am more thinking that from the semantics of showMessage it seems like the right choice. Seems like the server should be able to show a menu. Not that I find such an option from a quick scan.

@ericdallo
Copy link
Contributor

How can server show a menu? this should be done on client side right?
Changing Calva to show the menu just like REPL jack in sounds the best fix

@ericdallo
Copy link
Contributor

This is how emacs show the menu:

@PEZ
Copy link
Collaborator

PEZ commented Feb 21, 2022

Something like window/showMenuRequest springs to mind. 😄

@ericdallo
Copy link
Contributor

I see your point, the method name sounds odd, yeah, agreed

@PEZ
Copy link
Collaborator

PEZ commented Feb 21, 2022

I checked with people in the know and there is simply no such command.

@PEZ PEZ mentioned this issue Feb 23, 2022
14 tasks
@PEZ
Copy link
Collaborator

PEZ commented Feb 23, 2022

So... that was a bit more work than I had anticipated. But now we have this VSIX you can test:

https://18213-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.245-massage-quick-picks-d3172aba.vsix

Looks like so:

image

Followed by:

image

Brandon's Board automation moved this from To do to Done Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lsp ux User experience related
Projects
Development

No branches or pull requests

4 participants