Feat(settings): function to get the value of a setting #168

Merged
jakob.scheid merged 4 commits from feature/setting-value-function into main 2026-08-06 12:50:52 +02:00
Owner

This pull request adds a function getSetting to get the value of a setting. It returns the stored value and, or otherwise the default value, or otherwise undefined.

Furthermore, a settings configuration cache store was added to avoid loading the settings always when getting a value of a setting and make the settings value retrieving function synchronous.

This function is part of a composable (useSettings ). There are tests for it.

Related issues

Closes #163

This pull request adds a function `getSetting` to get the value of a setting. It returns the stored value and, or otherwise the default value, or otherwise `undefined`. Furthermore, a settings configuration cache store was added to avoid loading the settings always when getting a value of a setting and make the settings value retrieving function synchronous. This function is part of a composable (`useSettings` ). There are tests for it. # Related issues Closes #163
jakob.scheid added this to the 0.1.0 milestone 2026-08-05 01:40:02 +02:00
jakob.scheid added the Area/SettingsKind/Feature
Priority
Medium
3
labels 2026-08-05 01:40:02 +02:00
jakob.scheid added this to the Project Board project 2026-08-05 01:40:02 +02:00
jakob.scheid moved this to Review in Project Board on 2026-08-05 01:40:05 +02:00
jakob.scheid marked the pull request as work in progress 2026-08-05 01:40:20 +02:00
jakob.scheid force-pushed feature/setting-value-function from 890404a63e to 77bfa24536 2026-08-05 01:45:53 +02:00 Compare
jakob.scheid marked the pull request as ready for review 2026-08-05 01:54:14 +02:00
jakob.scheid added a new dependency 2026-08-05 19:48:45 +02:00
jakob.scheid force-pushed feature/setting-value-function from 77bfa24536 to a17de3f132 2026-08-05 20:47:14 +02:00 Compare
jakob.gregory approved these changes 2026-08-06 12:46:34 +02:00
jakob.scheid force-pushed feature/setting-value-function from a17de3f132 to 6fa9206258 2026-08-06 12:49:52 +02:00 Compare
jakob.scheid added 4 commits 2026-08-06 12:50:35 +02:00
Added the composable useSettings that provides the function getSetting.
This function returns the set value of the setting, or otherwise the
default value. If there is no default value, it returns undefined.
Added some tests for the getSetting function from the useSettings
composable.
Added a store to cache the settings configuration. The getSetting
function from useSettings is now synchronous and uses this cache.
The settings cache is set when loading the settings initially
(asnychronously).
jakob.scheid force-pushed feature/setting-value-function from 6fa9206258 to fab7d7e901 2026-08-06 12:50:35 +02:00 Compare
jakob.scheid merged commit 7b09cd74cb into main 2026-08-06 12:50:52 +02:00
jakob.scheid deleted branch feature/setting-value-function 2026-08-06 12:50:52 +02:00
jakob.scheid moved this to Done in Project Board on 2026-08-06 12:50:59 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Reference: Seekra/frontend#168