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

Sticky scrolling enabled by default for languages like HTML is confusing many users, consider a hint to make it clearer what it is? #206179

Closed
DanTup opened this issue Feb 24, 2024 · 11 comments
Assignees
Labels
editor-sticky-scroll polish Cleanup and polish issue

Comments

@DanTup
Copy link
Contributor

DanTup commented Feb 24, 2024

There are multiple posts per day on average in /r/vscode from users confused by sticky scrolling. It seems like this behaviour might a) not be obvious to users or b) not a good fit for HTML due to heavy nesting.

These posts are just from the last 3-4 days:

The posts have been happening much longer than this, but probably this is enough to illustrate the issue. Personally I like the feature, but I haven't seen any topic posted on /r/vscode as often as this one. It's also difficult for users to search for this without already knowing what it is called.

Maybe some kind of hint could be shown to users at the bottom of the stick scroll panel with a link to disable/configure or a link to dismiss the notification and not see it again?

Sticky scrolling is enabled [disable/configure] [disable for (language)] [dismiss]

@aiday-mar aiday-mar added editor-sticky-scroll polish Cleanup and polish issue labels Feb 26, 2024
@aiday-mar
Copy link
Contributor

aiday-mar commented Feb 26, 2024

Hi thank you for the idea. In the meantime, for people who happen to see this post, you can control + right click directly on the sticky scroll widget which makes a hover appear from where you can toggle Sticky Scroll off.

@DanTup
Copy link
Contributor Author

DanTup commented Feb 26, 2024

@aiday-mar I didn't know about this so I just tested it, but it doesn't seem to work for me - Ctrl+Click doesn't seem to do anything:

ctrl-click.mp4

Did I misunderstand what you meant?

@aiday-mar
Copy link
Contributor

aiday-mar commented Feb 26, 2024

Ah sorry I mean control + right click

@DanTup
Copy link
Contributor Author

DanTup commented Feb 26, 2024

Ah yes, I see that now (though if I do it on the text, it fires Go-to-Definition and doesn't show the menu). That's useful but not very discoverable (it's also odd that I can't get that menu from the breadcrumb, even though one of the options is to toggle the breadcrumb).

@spcharc
Copy link

spcharc commented Feb 29, 2024

I'm an embedded developer. I usually write C++ and don't do HTML. It seems to me this feature is quite stupid so I don't like it. It detects what should be sticky purely based on indentation?

If I have a bunch of nested statements:

void func()
{
    if (cond)
    {
        do
        {

And these will become sticky:

image

Besides, if the language itself requires proper indentation (like python) I believe it will work well. In C++ you don't even have to indent properly right?

@aiday-mar
Copy link
Contributor

Hi @spcharc the sticky scroll feature shows sticky lines depending on your setting value for editor.stickyScroll.defaultModel as well as your extensions. The default value for the setting is outlineModel and hence if you have an outline provider (provided by a language extension generally), this model will be used to determine what line to sticky. If you do not have an outline provider, this will fall back to the folding model provider, which itself falls back in the last resort to the indentation model.

With the C++ extension pack installed, your example looks as follows:

Screenshot 2024-03-04 at 09 11 21

@spcharc
Copy link

spcharc commented Mar 4, 2024

@aiday-mar I don't have C/C++ extension installed, which explains why it uses indentation.

The C/C++ extension is annoying since it keeps warning me about missing definitions everywhere in the code base ... the project I'm working on has tons of declarations and definitions generated during compile time, so they are simply not there when coding.

I just want a decent text editor I think. I don't really need intellisense or sticky scrolling.

@aiday-mar
Copy link
Contributor

Hi @spcharc I understand. For now we have decided to enable the default of sticky scroll, however if you do not like it you may disable the sticky scroll feature in your settings.

@gjsjohnmurray
Copy link
Contributor

See also #199381

@aiday-mar
Copy link
Contributor

duplicate of #215440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-sticky-scroll polish Cleanup and polish issue
Projects
None yet
Development

No branches or pull requests

5 participants