Skip to content

Ensure notes feature scales to many notes #71668

@adamsilverstein

Description

@adamsilverstein

What problem does this address?

The current notes implementation may not scale well when there are many (hundreds or thousands) notes (or comment replies) on a post.

The comment REST API endpoint only returns 100 records at a time so fetching many will require multiple requests - my expectation is the current UI will only display comments when all comments have loaded.

Note that for the initial display we only show the top level comments (plus a message about the number of replies). Clicking a comment threat shows the replies.

What is your proposed solution?

  • Only load top level comments in the initial request
  • In the background load all of the (remaining) data
  • Ensure data fetching properly paginates thru >100 records
  • Possibly/future: display comment placeholders until first request request completes to avoid layout shift (we already know which blocks have comments). this applies more once we have comments positioned next to their related block in popovers.

related (see especially recent discussion): #10169

Metadata

Metadata

Labels

[Feature] NotesPhase 3 of the Gutenberg roadmap around block commenting[Status] In ProgressTracking issues with work in progress[Type] PerformanceRelated to performance efforts

Type

Projects

Status

📥 Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions