Skip to content

Move page-subject predicates off ViewHtmlBuilder#794

Closed
JeroenDeDauw wants to merge 1 commit intomasterfrom
move-page-subject-predicates
Closed

Move page-subject predicates off ViewHtmlBuilder#794
JeroenDeDauw wants to merge 1 commit intomasterfrom
move-page-subject-predicates

Conversation

@JeroenDeDauw
Copy link
Copy Markdown
Member

For #789

pageHasMainSubject and pageHasSubjects are pure subject lookups that don't render any HTML. Reaching them via newViewHtmlBuilder() forced consumers (internal hook code; #781 RedHerb sidebar) to traverse a factory named after view-HTML construction to ask a domain question.

Move both predicates to SubjectContentRepository, where the underlying getSubjectContentByPageTitle lookup already lives. ViewHtmlBuilder now only renders HTML.

Addresses one of the two breach points raised in #789. The other (NeoWikiHooks::addNeoWikiModules called from a foreign extension's SpecialPage) lives on the frontend-extensibility branch and will follow up after #754 lands.

Doesn't claim to close #789 — that issue's broader question of whether NeoWiki should commit to a documented PHP API surface is unresolved on the issue thread.

`pageHasMainSubject` and `pageHasSubjects` are pure subject lookups
that don't render any HTML. Reaching them via `newViewHtmlBuilder()`
forced consumers (internal hook code; #781 RedHerb sidebar) to traverse
a factory named after view-HTML construction to ask a domain question.

Move both predicates to `SubjectContentRepository`, where the underlying
`getSubjectContentByPageTitle` lookup already lives. `ViewHtmlBuilder`
now only renders HTML.

Addresses one of the two breach points raised in #789. The other
(`NeoWikiHooks::addNeoWikiModules` called from a foreign extension's
SpecialPage) lives on the `frontend-extensibility` branch and will
follow up after #754 lands.
@JeroenDeDauw
Copy link
Copy Markdown
Member Author

Superseded — placement was wrong (predicates lying about being SubjectContent-shaped). Will reopen with a dedicated Application/PageSubjectsLookup using domain types.

@JeroenDeDauw JeroenDeDauw deleted the move-page-subject-predicates branch April 28, 2026 23:34
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.

Establish public PHP API surface for extensions consuming NeoWiki services

1 participant