Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/Admin/AdminDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ private function createView(): Horde_View

private function renderChrome(string $title, callable $renderBody): string
{
$themesUri = $this->registry->get('themesuri', 'horde');
$this->assetCollector->addStylesheet($themesUri . '/default/screen.css');
$this->assetCollector->addStylesheet($themesUri . '/default/admin-dashboard.css');
$this->configurator->addThemeStylesheets(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair point, and it applies to all five call sites. As things stand, ^3.2.0 lets Composer pair this with a Core release that lacks the two methods, and these pages would fatal.

@ralflang how do you prefer to handle a base PR that depends on an unreleased Core change? I see two options:

  1. Raise the constraint to the first Core release that ships Let controllers add the active theme's stylesheets and scripts Core#243, once you know its number — I'd rather not guess a version that doesn't exist yet. Merge order would then be Core#243 first.
  2. Make this PR independent of the Core version: call the new methods only when method_exists() says they are there, and fall back to the current /default/ stylesheets otherwise. No fatal on any Core version, at the cost of a compatibility branch to remove later.

Happy to push either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't handle versioning manually. The next base release will depend on a newer version of core.

$this->assetCollector,
['screen.css', 'admin-dashboard.css'],
);
$this->configurator->configure($this->assetCollector, ViewMode::BASIC);
$this->configurator->addThemeScripts($this->assetCollector);

$meta = new PageMeta(title: $title);
$html = $this->pageComposer->renderHead($meta);
Expand Down
8 changes: 5 additions & 3 deletions src/Admin/ApiRegistryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ private function createView(): Horde_View

private function renderChrome(string $title, callable $renderBody, string $currentUrl): string
{
$themesUri = $this->registry->get('themesuri', 'horde');
$this->assetCollector->addStylesheet($themesUri . '/default/screen.css');
$this->assetCollector->addStylesheet($themesUri . '/default/settings.css');
$this->configurator->addThemeStylesheets(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@TDannhauer I suggest you reconfigure copilot to NOT suggest this kind of change. This is handled in our release pipeline.

$this->assetCollector,
['screen.css', 'settings.css'],
);
$this->configurator->configure($this->assetCollector, ViewMode::BASIC);
$this->configurator->addThemeScripts($this->assetCollector);

$meta = new PageMeta(title: $title);
$html = $this->pageComposer->renderHead($meta);
Expand Down
8 changes: 5 additions & 3 deletions src/Admin/OAuthProviderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,12 @@ private function createView(): Horde_View

private function renderChrome(string $title, callable $renderBody, string $currentUrl): string
{
$themesUri = $this->registry->get('themesuri', 'horde');
$this->assetCollector->addStylesheet($themesUri . '/default/screen.css');
$this->assetCollector->addStylesheet($themesUri . '/default/settings.css');
$this->configurator->addThemeStylesheets(
$this->assetCollector,
['screen.css', 'settings.css'],
);
$this->configurator->configure($this->assetCollector, ViewMode::BASIC);
$this->configurator->addThemeScripts($this->assetCollector);

$meta = new PageMeta(title: $title);
$html = $this->pageComposer->renderHead($meta);
Expand Down
8 changes: 5 additions & 3 deletions src/Admin/OAuthSystemStatusController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ private function createView(): Horde_View

private function renderChrome(string $title, callable $renderBody, string $currentUrl): string
{
$themesUri = $this->registry->get('themesuri', 'horde');
$this->assetCollector->addStylesheet($themesUri . '/default/screen.css');
$this->assetCollector->addStylesheet($themesUri . '/default/settings.css');
$this->configurator->addThemeStylesheets(
$this->assetCollector,
['screen.css', 'settings.css'],
);
$this->configurator->configure($this->assetCollector, ViewMode::BASIC);
$this->configurator->addThemeScripts($this->assetCollector);

$meta = new PageMeta(title: $title);
$html = $this->pageComposer->renderHead($meta);
Expand Down
8 changes: 5 additions & 3 deletions src/Settings/OAuthAccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,12 @@ private function createView(): Horde_View

private function renderChrome(string $title, callable $renderBody): string
{
$themesUri = $this->registry->get('themesuri', 'horde');
$this->assetCollector->addStylesheet($themesUri . '/default/screen.css');
$this->assetCollector->addStylesheet($themesUri . '/default/settings.css');
$this->configurator->addThemeStylesheets(
$this->assetCollector,
['screen.css', 'settings.css'],
);
$this->configurator->configure($this->assetCollector, ViewMode::BASIC);
$this->configurator->addThemeScripts($this->assetCollector);

$meta = new PageMeta(title: $title);
$html = $this->pageComposer->renderHead($meta);
Expand Down