Skip to content

Add an administration tool to install all approved styles on the demo board - #459

Open
ECYaz wants to merge 2 commits into
phpbb:3.3.xfrom
ECYaz:feature/378-demo-install-all
Open

Add an administration tool to install all approved styles on the demo board#459
ECYaz wants to merge 2 commits into
phpbb:3.3.xfrom
ECYaz:feature/378-demo-install-all

Conversation

@ECYaz

@ECYaz ECYaz commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Adds an Administration tool for each branch with a configured demo board. It installs every approved style that is missing from the demo board, skips the ones already installed and the confirmation dialog says how many need installation before anything runs.

Fixes #378

… board

Installing styles on the demo board could only be done one contribution
at a time, from each contribution's manage page. When the demo board has
to be repopulated, for example after a rebuild, every approved style has
to be installed by hand (issue phpbb#378).

Add a staggered administration tool that walks every approved and
visible style contribution and installs its latest approved revision
for the requested branch through the existing demo manager, reusing the
same install_demo() path as the per contribution button. One entry is
added to the administration tool list for each branch with a configured
demo board.

Styles already present and active on the demo board are skipped, both
the board's styles table and the style directory are checked so a wiped
database or a wiped filesystem each count as not installed. The
confirmation dialog reports how many styles the run would install,
mirroring the revision selection get_download() makes. Contributions
without a package for the branch are counted as skipped and a failing
install does not abort the run.
@iMattPro
iMattPro requested review from DavidIQ and a lite review from Copilot August 19, 2026 21:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an Administration “tool” to bulk-install missing approved style demos onto a configured demo board per phpBB branch, with a confirmation dialog that reports how many installs are pending and staggered/batched execution via the existing manage-tool AJAX flow.

Changes:

  • Introduces a new manage tool (manage/tool/demo/install_all.php) that processes approved visible styles in small batches and installs missing demos.
  • Adds a dedicated controller route/controller to customize confirmation messaging and preserve progress counters across batches.
  • Extends the style demo manager with branch selection + an “is style installed” check, and wires the new tool into Administration for each configured demo board branch.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
manage/tool/demo/install_all.php New staggered admin tool that iterates styles and installs missing demos for a selected branch.
controller/manage/tool/demo/install_all.php New tool controller overriding confirmation messaging and carrying batch counters forward.
controller/manage/administration.php Dynamically registers the new tool per configured demo branch and adds branch display naming.
contribution/style/demo/manager.php Adds branch setter, installed-style caching, and helpers for style directory naming/installed detection.
language/en/manage_tools.php Adds language strings for the new demo installation tool.
config/services.yml Registers the new manage tool service.
config/routes/manage.yml Adds the route for the new install-all tool endpoint.
config/controllers.yml Registers the new controller service and injects the tool.

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

Comment thread manage/tool/demo/install_all.php
Comment thread controller/manage/tool/demo/install_all.php Outdated
Comment thread contribution/style/demo/manager.php Outdated
…ch state

Addresses the three Copilot review remarks on PR 459. When the branch has
no usable demo board, confirm_action() now throws the not configured
message as an http_exception(200) instead of showing a generic Yes/No box
whose confirmation could only ever end in that same error; the AJAX
subscriber turns the exception into the inline tool message. The tool's
set_branch() now clears the cached board_ready so a reused instance can
never carry the previous branch's connection state. Also fixes the
retun docblock typo in the demo manager.
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.

Add command in Administration area to install all styles

2 participants