Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add theme management #1284

Open
linusfj opened this issue Feb 6, 2023 · 3 comments
Open

Add theme management #1284

linusfj opened this issue Feb 6, 2023 · 3 comments
Labels
module:client/plugin Functionality that goes into plugins in client plugin:layerswitcher Functionality and features of the LayerSwitcher plugin

Comments

@linusfj
Copy link
Member

linusfj commented Feb 6, 2023

Description

Quick Layers is a feature to manage layers within the LayerSwitcher tab. The purpose of the feature is to get quick access to layers often used. One advantage of using Quick Layers is that a collection of layers can be included where not all of them need to be visible from the start. Layers can be added manually or loaded from pre-defined packages for all users. The package owner creates the Quick Layers, exports the settings to JSON, and the administrator registers the new package of Quick Layers. It will also be possible for the user to save, edit and load their own Quick Layers.


Proposed Features

  • Quick Layers Group:

    • Add a new group called "Quick layers" at the top of the layers list in the LayerSwitcher.
    • Include buttons to load pre-defined and user-defined collections of layers and delete all layers from the Quick Layer group.
  • Functionality:

    • Ensure layers within the Quick Layer group behave similarly to other layers in the LayerSwitcher (visibility toggle, access layer information).
    • Add an option to add regular layers outside the Quick Layer group to the Quick Layer group.
  • Quick Layer Package Components:

    • Title, Author, Description, Keywords, Layers, Visibility, Drawing Order, and Settings.

image


Loading pre-defined Quick Layers

  1. Click the “Open” button in the LayerSwitcher to load pre-defined collections of layers.
  2. Choose a pre-defined Quick Layer package from the list.
  3. The selected Quick Layer package will load, replacing the current layers and settings in the LayerSwitcher tab.

image


Creating user-defined Quick Layer

  1. In the LayerSwitcher, press the “More” icon and click on the option “Add to Quick layers” to build a collection of layers.
  2. Click the “Person” button in the Quick Layers Group for personal packages.
  3. Enter a Title, Owner, and Description for the new Quick Layer collection.
  4. Click "Save" to create the user-defined Quick Layer collection.
  5. The newly created Quick Layer collection will be stored using Local Storage and is available to load.

image


Example of JSON structure

image


Implementation Steps

  1. Design Quick Layers structures and create a JSON example configuration with demo layers.
  2. Develop a "Load Quick layer" interface with search, filter, and info display capabilities.
  3. Implement Quick Layer loading functionality with confirmation dialogs and Snackbar notifications.
  4. Add "Load JSON" feature to import custom Quick Layer configurations.
  5. Add "Export to JSON" functionality for sharing and storing layer settings.
  6. Manage black and white backgrounds for packages.

Summary

Implement the Quick Layers feature in the LayerSwitcher tab to simplify loading, managing, and sharing pre-defined sets of layers and their associated settings.

@linusfj linusfj added module:client/plugin Functionality that goes into plugins in client plugin:layerswitcher Functionality and features of the LayerSwitcher plugin labels Feb 6, 2023
@jacobwod
Copy link
Member

jacobwod commented Feb 7, 2023

Could you elaborate regarding themes? It can mean many different things, e.g. the light and dark mode themes we already have in Hajk.

@linusfj
Copy link
Member Author

linusfj commented Feb 10, 2023

Themes in the context of the Active tab in the LayerSwitcher refers to a pre-defined set of active layers.

I've updated the description with additional information.

@linusfj
Copy link
Member Author

linusfj commented Mar 29, 2023

The issue description has been updated to align with the new concept of Quick Layers, which has replaced Active Layers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:client/plugin Functionality that goes into plugins in client plugin:layerswitcher Functionality and features of the LayerSwitcher plugin
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants