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
2 changes: 2 additions & 0 deletions css/backoffice/components/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ $ibo-badge-colors: (
'orange' : ($ibo-color-orange-100, $ibo-color-orange-900),
'red': ($ibo-color-red-100, $ibo-color-red-900),
'pink': ($ibo-color-pink-100, $ibo-color-pink-900),
'purple': ($ibo-color-purple-100, $ibo-color-purple-900),
'yellow': ($ibo-color-yellow-200, $ibo-color-yellow-900),
) !default;


Expand Down
2 changes: 1 addition & 1 deletion css/setup.css

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions css/setup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -611,32 +611,6 @@ body {
.setup-extension--missing .setup-extension--icon{
color:#a00000;
}
.setup-extension-tag {
display: inline-flex;
background-color: grey;
border-radius: 8px;
padding-left: 3px;
padding-right: 3px;
margin-right: 3px;
&.installed{
background-color:#9eff9e
}
&.notinstalled{
background-color:#ed9eff
}
&.tobeinstalled{
background-color:#9ef0ff
}
&.tobeuninstalled{
background-color:#ff9e9e
}
&.notuninstallable{
background-color:#ffc98c
}
&.removed{
background-color: #969594
}
}

.ibo-extension-details {
align-items: flex-start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ private function GetAvailableExtensions(bool $bIncludePackageExtensions = false)
'uninstallable' => $oExtension->CanBeUninstalled(),
'remote' => $oExtension->IsRemote(),
'missing' => $oExtension->bRemovedFromDisk,
'cannot-be-installed' => (!$oExtension->bInstalled && count($oExtension->aMissingDependencies) > 0),
],

];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'Cette extension fait partie de l\'installation actuelle.',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'va être installé',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'Cette extension sera installée lors de l\'installation.',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'ne peut pas être installée',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'Cette extension ne peut pas être installée car une ou plusieurs dépendances ne sont pas satisfaites.',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'pas installé',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'Cette extension ne fait pas partie de l\'installation actuelle.',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'va être désinstallé',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'UI:Layout:ExtensionsDetails:BadgeInstalled+' => 'This extension is part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled' => 'to be installed~~',
'UI:Layout:ExtensionsDetails:BadgeToBeInstalled+' => 'This extension will be installed during the setup.~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled' => 'cannot be installed~~',
'UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+' => 'This extension cannot be installed because one or more dependencies are not satisfied.~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled' => 'not installed~~',
'UI:Layout:ExtensionsDetails:BadgeNotInstalled+' => 'This extension is not part of the current installation.~~',
'UI:Layout:ExtensionsDetails:BadgeToBeUninstalled' => 'to be uninstalled~~',
Expand Down
2 changes: 1 addition & 1 deletion setup/wizardsteps/WizStepModulesChoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ protected function DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefau
$sTooltip .= '<div id="badge--'.$sId.'--not-installed" class="ibo-badge ibo-block unchecked ibo-is-blue-grey" title="This extension is not part of the current installation." >not installed</div>';
}
if (!$aFlags['uninstallable']) {
$sTooltip .= '<div id="badge--'.$sId.'--not-uninstallable" class="ibo-badge ibo-block ibo-is-orange" title="Once this extension has been installed, it should not be uninstalled." >cannot be uninstalled</div>';
$sTooltip .= '<div id="badge--'.$sId.'--not-uninstallable" class="ibo-badge ibo-block ibo-is-yellow" title="Once this extension has been installed, it should not be uninstalled." >cannot be uninstalled</div>';
}

$sMetadata = '';
Expand Down
15 changes: 12 additions & 3 deletions sources/Application/UI/Base/Component/Badge/Badge.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Badge extends UIBlock
public const BLOCK_CODE = 'ibo-badge';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/badge/layout';

//Colors defined in _badge.scss
/** @var string ENUM_COLOR_SCHEME_NEUTRAL */
public const ENUM_COLOR_SCHEME_NEUTRAL = 'neutral';
/** @var string ENUM_COLOR_SCHEME_VALIDATION */
Expand All @@ -25,12 +26,20 @@ class Badge extends UIBlock
public const ENUM_COLOR_SCHEME_RED = 'red';
/** @var string ENUM_COLOR_SCHEME_CYAN */
public const ENUM_COLOR_SCHEME_CYAN = 'cyan';
/** @var string DEFAULT_COLOR_SCHEME */
/** @var string ENUM_COLOR_SCHEME_GREY */
public const ENUM_COLOR_SCHEME_GREY = 'grey';
/** @var string DEFAULT_COLOR_SCHEME */
/** @var string ENUM_COLOR_SCHEME_BLUE_GREY */
public const ENUM_COLOR_SCHEME_BLUE_GREY = 'blue-grey';
/** @var string DEFAULT_COLOR_SCHEME */
/** @var string ENUM_COLOR_SCHEME_ORANGE */
public const ENUM_COLOR_SCHEME_ORANGE = 'orange';
/** @var string ENUM_COLOR_SCHEME_PURPLE */
public const ENUM_COLOR_SCHEME_PURPLE = 'purple';
/** @var string ENUM_COLOR_SCHEME_YELLOW */
public const ENUM_COLOR_SCHEME_YELLOW = 'yellow';
/** @var string ENUM_COLOR_SCHEME_BLUE */
public const ENUM_COLOR_SCHEME_BLUE = 'blue';
/** @var string ENUM_COLOR_SCHEME_PINK */
public const ENUM_COLOR_SCHEME_PINK = 'pink';
/** @var string DEFAULT_COLOR_SCHEME */
public const DEFAULT_COLOR_SCHEME = self::ENUM_COLOR_SCHEME_NEUTRAL;
private string $sLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,20 @@ public static function MakeOrange(string $sLabel, string $sTooltip = '', ?string
{
return new Badge($sLabel, Badge::ENUM_COLOR_SCHEME_ORANGE, $sTooltip, $sId);
}
public static function MakeYellow(string $sLabel, string $sTooltip = '', ?string $sId = null)
{
return new Badge($sLabel, Badge::ENUM_COLOR_SCHEME_YELLOW, $sTooltip, $sId);
}
public static function MakePurple(string $sLabel, string $sTooltip = '', ?string $sId = null)
{
return new Badge($sLabel, Badge::ENUM_COLOR_SCHEME_PURPLE, $sTooltip, $sId);
}
public static function MakeBlue(string $sLabel, string $sTooltip = '', ?string $sId = null)
{
return new Badge($sLabel, Badge::ENUM_COLOR_SCHEME_BLUE, $sTooltip, $sId);
}
public static function MakePink(string $sLabel, string $sTooltip = '', ?string $sId = null)
{
return new Badge($sLabel, Badge::ENUM_COLOR_SCHEME_PINK, $sTooltip, $sId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ExtensionDetailsUIBlockFactory extends AbstractUIBlockFactory
private const BADGE_ID_TO_BE_UNINSTALLED = 'to-be-uninstalled';
private const BADGE_ID_NOT_UNINSTALLABLE = 'not-uninstallable';
private const BADGE_ID_MISSING_FROM_DISK = 'missing-from-disk';
private const BADGE_ID_CANNOT_BE_INSTALLED = 'cannot-be-installed';

public static function MakeInstalled(string $sCode, string $sLabel, string $sDescription = '', array $aMetaData = [], array $aExtraFlags = [], string $sAbout = '')
{
Expand Down Expand Up @@ -69,6 +70,7 @@ public static function MakeNotInstalled(string $sCode, string $sLabel, string $s
{
$aBadges = [];
$bUninstallable = $aExtraFlags['uninstallable'] ?? true;
$bCannotBeInstalled = $aExtraFlags['cannot-be-installed'] ?? false;
$bSelected = $aExtraFlags['selected'] ?? false;
$bDisabled = $aExtraFlags['disabled'] ?? false;
Comment thread
Timmy38 marked this conversation as resolved.
self::AddExtraBadges($aBadges, $bUninstallable, false, $sCode);
Expand All @@ -86,8 +88,19 @@ public static function MakeNotInstalled(string $sCode, string $sLabel, string $s
);
$oBadgeToBeUninstalled->AddCSSClass('checked');
$aBadges[] = $oBadgeToBeUninstalled;
if ($bCannotBeInstalled) {
$bSelected = false;
$aBadges[] = BadgeUIBlockFactory::MakeOrange(
Dict::S('UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled'),
Dict::S('UI:Layout:ExtensionsDetails:BadgeCannotBeInstalled+'),
self::GetBadgeId($sCode, self::BADGE_ID_CANNOT_BE_INSTALLED)
);
Comment on lines +91 to +97

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.

P1 "Cannot be installed" badge not gated by toggle state

The new orange badge has no checked or unchecked CSS class, so it is always visible regardless of whether the extension's toggler is on or off. Every other state-dependent badge (installed, to-be-installed, not-installed) is tied to the toggle via those classes. When the extension is toggled off the user sees both "not installed" (grey) and "cannot be installed" (orange) simultaneously — arguably fine as a persistent warning — but when toggled on they see "to be installed" (cyan) and "cannot be installed" (orange) at the same time, which is contradictory.

More importantly, when $bCannotBeInstalled is true the toggler is never disabled. A user can select an extension that will silently fail to install. Consider calling $oExtensionDetails->GetToggler()->SetIsDisabled(true) (and optionally hiding it) when this flag is set, mirroring the $bMissingFromDisk pattern above.

}
$oExtensionDetails = new ExtensionDetails($sCode, $sLabel, $sDescription, $aMetaData, $aBadges, $sAbout);

if ($bCannotBeInstalled) {
$oExtensionDetails->GetToggler()->SetIsDisabled(true);
}
if ($bSelected) {
$oExtensionDetails->GetToggler()->SetIsToggled(true);
}
Expand All @@ -102,7 +115,7 @@ public static function MakeNotInstalled(string $sCode, string $sLabel, string $s
private static function AddExtraBadges(array &$aBadges, bool $bUninstallable, bool $bMissingFromDisk, string $sCode)
{
if (!$bUninstallable) {
$aBadges[] = BadgeUIBlockFactory::MakeOrange(
$aBadges[] = BadgeUIBlockFactory::MakeYellow(
Dict::S('UI:Layout:ExtensionsDetails:BadgeNotUninstallable'),
Dict::S('UI:Layout:ExtensionsDetails:BadgeNotUninstallable+'),
self::GetBadgeId($sCode, self::BADGE_ID_NOT_UNINSTALLABLE)
Expand Down
Loading