[PR #5998] Further theme system developments #6617

Open
opened 2026-02-05 10:36:59 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5998
Author: @ssddanbrown
Created: 1/26/2026
Status: 🔄 Open

Base: developmentHead: further_theme_development


📝 Commits (9)

  • 36649a6 Theme: Updated view registration to be dynamic
  • c32b168 Theme: Added the ability to add views before/after existing ones
  • 9fcfc76 Theme: Added testing of registerViewToRender* functions
  • 1b17bb3 Theme: Changed how before/after views are registered
  • 4949520 Theme System: Added initial module implementations
  • cd84074 Theme System: Split & organised tests, changed module version to string
  • 120ee38 Theme Modules: Added testing coverage
  • aa0a8dd Theme Modules: Added dev documentation
  • 45ae03c Theme Modules: Added install helper command

📊 Changes

23 files changed (+1657 additions, -553 deletions)

View changed files

📝 app/App/Providers/ThemeServiceProvider.php (+18 -0)
📝 app/App/helpers.php (+1 -2)
📝 app/Config/view.php (+1 -7)
app/Console/Commands/InstallModuleCommand.php (+249 -0)
📝 app/Theming/ThemeController.php (+4 -3)
📝 app/Theming/ThemeEvents.php (+10 -0)
app/Theming/ThemeModule.php (+59 -0)
app/Theming/ThemeModuleException.php (+7 -0)
app/Theming/ThemeModuleManager.php (+133 -0)
app/Theming/ThemeModuleZip.php (+93 -0)
📝 app/Theming/ThemeService.php (+62 -5)
app/Theming/ThemeViews.php (+104 -0)
📝 app/Translation/FileLoader.php (+12 -7)
📝 app/Util/SvgIcon.php (+5 -6)
📝 dev/docs/logical-theme-system.md (+35 -0)
dev/docs/theme-system-modules.md (+60 -0)
📝 dev/docs/visual-theme-system.md (+5 -2)
📝 tests/TestCase.php (+18 -0)
tests/Theme/LogicalThemeEventsTest.php (+321 -0)
tests/Theme/LogicalThemeTest.php (+105 -0)

...and 3 more files

📄 Description

Additions

  • Before/After view include support.
  • Modular hack support - Theme Modules
  • Module fetch format/system.

Ideas

  • Abstract usage of THEME_* config env options?

Todo

  • Testing for before/after view include support.
  • Theme system doc updates for new registerViewRenderBefore and registerViewRenderAfter methods.
  • Theme system doc updates for modules.
  • Testing for all theme modules systems.
  • Document module ZIP format.
  • Install Module Command - Manual Testing
  • Install Module Command - PHP Unit Coverage

Doc Updates

TODO


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/5998 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 1/26/2026 **Status:** 🔄 Open **Base:** `development` ← **Head:** `further_theme_development` --- ### 📝 Commits (9) - [`36649a6`](https://github.com/BookStackApp/BookStack/commit/36649a618858e0309fce0f1d5ce90bfaf47c4605) Theme: Updated view registration to be dynamic - [`c32b168`](https://github.com/BookStackApp/BookStack/commit/c32b1686a95e17ab143faac1eb6b1611fe0e5286) Theme: Added the ability to add views before/after existing ones - [`9fcfc76`](https://github.com/BookStackApp/BookStack/commit/9fcfc762ec9bf36b173a002fccbc702eeba410b3) Theme: Added testing of registerViewToRender* functions - [`1b17bb3`](https://github.com/BookStackApp/BookStack/commit/1b17bb3929d35410bfb5ed80f15bad911f84e832) Theme: Changed how before/after views are registered - [`4949520`](https://github.com/BookStackApp/BookStack/commit/4949520194a8397497e15155e90c46de46693bde) Theme System: Added initial module implementations - [`cd84074`](https://github.com/BookStackApp/BookStack/commit/cd84074cdf80242fe177fe8b16401bb14e46a7ce) Theme System: Split & organised tests, changed module version to string - [`120ee38`](https://github.com/BookStackApp/BookStack/commit/120ee38383c1a07f03405e88406a565dad1acc67) Theme Modules: Added testing coverage - [`aa0a8dd`](https://github.com/BookStackApp/BookStack/commit/aa0a8dda114e0c0872ed11f8c69b6529aadab84f) Theme Modules: Added dev documentation - [`45ae03c`](https://github.com/BookStackApp/BookStack/commit/45ae03ceac1110eac8072b7733941fadc63cd438) Theme Modules: Added install helper command ### 📊 Changes **23 files changed** (+1657 additions, -553 deletions) <details> <summary>View changed files</summary> 📝 `app/App/Providers/ThemeServiceProvider.php` (+18 -0) 📝 `app/App/helpers.php` (+1 -2) 📝 `app/Config/view.php` (+1 -7) ➕ `app/Console/Commands/InstallModuleCommand.php` (+249 -0) 📝 `app/Theming/ThemeController.php` (+4 -3) 📝 `app/Theming/ThemeEvents.php` (+10 -0) ➕ `app/Theming/ThemeModule.php` (+59 -0) ➕ `app/Theming/ThemeModuleException.php` (+7 -0) ➕ `app/Theming/ThemeModuleManager.php` (+133 -0) ➕ `app/Theming/ThemeModuleZip.php` (+93 -0) 📝 `app/Theming/ThemeService.php` (+62 -5) ➕ `app/Theming/ThemeViews.php` (+104 -0) 📝 `app/Translation/FileLoader.php` (+12 -7) 📝 `app/Util/SvgIcon.php` (+5 -6) 📝 `dev/docs/logical-theme-system.md` (+35 -0) ➕ `dev/docs/theme-system-modules.md` (+60 -0) 📝 `dev/docs/visual-theme-system.md` (+5 -2) 📝 `tests/TestCase.php` (+18 -0) ➕ `tests/Theme/LogicalThemeEventsTest.php` (+321 -0) ➕ `tests/Theme/LogicalThemeTest.php` (+105 -0) _...and 3 more files_ </details> ### 📄 Description ### Additions - Before/After view include support. - Modular hack support - Theme Modules - Module fetch format/system. ### Ideas - Abstract usage of `THEME_*` config env options? ### Todo - [x] Testing for before/after view include support. - [x] Theme system doc updates for new `registerViewRenderBefore` and `registerViewRenderAfter` methods. - [x] Theme system doc updates for modules. - [x] Testing for all theme modules systems. - [ ] Document module ZIP format. - [ ] Install Module Command - Manual Testing - [ ] Install Module Command - PHP Unit Coverage ### Doc Updates TODO --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:36:59 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6617