From ed3394a95390e7791586c00b3b39c6f4ac2d3d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 10 Dec 2023 23:59:04 +0100 Subject: [PATCH] extensions-app: Make error/update icon interactive Both icons are not immediately obvious, and the context provided by the tooltip can be hard to discover. Address this by making the icons interactive, and provide further information in a popover. Part-of: --- subprojects/extensions-app/data/css/style.css | 3 - .../extensions-app/data/ui/extension-row.ui | 73 ++++++++++++++----- subprojects/extensions-app/js/main.js | 12 +-- 3 files changed, 57 insertions(+), 31 deletions(-) diff --git a/subprojects/extensions-app/data/css/style.css b/subprojects/extensions-app/data/css/style.css index dac76335b..f9fafa717 100644 --- a/subprojects/extensions-app/data/css/style.css +++ b/subprojects/extensions-app/data/css/style.css @@ -16,6 +16,3 @@ row.extension box.information, row.extension box.status { border-spacing: 3px; } - -image.error { color: @error_color; } -image.warning { color: @warning_color; } diff --git a/subprojects/extensions-app/data/ui/extension-row.ui b/subprojects/extensions-app/data/ui/extension-row.ui index 37acb68d3..efcb852a3 100644 --- a/subprojects/extensions-app/data/ui/extension-row.ui +++ b/subprojects/extensions-app/data/ui/extension-row.ui @@ -46,23 +46,68 @@ - + false + center + false dialog-error-symbolic The extension had an error - + + Error Details + + + + + + 300 + 300 + + + + + true + + + + + + - + false + center + false software-update-available-symbolic The extension can be updated - + + Updates Details + + + + + + 200 + 200 + + + A new version of this extension is ready and will be loaded on next login. + + + true + + + + + + @@ -78,18 +123,6 @@ - - - false - true - True - 0 - - - diff --git a/subprojects/extensions-app/js/main.js b/subprojects/extensions-app/js/main.js index 77cac9122..d656e201a 100644 --- a/subprojects/extensions-app/js/main.js +++ b/subprojects/extensions-app/js/main.js @@ -361,8 +361,8 @@ var ExtensionRow = GObject.registerClass({ 'descriptionLabel', 'versionLabel', 'errorLabel', - 'errorIcon', - 'updatesIcon', + 'errorButton', + 'updatesButton', 'switch', 'actionsBox', ], @@ -503,13 +503,9 @@ var ExtensionRow = GObject.registerClass({ if (!action.enabled) this._switch.active = state; - this._updatesIcon.visible = this.hasUpdate; - this._errorIcon.visible = this.hasError; - - this._descriptionLabel.visible = !this.hasError; - + this._updatesButton.visible = this.hasUpdate; + this._errorButton.visible = this.hasError; this._errorLabel.label = this.error; - this._errorLabel.visible = this.error !== ''; this._versionLabel.label = this.version.toString(); this._versionLabel.visible = this.version !== '';