Batch rich HTML updates#16
Merged
Merged
Conversation
Siedlerchr
marked this pull request as ready for review
July 19, 2026 19:43
- Test the batching itself instead of only the new overload's signature: count model rebuilds for the batched call (1) against the two separate setters (2). Verified to fail when the batching guard is removed. - Restore the single-argument setHtml call in viewRendersHtmlIntoRichTextArea, which had lost its coverage to the new overload. - Re-render inside the finally block so a throwing property listener cannot leave the rendered content out of sync with the updated properties. - Document the batching exception on the class javadoc, which still claimed an unconditional re-render on every property change. - Add the new public API to the changelog. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SoJLfS17Nn4jCHYX1WxoTP
34 tasks
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 changed
Adds a
RichHtmlView#setHtml(String, HtmlRenderOptions)overload that updates the source HTML and its render options as one batched operation.Why
Preview consumers often change both the HTML and base URI together. Previously, each property listener rebuilt the RichText model independently, so the old content could be rendered once before the new content was rendered.
Impact
Consumers can update a rich HTML preview and its options with one model rebuild, reducing UI-thread work during preview changes. Existing single-property APIs retain their behavior.
Validation
./gradlew guiTest --tests org.jabref.htmltonode.RichHtmlViewTestAI assistance
OpenAI Codex (GPT-5) was used for implementation assistance; the change and validation were reviewed in this session.