vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Sticky Scroll feature - that works with XML (this case being AAD B2C Custom Policies - when working with User Journeys, Technical Profiles etc.)

Open nzcoderguy opened this issue 1 year ago • 9 comments

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.

nzcoderguy avatar Aug 09 '22 22:08 nzcoderguy

@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.

gjsjohnmurray avatar Aug 10 '22 03:08 gjsjohnmurray

Outline view - doesn't show anything:

image

nzcoderguy avatar Aug 10 '22 04:08 nzcoderguy

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

gjsjohnmurray avatar Aug 10 '22 04:08 gjsjohnmurray

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

nzcoderguy avatar Aug 10 '22 04:08 nzcoderguy

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

aiday-mar avatar Aug 10 '22 10:08 aiday-mar

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 avatar Aug 10 '22 10:08 gjsjohnmurray

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?

gjsjohnmurray avatar Aug 10 '22 10:08 gjsjohnmurray

Hi thank you for all your feedback on all the open issues. I am currently testing the changes proposed by the PR https://github.com/microsoft/vscode/pull/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 avatar Aug 10 '22 10:08 aiday-mar

@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.

aiday-mar avatar Aug 10 '22 12:08 aiday-mar

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 https://github.com/microsoft/vscode/issues/157165 which tracks using a different method for computing sticky lines, based on indentation.

alexdima avatar Aug 10 '22 13:08 alexdima

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.

nzcoderguy avatar Aug 10 '22 22:08 nzcoderguy

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.

gjsjohnmurray avatar Aug 10 '22 22:08 gjsjohnmurray

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

nzcoderguy avatar Aug 10 '22 22:08 nzcoderguy

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

gjsjohnmurray avatar Aug 11 '22 03:08 gjsjohnmurray