Skip to content

Present a semantic changelog - #9048

Draft
hweihwang wants to merge 1 commit into
review/structured-markdown-comparison-modelfrom
review/structured-markdown-comparison-changes
Draft

Present a semantic changelog#9048
hweihwang wants to merge 1 commit into
review/structured-markdown-comparison-modelfrom
review/structured-markdown-comparison-changes

Conversation

@hweihwang

@hweihwang hweihwang commented Aug 14, 2026

Copy link
Copy Markdown

The model from #9047 produces typed descriptors, but a raw list is hard to read and nothing outside Text can use it. This PR turns it into a changelog view and exposes it to other apps.

What's in this PR

  • The Changes view: records grouped under the section heading they occurred in, labelled by kind, each with its own before/after preview
  • A public factory, window.OCA.Text.createMarkdownContentComparison, so other apps can mount a comparison
  • Stable selection by descriptor ID, an explicit "no rendered differences" state, and a hide-formatting-only filter

The Changes view: 25 records grouped by section, each with its own before/after preview
The Changes view, shown through the Collectives dialog from the integration unit in nextcloud/collectives. Text ships no standalone host, so this is the only way to see the view running today. Text owns the model and views; Collectives owns the dialog.

Design notes

  • The changelog is the default view. "What changed" is the usual question.
  • The factory is a capability, not a version. Consumers check for the function, not a version string.
  • A group of three edits renders three previews. One merged preview lost two of the three.

Stack

Depends on: #9047. Base: review/structured-markdown-comparison-model, retargets to main once #9047 merges. Followed by #9049.

Verification

ts:check and lint pass. The complete suite passes at this tip: 1,820/1,820. Grouping, previews, filters and navigation are exercised by the live end-to-end suite recorded for the Collectives PRs.

Related

Happy to answer any questions in review.

Expose the Text comparison factory and render grouped changes by document section. Preserve every changed-only preview in multi-edit blocks with semantic deletion and insertion markup.

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
@hweihwang

Copy link
Copy Markdown
Author

Note on CI: the static-psalm-analysis failure is at lib/Migration/Version030201Date20201116110353.php, a 2020 migration this stack does not touch — the diff is limited to src/ and tests. Upstream main's last static-analysis run passed on 2026-08-04; this looks like psalm-version drift flagging an untouched file. Nothing in this PR's diff is involved; happy to look into it upstream if maintainers want a separate fix.

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.

1 participant