Skip to content

Conversation

adamsilverstein
Copy link
Member

@adamsilverstein adamsilverstein commented Sep 11, 2025

What?

Fixes #71393

This PR visually aligns comments beside (to the right of) the block they are related to. This is in the design spec for inline comments. Note that this does not apply when showing the "pinned" comment sidebar.

Why?

When commenting on a block, and replying to those comments in a thread, it makes sense to position the comments alongside the block so they are visually related. This becomes increasingly important as the number of comments or the document length increases.

How?

As discussed previously, this PR will attempt to put comments in a <Popover> component.

Plan

  • When not in pinned mode, wrap comments in a Popover element
  • Anchor the popover to the block itself
  • Ensure popover sizes to fit comment thread
  • Ensure comment popovers don't overlap
  • move the visibility control from the thread to the popover so a resolved comment's container popover disappears

Challenges

  • when a document has many comments they will each need some space reserved
  • scrolling must remain performant even with many comments showing at once

Testing Instructions

When ready for testing:

  1. Ensure comment experiment is enabled
  2. leave several comments on blocks in a long test document
  3. Scroll up and down in the document to verify the comments appear alongside the blocks they were left on.

Testing Instructions for Keyboard

  • Same as above, scroll with keyboard

Screenshots or screencast

@adamsilverstein adamsilverstein force-pushed the try/align-comments-with-blocks branch from 9a34681 to a76001a Compare September 16, 2025 15:49
@adamsilverstein
Copy link
Member Author

adamsilverstein commented Sep 18, 2025

Still fixing some issues and struggling thru some challenges, here is a screencast of work in progress:

screencast.2025-09-18.15-12-15.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vertically align comments with related block (in unpinned mode)
1 participant