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

Feature: When comments are collapsed show comment Icon #15

Open
SridharPasham opened this issue Aug 11, 2020 · 10 comments
Open

Feature: When comments are collapsed show comment Icon #15

SridharPasham opened this issue Aug 11, 2020 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@SridharPasham
Copy link

Installed product versions

  • Visual Studio: 2019, 16.7
  • This extension: 1.9

Description

When comments are collapsed show comment Icon like in this extension.

Expected behavior

When comments are collapsed show comment Icon.

@mrlacey
Copy link
Owner

mrlacey commented Aug 11, 2020

Is it not possible to use both extensions?

@SridharPasham
Copy link
Author

I have observed VS slowness when installed that extension. Also found same comments about that extension. Looks like it is not actively maintained.

@mrlacey
Copy link
Owner

mrlacey commented Aug 21, 2020

What's the goal here?

Is it that even when collapsed the comments can be distracting and so you'd like them hidden?
Or is it something else?

@SridharPasham
Copy link
Author

Is it that even when collapsed the comments can be distracting and so you'd like them hidden?

Yes. With some sort of indicator indicating there are hidden comments.

@yannduran
Copy link

Sounds like a great option to have

@mrlacey mrlacey added this to the backlog milestone Apr 12, 2021
@mrlacey mrlacey added enhancement New feature or request help wanted Extra attention is needed labels Apr 12, 2021
@mrlacey
Copy link
Owner

mrlacey commented Apr 12, 2021

What may look like a very simple feature has lots of nuance and hidden complexity.

  • How to handle comments of single vs multi-line length?
  • What other functionality from that other extension should also be considered?
  • How to avoid the performance issues experienced with the other extension? (It needs to do a lot of work to replace the existing/built-in comment experience and provide a custom comment editing experience.)

I don't expect to get to this any time soon but will consider PRs.
Although, if you end up recreating everything in the NoComment extension it might be easier to have that as a separate extension you publish yourself.

@ramoneeza
Copy link

May be instead to show an icon, allow to change also the style of collapsed comment. I hate the box around a colapsed comment. And font became the default one.

@fiseni
Copy link

fiseni commented Oct 1, 2024

Hi,

The extension OP mentioned is obsolete, and it's not available for VS2022.
Not necessarily we should copy their approach by displaying a specific icon. Instead, a reasonable compromise would be to print a dummy short "..." text. A new package option may be introduced, let's say ShortCollapseForm. Anyone who wants this feature can explicitly opt-in by enabling this setting.

I just found an old PR I created for the Mad's Tweakster extension. You can see the related issue and PR here. Sounds good enough?

@mrlacey
Copy link
Owner

mrlacey commented Nov 15, 2024

The issue preventing this is that I am unable to find a way to modify what is displayed in the collapsed form. This is provided by other tooling and there doesn't appear to be an API that supports modifying this.

The other extension mentioned in the OP seems to work by identifying comments and then taking responsibility for their display , and that allows it to control whether a large or small visual is displayed. This could be recreated but I don't know how well this would work with the latest version of VS. The original extension targeted a version of VS with different APIs and I don't know how it now handles multiple extensions that are trying to manipulate the same comments.

@fiseni your PR works based on changing the output of the 'Tagger` in this instance the Tagger is in someone else's (roslyn's?) code and so not something I can directly reuse here.

@fiseni
Copy link

fiseni commented Nov 15, 2024

Yeah, I understand what you're saying. I also gave it a try in this new PR. The built-in tagger somehow takes precedence (or ignores it). I couldn't find any solution either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants