Consumer enablement for @plannotator/ui (0.24.0)#1017
Merged
Conversation
Per-card footer slot for host reply/resolve UI (clicks inside don't select the card); readOnly hides delete/edit on all card kinds. Both optional, both no-op by default — Plannotator unchanged.
TableOfContents, ResizeHandle, useResizablePanel, useActiveSection, useScrollViewport, utils/annotationHelpers — verified strict-clean and backend-free (useResizablePanel persists via the storageBackend seam); added to the gate and the HANDOFF supported-imports table.
allowImages threads to both CommentPopover sites (popover already gated its attach affordance; Viewer never exposed the knob). readOnly suppresses every composer entry point — selection toolbar (highlighter 'enabled'), pinpoint, global comment, attachments, checkbox toggles — while existing annotations still render and select. Both default to today's behavior.
…less bun test crashed on web-highlighter)
…ocals/Parameters Fixed the 24 violations the flags surfaced across the supported-import graph: type-only imports (verbatimModuleSyntax) and dead imports/locals. Consumers with stricter tsconfigs no longer have to relax them.
verifyRestoredContent on useAnnotationHighlighter: after a meta-based fromStore restore, the painted text is checked against originalText (whitespace-normalized). Mismatch -> highlight removed, text-search fallback re-anchors; if that fails too, onRestoreMismatch(annotation, restoredText) fires and nothing is painted. Default off — today's trust-the-positions behavior. Workspaces hit this live after document drift; correctness upgrade for every consumer.
Owner
Author
|
This is now released in version 0.23.0 |
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.
What
Six consumer-enablement items accumulated through Workspaces' first three integration slices — all additive, every default reproduces 0.23.0 behavior. Plannotator's own apps are unchanged.
renderCardFooter(per-card slot for reply/resolve UI; slot clicks don't select the card) +readOnly(hides delete/edit on all card kinds)TableOfContents,ResizeHandle,useResizablePanel,useActiveSection,useScrollViewport,utils/annotationHelpers— all verified strict-clean and backend-freeViewerallowImages: threads to both CommentPopover sites so hosts without an upload backend never show a dead-end attach buttonViewerreadOnly: suppresses every composer entry point (selection toolbar via the highlighter'senabled, pinpoint, global comment, attachments, checkbox toggles); existing annotations still render and selectverbatimModuleSyntax+noUnusedLocals+noUnusedParameters; fixed the 24 source violations they surfacedverifyRestoredContentonuseAnnotationHighlighter— a position-based restore that paints the wrong text after document drift is removed and re-anchored by text search;onRestoreMismatchreports unrecoverable anchors. Workspaces hit this live.Verification
AnnotationPanel.props.test.tsx,Viewer.consumer.test.tsx,annotationRestoreVerify.test.tsx— 12 new testsRelease
Version bumped to 0.24.0; publish is owner-gated (Workspaces consumes it for their comments-parity slice).