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 Scroll feature - that works with XML (this case being AAD B2C Custom Policies - when working with User Journeys, Technical Profiles etc.) #157720

Closed
nzcoderguy opened this issue Aug 9, 2022 · 14 comments
Assignees
Labels
editor-sticky-scroll *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@nzcoderguy
Copy link

When working with AAD B2C Custom Policies using VSC - the Stick Scroll feature would be nice to have - but it doesn't appear to make any difference for Xml files when writing/reading Technical Profiles/User Journeys etc. would help immensely.

@gjsjohnmurray
Copy link
Contributor

@nzcoderguy how does your XML look in the Outline view?

@aiday-mar my guess is that the SymbolKinds assigned to a document in XML language mode don't intersect with the hardcoded sticky set. Elsewhere I have suggested that the sticky set could be specified in the language configuration file. Perhaps fall back to the current hardcoded set if the specification is completely absent from the language configuration file. But treat an empty spec as meaning no symbol kinds are sticky.

@nzcoderguy
Copy link
Author

Outline view - doesn't show anything:

image

@gjsjohnmurray
Copy link
Contributor

I suggest you look for an extension which provides an XML language server.

@nzcoderguy
Copy link
Author

Do you recommend any XML extensions that would provide the same type of feature/functionality?

@aiday-mar
Copy link
Contributor

You may install the XML Language Support by Red Hat from the market place

@gjsjohnmurray
Copy link
Contributor

https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml is popular and populates the Outline, as shown in its first screenshot. Unfortunately it classifies the symbols as SymbolKind.Field, which isn't sticky in 1.70.

@gjsjohnmurray
Copy link
Contributor

I'm getting some stickiness in XML that I'm testing with the current 1.71 Insiders, so something is changing in this area. @aiday-mar can you share any information yet about this?

@aiday-mar
Copy link
Contributor

aiday-mar commented Aug 10, 2022

Hi thank you for all your feedback on all the open issues. I am currently testing the changes proposed by the PR #157466 on all kinds of files. So far it would seem the correct sticky lines are stuck (comments and decorators are no longer stuck). I am still in the process of testing and will be doing so for XML files too.

@aiday-mar
Copy link
Contributor

@gjsjohnmurray Indeed with the latest refactoring of the sticky scroll (specifically after removing the comparison against different symbol kinds), the sticky scroll sticks XML headers to the top.

sticky-scroll-xml

As the issue does not have a specific example, I am currently not able to reproduce it.

@alexdima alexdima added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Aug 10, 2022
@alexdima
Copy link
Member

Our suggestion is to install an extension that registers a document symbol provider for XML (such as the redhat xml extension). Otherwise, we also have #157165 which tracks using a different method for computing sticky lines, based on indentation.

@nzcoderguy
Copy link
Author

nzcoderguy commented Aug 10, 2022

I have the RedHat XML Extension installed -
image

but its not behaving like @aiday-mar 's snipping clip - or is that in the latest build not released yet of VSC?

I'm also not seeing anything in the Outline window still.

@gjsjohnmurray
Copy link
Contributor

You need to be using Insiders edition. Download it from https://code.visualstudio.com/insiders/

You can install it alongside the general release version, aka Stable.

@nzcoderguy
Copy link
Author

Thank you so much. Insiders version + RedHat XML extension + B2C extension, and enabling this sticky scroll = working brilliantly.
Assuming its a matter of time when the public release will incorporate these changes?

The Outline window is populating with the XML structure/tree now, along with the breadcrumb/current selected branch too - looks great!

image

@gjsjohnmurray
Copy link
Contributor

Excellent! 1.71 is expected to ship in early September. See #157454.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-sticky-scroll *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

6 participants