✨ Line Annotations
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
Piste de recherche
Commencez au point d’entrée CodeEditSourceEditor et examinez le modèle LineAnnotation proposé ainsi que le concept AnnotationAggregatedDropdownView. Comparez les exigences avec l’issue associée #354, puis définissez l’achèvement autour d’annotations regroupées et stylisées selon la sévérité, de mises à jour propres du modèle et d’un comportement d’expansion et de troncature sensible au défilement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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

- Langage dominant
- Swift
- Étoiles
- 720
- Forks
- 162
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de CodeEditApp/CodeEditSourceEditor
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
CodeEditApp/CodeEditSourceEditor#376 · 1 commentaire ·
-
Difficulté 1/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
CodeEditApp/CodeEditSourceEditor#378 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 32/100
Toutes les issues de CodeEditApp/CodeEditSourceEditor
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Cocoanetics/SwiftACP#52 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
storyblok/storyblok-swift#12 ·
-
bug yapback
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100