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

VS Code extension folding with multiple lines of decorators is broken #2747

Open
garethj-msft opened this issue Dec 12, 2023 · 6 comments
Open
Assignees
Labels
ide Issues for VS, VSCode, Monaco, etc. triaged:core
Milestone

Comments

@garethj-msft
Copy link
Member

Currently folding in VS Code hides too much of the folded item, so you can't identify it.
For example folding

  @open 
  @complex model customSecurityAttributeValue {
  }

shows the following:

image

Whereas folding:

@open 
  @complex model customSecurityAttributeValue {
    dooo: int32;
    hooo: int32;
    vooo: int32;
    gooo: int32;
    mooo: int32;
    zooo: int32;
    booo: int32;
  }

shows:
image

Expected:
In both cases, the content of the model should be folded

Actual:
Both cases are broken, albeit differently.

@timotheeguerin
Copy link
Member

timotheeguerin commented Dec 12, 2023

For comparison this is what TypeScript does: create 2 folding region (1 for the doc comment and one only for hte class content) Doesn't seem like the decorator can get folded

image

collapsed
image

@markcowl markcowl added the ide Issues for VS, VSCode, Monaco, etc. label Dec 13, 2023
@markcowl markcowl added this to the Backlog milestone Dec 13, 2023
@timotheeguerin
Copy link
Member

@garethj-msft is this still reproing for you? I works fine for me

image

image

@mario-guerra
Copy link
Member

Closing issue based on Timothee's comment. @garethj-msft if you continue to see this issue please reopen.

@garethj-msft
Copy link
Member Author

@mario-guerra @timotheeguerin I don't have the rights to re-open, but yes it's still reproing for me today.
image

image

@timotheeguerin
Copy link
Member

ok so actually repro it didn't when involving a comment above, not sure why I was trying with that.

@timotheeguerin
Copy link
Member

timotheeguerin commented Apr 19, 2024

to note however, if you format the file it gets converted to

@open
@complex model customSecurityAttributeValue {
  dooo: int32;
  hooo: int32;
}

which then has correct folding
image

so this is only when there is a single folding for decorator and model.

The difference with TypeScript is that they don't ever fold decorators but we do produce 2 folding (decorator and model content) so not sure exactly how we'd want this to look like
(in TS)
image

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. triaged:core
Projects
None yet
Development

No branches or pull requests

5 participants