appcenter icon indicating copy to clipboard operation
appcenter copied to clipboard

Get Flatpak remote names from Title field

Open isantop opened this issue 4 years ago • 0 comments

Prerequisites

  • [*] I have searched open and closed issues for duplicates.

Feature

Is your feature request related to a problem? Please describe.

AppCenter displays the name of the Flatpak remote in the UI when viewing a Flatpak App. It's getting this from the name in the config, which is a cli-friendly (i.e. lowercase, no spaces) name of the remote. Flatpak also provides the xa.title field which can get a UI-Friendly display title of a remote, which would be better than using the name as it's intended for UI display to users.

Describe the solution you'd like

Use the Title field to display remote names in AppCenter

Existing work

https://github.com/pop-os/repoman uses Titles for displaying remotes to users (and falls back on the name when a title is unavailable, as it's an optional field):

image

libflatpak provides the FlatpakRemote.get_title() method to get the title if one is available.

Describe alternatives you've considered

It looks like GNOME Software hardcodes UI-Friendly names in the code (e.g. if remote_name == 'flathub': remote_name = 'Flathub'; this works, but we probably want to avoid doing that except in very extreme circumstances.

Additional context

Flatpak remote configuration docs libflatpak FlatpakRemote docs

isantop avatar May 12 '20 17:05 isantop