N°9681 cannot be installed fix edge case#969
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an edge case (issue N°9681) in the combodo-data-feature-removal setup UI where an already-installed extension whose dependencies can no longer be fulfilled was not treated as "cannot be installed". It generalizes the cannot-be-installed flag so it applies regardless of installation status, and updates the ExtensionDetailsUIBlockFactory so the corresponding badge is shown and the toggler is disabled for both installed and not-installed extensions in that state.
Changes:
- Compute
cannot-be-installedpurely from missing dependencies (no longer gated on the extension being uninstalled). - Handle
cannot-be-installedinMakeInstalled(disable + untoggle the toggler, add the orange badge) by threading the flag throughAddExtraBadges. - Refactor
MakeNotInstalledto add the badge via the sharedAddExtraBadgeshelper and untoggle/disable the toggler consistently.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sources/Application/UI/Base/Layout/Extension/ExtensionDetailsUIBlockFactory.php |
Threads the cannot-be-installed flag into AddExtraBadges, disables the toggler for installed extensions in that state, and centralizes the orange badge creation. |
datamodels/2.x/combodo-data-feature-removal/src/Controller/DataFeatureRemovalController.php |
Sets cannot-be-installed based solely on missing dependencies so installed extensions with unmet dependencies are also flagged. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
| Filename | Overview |
|---|---|
| sources/Application/UI/Base/Layout/Extension/ExtensionDetailsUIBlockFactory.php | Propagates bCannotBeInstalled to MakeInstalled and centralises badge logic in AddExtraBadges; ordering issue in MakeNotInstalled allows $bSelected=true to override the toggler-off state set by bCannotBeInstalled. |
| datamodels/2.x/combodo-data-feature-removal/src/Controller/DataFeatureRemovalController.php | Removes the !bInstalled guard from the cannot-be-installed condition so that already-installed extensions with missing dependencies are also flagged correctly. |
Reviews (1): Last reviewed commit: "N°9681 Small fix & refactor" | Re-trigger Greptile
No description provided.