chore: Centralized Annotation Utilities#1720
Merged
Conversation
This was referenced Jan 29, 2026
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3 tasks
9a3d3da to
ec6245c
Compare
4c1acbb to
0601281
Compare
maxy-shpfy
reviewed
Feb 4, 2026
maxy-shpfy
reviewed
Feb 4, 2026
| export const EDITOR_POSITION_ANNOTATION = "editor.position"; | ||
|
|
||
| type Annotations = { | ||
| [k: string]: unknown; |
Collaborator
There was a problem hiding this comment.
NIT: thinking outlouad - in most cases it is a scalar value string | number | boolean maybe we can improve typing?
Collaborator
Author
There was a problem hiding this comment.
We could, though that may limit us in the future. Maybe a typeguard can get us through most of our common cases
maxy-shpfy
reviewed
Feb 4, 2026
| ); | ||
| if (!layoutAnnotation) return defaultPosition; | ||
|
|
||
| const decodedPosition = JSON.parse(layoutAnnotation); |
Collaborator
There was a problem hiding this comment.
NIT: think about generalizing "object annotation" to transparent work with content of annotation
Collaborator
Author
There was a problem hiding this comment.
I'm not sure I understand what you mean?
ec6245c to
9813113
Compare
0601281 to
6ddc473
Compare
9813113 to
23e9fd1
Compare
6ddc473 to
e56f31d
Compare
0131cf2 to
03699dc
Compare
e56f31d to
aea018f
Compare
03699dc to
5113bf3
Compare
aea018f to
b19c264
Compare
9949627 to
806249c
Compare
806249c to
46b07d8
Compare
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
bringing together some annotation-related methods into one
annotationsutility file for easier sharing or logic and types.Also moves
editor.positionannotation into a constant for better dev consistency.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
no change to UI
Test Instructions
confirm all annotations still work as expected (particularly position annotations)
Additional Comments