Commit Graph

227 Commits

Author SHA1 Message Date
Florian Müllner
3ed3b5587b extensions-tool/list: Use new enabled property for filtering
The new property is a better match for the `--enabled`/`--disabled`
flags, not least because both are used for completions to the
`enable` and `disable` commands.

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
e8f125c57a extensions-tool: Include enabled info in details
Both an extension's ACTIVE state and whether it is enabled can
be interesting, so include both when displaying extension details.

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
01e9724d75 extensions-tool: Rename ENABLED/DISABLED states
Follow the update terminology used by the extension system, in
particular when displaying extension details to the user.

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
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
Zander Brown
4373a91911 doc: Switch documentation to gi-docgen
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1873>
2023-12-13 14:52:48 +01: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
Florian Müllner
dcee0c6329 extension-tool: Remove old compatibility code
Since GNOME 44, extension schemas are compiled at install time.

At the time GNOME 46 is released, this will be all supported versions,
so start relying on it and drop the old compatibility
code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3042>
2023-12-03 12:25:06 +01:00
Florian Müllner
ca47e7f8e3 extension-tool: Show "version-name" field if set
Now that both the website and the Extension app support the custom
"version-name" field, we should expose it in the CLI tool as well.

As a more developer-oriented tool, keep showing the automatic
version along-side the new field when both are set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3034>
2023-11-30 15:23:14 +01: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
Florian Müllner
5fedb3de9e extensions-tool/create: Optionally include prefs
We currently only create boilerplate code for the actual
extension. Now that libadwaita has largely standardized
preference UIs, it makes sense to allow creating the
prefs.js boilerplate as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2889>
2023-08-26 17:10:28 +00:00
Florian Müllner
8a01141e7d extensions-tool/create: Create schema template
When creating an extension with --settings-schema, rather than
just adding a corresponding entry in the metadata, generate the
gschema boilerplate as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2889>
2023-08-26 17:10:28 +00:00
Florian Müllner
a9740d1a79 extensions-tool/create: Add --settings-schema flag
Like with the gettext domain, the GSettings schema ID can be
picked up from the metadata, so allow setting it via an
optional CLI flag.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2889>
2023-08-26 17:10:28 +00:00
Florian Müllner
8b9d8d7bb8 extensions-tool/create: Add --gettext-domain flag
Our convenience API considers a `gettext-domain` field in the
metadata, so it makes sense for `gnome-extensions create` to
allow setting it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2889>
2023-08-26 17:10:28 +00:00
Florian Müllner
aaa9cb88b9 extensions-tool: Add quick settings template
Extending quick settings has become popular enough to justify a
template.

Add a small indicator+quick-item example that exercises the
previously added API.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2894>
2023-08-20 02:06:24 +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
b81beece36 extensions: Port templates to ESM
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499>
2023-08-05 22:16:23 +02:00