Skip to content

Presets: Add auto Persisting + Pinning Presets - #2644

Merged
AmmarAbouZor merged 7 commits into
esrlabs:masterfrom
AmmarAbouZor:persist-presets
Sep 17, 2026
Merged

AmmarAbouZor merged 7 commits into
esrlabs:masterfrom
AmmarAbouZor:persist-presets

Conversation

@AmmarAbouZor

Copy link
Copy Markdown
Member

This PR closes #2632

It adds multiple features for presets management enabling persisting them automatically with limits or explicitly with pinning function.

It includes:

  • Persist presets between across instance sessions automatically with configurable limit and default value of 25 preset
  • Add function to pin/unpin presets, where pinned presets will be always persisted regardless of unpinned presets limit
  • Add entry in application settings to configure unpinned presets automatic persistence limit with the option to disable it by setting it to zero
  • Group preset commands in a kebab menu instead of having all button on the UI, while keeping apply function on the presets as well.

Persist least 10 use presets automatically in application storage
directory
* Users can pin there presets which persist them across running sessions
  regardless of their activity order and can grow with no limits.
* App still persists the last 10 modified unpinned presets.
* Users can pin/unpin from a toggle in the UI. However this need more
  refinements.
* Display pinned presets at the start, which is implemented without full
  sort but rather by iterating through presets twice; once for pinned
  and once for unpinned.
* Scroll to preset on pinned status changes to keep the presets in the
  view.
+ Use icon for pin/unpin state keeping the command in the menu only.
* Add entry in application settings for the limit of maximum persisted
  unpinned preset
* Set default value to 25 instead of 10
* Drop `PresetsStorage`: presets keep their dirty state in the registry,
  which hands out the save snapshot directly, removing the staged clone
  and the duplicated dirty flag.
* Avoid increasing revision number and set dirty to true on pin state
  changes as it doesn't change the presets themselves.
* Mark function as private
@AmmarAbouZor
AmmarAbouZor merged commit 8d58a3a into esrlabs:master Sep 17, 2026
1 check passed
@AmmarAbouZor
AmmarAbouZor deleted the persist-presets branch September 17, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Presets do not persist after closing the application

1 participant