Represent chapters/excursions in editor comments list#2439
Merged
Conversation
Nests an ordered contentElements array (including backdrop elements) into each section of the entry structure. Kept as a separate hook from useEntryStructure so the more frequently used variant does not re-derive when content elements change. Both share a buildEntryStructure helper so the nested shape stays consistent.
Replace the positional (subject, {resolved}) signature with one
{subjectType, subjectId, subjectRange, resolution} options object.
Omitting the subject fields returns all threads, and resolution
('all' | 'resolved' | 'unresolved', default 'all') filters by resolved
state — so threads can be filtered by resolution alone. Subject-only
call sites keep working unchanged.
Joins comment threads from the review state with the entry structure, grouping them by chapter, section and content element (main storyline first, excursions last). Returns the located chapters, a flat list of threads in document order for the upcoming preview navigator, and the threads whose subject is no longer part of the entry.
Render the comments sidebar from the entry structure instead of a Backbone collection of items: EntryCommentsView now provides entry state (seeded from the entry and kept live via watchCollections) and builds its groups from useLocatedCommentThreads. Each chapter that has threads gets a heading using the same number and title as the chapter outline, and excursion chapters are grouped below the main chapters. Selection, highlighting and transient-thread behavior is preserved.
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.
REDMINE-21261