Skip to content

feat(comments): improve floating comments ui#2195

Merged
caio-pizzol merged 14 commits intomainfrom
caio/sd-2016-improve-comment-bubble-ux-clean-up-inactive-state-collapse
Feb 26, 2026
Merged

feat(comments): improve floating comments ui#2195
caio-pizzol merged 14 commits intomainfrom
caio/sd-2016-improve-comment-bubble-ux-clean-up-inactive-state-collapse

Conversation

@caio-pizzol
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Feb 26, 2026

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5693a2a737

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

…ments

Three bugs prevented the "add comment via UI bubble" flow from working on
blank documents:

1. commentID vs commentId case mismatch in showAddComment (comments-store.js)
2. Blank documents created without an id, causing fileId/currentDocument.id
   mismatch in FloatingComments
3. hasInitializedLocations never set for DOCX documents (only wired to
   PDFViewer), blocking FloatingComments from rendering

Also extracts shared comment test helpers (addCommentViaUI, activeCommentDialog)
to reduce duplication across behavior tests.
Cover reply pill, thread collapse, faded highlights, and resolve flow.
Add getCommentId and addCommentViaUIWithId helpers.
…nt support

Restore isTrackedChangeThread guard in syncResolvedCommentsWithDocument
to prevent resolved tracked changes from being accidentally reopened.
Add PDF fallback in getPendingAnchorTop to use selection bounds when
editor positions are unavailable.
@caio-pizzol caio-pizzol linked an issue Feb 26, 2026 that may be closed by this pull request
4 tasks
Copy link
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Re-assert highlight exists after replyToComment calls (WebKit re-render)
and add extra waitForStable + bump dialog timeout for Firefox.
DomPainter: inactive comments now show faded background instead of empty.
SuperDoc: CommentDialog moved inside FloatingComments, check that instead.
On Firefox, clicking a presentation-layer highlight doesn't propagate
to set activeComment in the Vue store. On WebKit, highlights disappear
after replyToComment calls and click events don't trigger setFocus.

The new activateCommentDialog helper tries: highlight click → dialog
click → store $patch fallback. Also fixes pre-existing edit-comment-text
Firefox failure. Skips thread-collapse on WebKit (v-click-outside race).
…te on expand

- FloatingComments: only eagerly add comment IDs near the viewport to
  visibleIds instead of all IDs, preventing a jank frame on documents
  with 100+ comments during initial load
- comments-store: expand deleteComment guard to also clear activeComment
  when it points to a deleted child reply, not just the parent
- CommentDialog: call setFocus() inside expandThread() so clicking
  "N more replies" both expands and activates the card
@caio-pizzol caio-pizzol merged commit e870cfb into main Feb 26, 2026
11 checks passed
@caio-pizzol caio-pizzol deleted the caio/sd-2016-improve-comment-bubble-ux-clean-up-inactive-state-collapse branch February 26, 2026 22:39
@superdoc-bot
Copy link
Contributor

superdoc-bot bot commented Feb 26, 2026

🎉 This PR is included in superdoc v1.17.0-next.21

The release is available on GitHub release

@superdoc-bot
Copy link
Contributor

superdoc-bot bot commented Feb 26, 2026

🎉 This PR is included in superdoc-cli v0.2.0-next.16

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

superdoc unresponsive on document with lot of tracked changes

2 participants