Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

feat: URL handler for easily installing themes #771

Open
@Arcitec

Description

@Arcitec

Feature description

This was discussed on the Matrix chat.

Having an easy way to install themes via clickable links would grow the ecosystem of themes for Gradience, by making it easy for authors to control their own theme repositories and still giving users a super easy way to install the themes via Gradience.

The ideas that were discussed:

  1. gradience://official/pop-dark would download and activate (in Gradience's preview mode) the "Pop Dark" theme from the official collection.
  2. gradience://curated/dracula would do the same but for built-in "curated" themes.
  3. gradience://import/https://github.com/lassekongo83/adw-colors/tree/main/themes/dracula/dracula.json would download a theme and activate the preview for it.

The wording for the 3rd link format is undecided. It would be good to choose something that's clear and calming for newbies. Ideas that were discussed include these ones:

  • gradience://raw/<url>
  • gradience://external/<url>
  • gradience://import/<url>
  • gradience://url-import/<url>
  • gradience://download/<url>

The word "import" was highlighted as a good candidate.

Additional Context

The feature should preferably remember what URL the theme was imported from, in a database/JSON file on disk, so that it becomes easy to implement "update check" or "replace existing local copy to avoid duplicates" later.

Related ticket: #772

First Stage Ideas

A good idea for this "first stage" would be to add the following features:

  • The URL handlers.
  • Confirmation popup so users have to confirm if they really want to download the theme.
  • Downloading themes from external URLs.
  • Remembering the URL that the external theme was downloaded from. This won't need any GUI/display to the user. It's just necessary for making all future features (auto-updates/auto-replacing duplicates) easier to handle later.

Did you read the Code of Conduct?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions