Skip to content

fix(backend): category/settings page fixes - #88

Open
skerbis wants to merge 2 commits into
stack/01-corefrom
stack/02-backend
Open

fix(backend): category/settings page fixes#88
skerbis wants to merge 2 commits into
stack/01-corefrom
stack/02-backend

Conversation

@skerbis

@skerbis skerbis commented Aug 11, 2026

Copy link
Copy Markdown
Member

Part 2 of stacked PRs for #86.

Depends on: #87

Scope:

  • Backend category/settings related fixes
  • Page controller adjustments
  • hide_categories focused fix layer
  • Improved category/article selection UX (selectpicker + search)

Solved issues:

How and why:

  • Linkmap Widget mit ID Eingabe #43 (Bedienung Link/Artikel-Auswahl):
    • How: Die Kategorie-/Artikelauswahl wurde als durchsuchbares Select (selectpicker + Live-Search) aktiviert und beim Seiten-Load robust initialisiert.
    • Why: Statt Klickpfaden durch Tiefe/Struktur ist die Auswahl schneller und präziser, insbesondere bei vielen Kategorien/Artikeln.
  • Backend-Form-Logik im Kategorienbereich:
    • How: pageCategories() wird wieder zuverlässig auf rex:ready ausgeführt, sodass Feldsichtbarkeiten korrekt reagieren.
    • Why: Nach Entfernen von Inline-JS muss die zentrale Initialisierung greifen, sonst entsteht ein UX-Regressionsfehler.
  • Output-Filter-Härtung bei hide_categories:
    • How: DOM-Parse abgesichert und Option-Entfernung ohne Live-NodeList-Mutationsproblem umgesetzt.
    • Why: Verhindert Edge-Case-Fehler bei fehlerhaftem HTML und stellt konsistente Filter-Ergebnisse sicher.

Base: stack/01-core
Next stacked PR: stack/03-docs

Copilot AI lite review requested due to automatic review settings August 11, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is the second stacked step for #86 and focuses on backend adjustments around the category/settings pages and the hide_categories layer, aligning page controllers with the new namespaced class layout introduced in the core baseline.

Changes:

  • Updates backend page entrypoints (pages/*) to reference the new namespaced page controller classes.
  • Refines metainfo sidebar rendering to wrap the form in a PJAX container and hardens article lookups.
  • Refactors category settings form inputs and tightens typing/handling across category-related backend helpers.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pages/settings.php Imports the namespaced settings page controller class.
pages/content.metainfo.php Avoids null dereference on missing articles and wraps metainfo form in a PJAX container.
pages/categories.php Imports the namespaced categories page controller class.
lib/pages/page_settings.php Adds namespace/imports and simplifies metainfo settings handling with backward-compatible config fallback.
lib/pages/page_categories.php Adds namespace/imports, adds stricter typing, and refactors category/article selection UI.
lib/hide_categories.php Adds namespace/imports, uses CSP nonces for injected scripts, and replaces DOM parsing approach for option removal.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/hide_categories.php Outdated
Comment thread lib/pages/page_categories.php
@skerbis

skerbis commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Addressed Copilot review comments in follow-up commit 7f5b491:

  • Restored backend initialization so pageCategories() runs again on rex:ready.
  • Hardened option filtering in hide categories output filter:
    • Guarded HTMLDocument::createFromString() with try/catch fallback.
    • Avoided mutating a live NodeList during iteration by collecting nodes first and removing afterwards.

Also rebased top stack branch (stack/03-docs) onto updated stack/02-backend to keep stack consistency.

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.

Linkmap Widget mit ID Eingabe

2 participants