-
There is currently no setting to enable enclosing class/function context in OneDev web diffs. OneDev computes and renders its own line-based diff blocks; it lets you expand surrounding unchanged lines, but it does not retain or display the section text found after a Git
@@ ... @@hunk header. Tools such as delta can show or restyle that section text from Git, so matching that behavior in the web UI requires a feature change.- Which presentation should the feature use?
Number Option short title Explanation Pros Cons 1️⃣ ⭐ Hunk context label (recommended) Show the nearest enclosing symbol, such as a class, method, or function, once at the start of each visible change block. This is closest to the familiar Git/delta hunk-header behavior. ✅ Compact; ✅ familiar; ✅ works in unified and split views ⚠️ The label can scroll out of view in a long change block; ⚠️ accuracy depends on language support 2️⃣ Sticky context breadcrumb Keep the current class/function context visible while scrolling through a file diff, updating it as the viewport enters another symbol. ✅ Context remains visible; ✅ useful for large diffs ⚠️ More UI complexity; ⚠️ needs clear behavior when old and new sides have different symbols 3️⃣ Both presentations Add hunk labels and also keep the active context visible while scrolling. ✅ Most context; ✅ handles short and long change blocks ⚠️ More visual clutter; ⚠️ largest implementation and maintenance cost Please reply with 1A, 1B, or 1C (or describe a different preference): A = option 1, B = option 2, C = option 3.
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Issue Votes (0)
In popular Git pagers such as Git-delta, it is able to display the context of the current lines being displayed, including the name of the function, the name of the class, and so on. However, OneDev does not natively do this. When I'm looking at a
git diff, I can't tell which function the individual line changes are in. If there is no way to enable this, can we add this feature so that it's on by default?Don't assume. Ask high-level clarifying questions if needed.