Sticky scroll should behave the same for .razor files as for .cs files (here: if-else)
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
when i have sticky scroll enabled, in a .cs file, for an else block, i get this:
i.e. the sticky shows both the `else` and the `if`, providing info about what the condition was.
whereas in a .razor file i get this:
i.e. only the `else` is there, without that needed context.
(for reference, here is the same code, scrolled up a litte, so that the if statement itself is in the sticky:
good news: it works for @if in the markup:
Contributor guide
Research direction
Start by reproducing the sticky-scroll comparison described for the .cs and .razor examples, focusing on an if-else block in each file. Trace the editor's sticky-scroll handling for these two cases and identify why the .razor view omits the if context. Done means the .razor case shows the same if and else context as the .cs case while preserving the existing @if behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100