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

Feedback on decorator collapsing #860

Open
tjprescott opened this issue Aug 12, 2022 · 11 comments
Open

Feedback on decorator collapsing #860

tjprescott opened this issue Aug 12, 2022 · 11 comments
Labels
ide Issues for VS, VSCode, Monaco, etc.
Milestone

Comments

@tjprescott
Copy link
Member

VSCode has tooling that lets you collapse the decorator block, but it compresses it does to a single decorator line. The architects expected to show no decorators.

uncollapsed

@A
@B(...)
@C
op myOp(...)

current collapsed

@A
op myOp(...)

expected collapsed

op myOp(...)
@ghost ghost added the Needs Triage label Aug 12, 2022
@nguerrera
Copy link
Contributor

We wanted it to work this way and we tried to do this, but it seems that we can't control what is shown when a range is collapsed from language server and we end up seeing only the first decorator and not the op. So we made the decision to collapse decorators separately.

@nguerrera
Copy link
Contributor

nguerrera commented Aug 16, 2022

I think it's easier with some visual on what is collapsible and best shown with multiple lines of decorators and multiple lines of op declaration.

Uncollapsed

v @A
  @B
  @C
v op myOp(
      param: string): void;

Collapsed

> @A ...
> op myOp( ...

It's worth noting that the handling of decorators as their own collapsible region is the same as TS does for comments.

@nguerrera
Copy link
Contributor

Ooh, the latest version of LSP supports setting the collapsed text!

https://github.com/microsoft/vscode-languageserver-node/blob/8b56a58d0a706bc0cc8e947b42ad135faf488fe3/types/src/main.ts#L532

I was about to link to this and show that it did not and that we'd have to ask for a feature, but looks like it's there now. Yay.

@markcowl
Copy link
Contributor

pri: 2, est: 3

@nguerrera nguerrera self-assigned this Aug 31, 2022
@nguerrera
Copy link
Contributor

Unfortunately, collapsedText doesn't seem to be supported on the client side yet. I tried upgrading our packages and returning it but it didn't have an impact. :(

@nguerrera
Copy link
Contributor

@nguerrera
Copy link
Contributor

Marking this as blocked in the project for now until I get an answer on that.

@nguerrera
Copy link
Contributor

@nguerrera
Copy link
Contributor

Moving to backlog as this is not possible to implement for VS Code yet. I will continue to engage on linked issue and figure out how to request and track the dependency.

@nguerrera nguerrera modified the milestones: [2022] September, Backlog Sep 6, 2022
@nguerrera
Copy link
Contributor

microsoft/vscode#70794 is the tracking issue on vscode. Consider upvoting there. We're blocked on that.

cc @johanste

@nguerrera
Copy link
Contributor

We could consider implementing this for editors that have the capability by checking the capability. This would include at least Visual Studio classic, it appears. Then in theory if the capability ever shows up in VS Code it would start working right away.

@timotheeguerin timotheeguerin added the ide Issues for VS, VSCode, Monaco, etc. label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

No branches or pull requests

5 participants