Commit Graph

161 Commits

Author SHA1 Message Date
Florian Müllner
fa81335fe8 extensions-app: Create about dialog from metainfo
Using the existing metainfo to populate the about window means that
we stop duplicating information, which is generally a good idea.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3158>
2024-02-01 12:11:17 +00:00
Florian Müllner
dfff65bf05 extensions-app: Fix app ID in .Devel metainfo
The ID is currently hard-coded to the non-development one, with
the result that the .Devel app effectively doesn't have any
metainfo.

Fix that by configuring the file with the correct ID.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3158>
2024-02-01 12:11:17 +00:00
Florian Müllner
0c705aefc1 extensions-app: Use new adaptive dialogs
We already fulfill all prerequisites of the new adaptive dialogs,
so the port is straight-forward and painless.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3148>
2024-01-30 23:22:32 +01:00
Florian Müllner
41b94ccf11 extensions-app: Remember window state
It's good practice to save and reload the window size and
maximization state, and easy enough to implement, so let's
do that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3115>
2024-01-13 23:44:35 +01:00
Florian Müllner
99f3b24911 Bump version to 46.alpha
Update NEWS.
2024-01-07 11:16:54 +01:00
Florian Müllner
e75a2ca146 extensions-app: Only change state if necessary
The `state-set` signal is emitted to change the underlying state,
which can have two reasons:

 1. the user toggled the switch
 2. the extension's `enabled` state changed externally

In the second case, calling enable/disable is pointless at best,
and can mess up the expected state by permanently disabling an
extension that was disabled because of the global kill switch.

Address this by only calling enable/disable if the new state does
not already match the current value of the `enabled` property.

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7305

Fixes: fec523f83f ("extensions-app: Use new 'enabled' property")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3090>
2024-01-07 10:02:23 +00:00
Florian Müllner
7a9bfa2744 extensions-app: Add compat code for older shell versions
The Extensions app is also distributed as flatpak, so we cannot
assume that its version matches the shell. In order to not show
all extensions as disabled when running under a shell version that
doesn't include the `enabled` property yet, add a fallback based
on the current state.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
2024-01-03 20:05:05 +00:00
Florian Müllner
fec523f83f extensions-app: Use new 'enabled' property
The switch for enabling/disabling extensions currently bases its
state on the extension's ACTIVE state.

This is problematic in the enabled-but-inactive case, because
activating the switch tries to change the state from off to on,
which leads to enabling an already enabled extension (an obvious
no-op).

The new `enabled` property allows us to do better, and use delayed
state changes where the switch position represents the `enabled`
state, and the trough color whether the extension is ACTIVE.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
2024-01-03 20:05:05 +00:00
Florian Müllner
e6624f8ba1 extensionSytem: Rename ENABLED/DISABLED states
The ENABLED state means that an extension's `enable()` method
was called successfully.

This usually matches whether an extension *should* be enabled
according to the enabled-extensions/disabled-extensions settings,
but not necessarily: If an extension had an error or does not
support the currently active mode, its actual state is different.

We currently only expose the actual state to external tooling,
but whether an extension should be enabled is relevant as well,
for example to disable a lock-screen only extension from the
regular session.

For that purpose we will expose a separate `enabled` property.
To avoid confusion with the existing states, change the exposed
names to (IN)ACTIVE.

This does not affect the D-Bus API, as the numeric values of
the states remain unchanged.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
2024-01-03 20:05:05 +00:00
Sabri Ünal
8e0308d097 extensions-app: Restore developer_name
The newly added developer name syntax appears not implemented
across related platforms: GNOME Software, Flathub, etc.

There is no harm in using both deprecated and newly introduced
tags together, and neither appstream-glib nor appstreamcli
fails to validate this usage.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3079>
2023-12-24 00:40:32 +03:00
Sabri Ünal
a8fbb57cdd extension-app: Improve appdata for AppStream 1.0
- Use the `<developer><name>` tag instead of the deprecated `<developer_name>`
- Implement appstreamcli for extra appdata validation
- Fix a release description
- Update the donation URL
- Add the translation tag

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3071>
2023-12-21 19:26:57 +00:00
Florian Müllner
f43a05bee6 extensions-app: Update metainfo
After the last rounds of redesign, it's time to update
the appdata accordingly:

- update screenshots
- add screenshot captions
- point homepage to apps.gnome.org
- mark as mobile adaptive

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
1667b36abd extensions-app: Overhaul search
Instead of awkwardly filtering two different lists, use a separate
search page that filters a single list, similar to what libadwaita
does for preference windows.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
7907b9754b extensions-app: Use ListModel to track extensions
Manually adding and removing rows to dynamic lists is rather
old-fashioned, GTK 4 strongly encourages the use of models.

Modernize the code by exposing extensions as ListModel, and
bind it to the two lists with appropriate filters.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
2c592059bc extensions-app: Use property bindings in row
Now that extensions are represented as GObjects, we can update
the UI via property bindings instead of manually handling the
logic in the code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
1f7ca2bf38 extensions-app: Bind actions' enabled properties
Most properties that determine the availability of an action are
not expected to change, but now that extensions are represented
as a GObject, we can just generically set up bindings for all
actions instead of explicitly tracking the properties that we
expect to change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
198c7bbd9c extensions-app: Turn Extension into a GObject
This makes the Extension class usable as item-type in models,
and allows us to use property bindings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
f7ded3e509 extensions-app: Split out ExtensionManager
The extension handling is currently intertwined with the UI.

Splitting it out provides a clearer separation, and will allow
us to switch to a model-based UI later.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
3d070fdc6b extensions-app: Move classes to their own files
Using a single source file is getting unwieldy, so start
splitting it up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
ee5b428232 extensions-app: Stop simulating Shell.global
ExtensionUtils no longer relies on the global object, so we don't
have to simulate it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
fa587b4b9e extensions-app: Use console for logging
This allows us to use different log levels, and an appropriate
log domain.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
f7c739ae4e extensions-app: Stop setting description tooltip
We no longer ellipsize the description label, so the tooltip
no longer has a purpose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
628e41890f extensions-app: Use details popover
Showing all the extension info and possible actions in every
row is fairly noisy, and doesn't match the usual list patterns.

Streamline the UI by moving the actions and most of the info into
a details popover, so the rows themselves get closer to the
standard pattern.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7119

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
82d3e55b68 extension-app: Remove tooltips from row suffixes
The updates/error icons are now interactive, and have more information
in the corresponding popover than could be covered
by a tooltip.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
e252887731 extensions-app: Use less concise error strings
Now that the error information is displayed in a separate popover,
we can afford to be more verbose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
ed3394a953 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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
b2040b20c7 extensions-app: Set labelled-by relation for lists
We use our own lists so we can do filtering, but that means we
lose the built-in relation with the group's title.

Set the relation ourselves, so the two lists are described correctly
in screen readers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
a6d991b8f2 extensions-app: Update group headers
Change titles to the clearer "User/System Extensions" and drop the
description.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
e064c2a785 extensions-app: Make kill switch more compact
Instead of using a subtitle, move the stability warning into an
information popover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
592ad186c6 extension-app: Use mnemonics in confirmation dialog
Mnemonics (aka "access keys") should be used whenever possible:

https://developer.gnome.org/hig/guidelines/keyboard.html#access-keys

They are currently missing from the confirmation dialog, add them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
05c4db4372 extensions-app: Add shortcuts window
There aren't many shortcuts and all of them are standard, but
documenting them is still good practice, and our main menu is
a tad bit less empty.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
fdb7700535 extensions-app: Remove Help menu item
The app has been around for quite a while now, but there still
isn't any user documentation. Time to remove a menu item that
doesn't do anything.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Automeris naranja
8bf52109b0 extensions-window: Add placeholder text to the search entry
"Text fields should have placeholder text or a label".

https://developer.gnome.org/hig/patterns/controls/text-fields.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>
2023-12-12 16:53:48 +00:00
Automeris naranja
ee5a26593e extensions-window: Add tooltips to headerbar buttons
"Controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>
2023-12-12 16:53:48 +00:00
Automeris naranja
c925446723 extensions-window: Allow opening Main Menu with F10
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>
2023-12-12 16:53:48 +00:00
Florian Müllner
2d34fbe2e7 extensions-app: Use banner instead of action bar
Action bars have largely gone out of fashion, and Banner is an
appropriate replacement in our case, so switch to that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3048>
2023-12-11 14:24:01 +00:00
Aryan Kaushik
6db55eaea6 extensions-app: Support "version-name" metadata field
The extensions site recently added support for a custom
"version-name" string in metadata:
gitlab.gnome.org/Infrastructure/extensions-web/-/merge_requests/154

This allows developers to control the version that is exposed to
users. As the version according to the developer is almost always
more relevant than the automatic version assigned by the website,
use it instead of the "version" field if set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2995>
2023-11-30 14:10:27 +01:00
Florian Müllner
2127c62b21 Bump version to 45.0
Update NEWS.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2960>
2023-09-16 20:27:58 +02:00
Florian Müllner
54d68344a2 extensions-app: Update metainfo screenshots
With the new libadwaita widgets, the overall look has changed,
so it's time to retake the screenshots.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2960>
2023-09-16 20:27:58 +02:00
Florian Müllner
f83dae197f Bump version to 45.rc
Update NEWS.
2023-09-06 13:55:22 +02:00
Carlos Garnacho
412fad5643 Bump version to 45.beta.1
Update NEWS.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2882>
2023-08-11 01:22:08 +02:00
Florian Müllner
071f92cfb6 cleanup: Remove spaces in object literals
We only adopted this style relatively recently, so there's a bit
more to adjust. Still, it's manageable and another step towards
getting rid of the legacy style.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2866>
2023-08-09 15:10:37 +00:00
Florian Müllner
add49bcba1 Bump version to 45.beta
Update NEWS.
2023-08-08 12:36:03 +02:00
Florian Müllner
3f80470e26 extensions-app: Port config to ESM
The app uses a different Config module than the rest of the code
base, so we can port it separately.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2868>
2023-08-07 19:05:50 +00:00
Evan Welsh
e48ff53a78 extensions: Port app to ESM
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499>
2023-08-05 22:16:23 +02:00
Evan Welsh
64aa871a8a js: Add JSDoc to exported functions and fix incorrect JSDoc formatting
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499>
2023-08-05 22:16:23 +02:00
Florian Müllner
f0ba468664 extensions-app: Stop setting VERSION in config
We set it because it was referenced by (here unused) code
in ExtensionUtils. This changed in commit 4a0b0e26c7, so
stop setting it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2844>
2023-07-23 15:36:10 +02:00
Florian Müllner
27ffc37668 extensions-app: Style development window
Libadwaita includes a standard style class to distinguish
nightly/development versions from regular instances, but
we never to around applying it.

Do that now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2841>
2023-07-13 15:33:06 +00:00
Florian Müllner
c67614b522 extensions-app: Include a non-fake Config
We currently include a fake config.js file to satisfy the indirect
import from ExtensionUtils. However we're about to need to pass
build-time information into the program ourselves, so generate
a proper file.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2841>
2023-07-13 15:33:06 +00:00
Florian Müllner
0c6c45d426 Bump version to 45.alpha
Update NEWS.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2817>
2023-07-06 19:23:10 +02:00