✨ Line Annotations
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginnen Sie am Einstiegspunkt CodeEditSourceEditor und überprüfen Sie das vorgeschlagene LineAnnotation-Modell sowie das Konzept AnnotationAggregatedDropdownView. Vergleichen Sie die Anforderungen mit dem verwandten Issue #354 und definieren Sie die Fertigstellung anhand gruppierter, nach Schweregrad gestalteter Annotationen, sauberer Modellaktualisierungen sowie eines scrollbewussten Verhaltens für Erweiterung und Kürzung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
Implement the visual display system for Line Annotations in the source editor. These annotations should appear directly beneath relevant lines of code and visually communicate messages such as errors, warnings, or informational notes.
Requirements
- Add support for displaying annotations below lines in the source editor
- An annotation should include:
- A severity icon (error, warning, info)
- A short descriptive message
- Multiple annotations should be stackable if they occur on the same line
- Styling should reflect severity (e.g., color, icon)
- Annotations should update cleanly when the underlying data model changes (insert, remove, update)
- Annotations should avoid disrupting layout:
- Automatically shrink if needed to preserve line spacing.
- If the message is truncated, allow users to click the annotation to reveal a popover with the full message.
- This popover should scroll with the editor and remain positioned relative to its line.
- If the line scrolls out of view and the annotation is expanded, the popover should remain visible—docked to the top or bottom edge of the editor—until dismissed.
Implementation Details
- The expanded popover view (when multiple annotations exist or a message is truncated) may be called AnnotationAggregatedDropdownView, similar to what is used in other macOS editors.
- The source editor (
CodeEditSourceEditor) will accept a new property:annotations: Set<LineAnnotation> - LineAnnotation is a lightweight data model that represents a message to display beneath a specific line:
struct LineAnnotation: Hashable, Identifiable { let id: UUID = UUID() let line: Int let column: Int let severity: Severity let text: String } enum Severity { case error, warning, info, live } - The editor should group annotations by line internally and render them accordingly.
Additional Context
This is the foundational work for visual feedback in the editor. Future issues will introduce the system for feeding issues into the annotations (e.g., from builds, linters, or language servers) via an issue manager.
This feature is a key part of improving the editing experience by surfacing issues contextually, and sets the stage for deeper diagnostic and development tooling integration.
Related Issues
Screenshots
Warning

Warning Expanded

Error

Multiple Errors

Multiple Errors Expanded

- Vorherrschende Sprache
- Swift
- Sterne
- 720
- Forks
- 162
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus CodeEditApp/CodeEditSourceEditor
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
CodeEditApp/CodeEditSourceEditor#376 · 1 Kommentar ·
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
CodeEditApp/CodeEditSourceEditor#378 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 32/100
Alle Issues in CodeEditApp/CodeEditSourceEditor
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Cocoanetics/SwiftACP#52 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
storyblok/storyblok-swift#12 ·
-
bug yapback
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100