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

Open
jakob.scheid wants to merge 4 commits from feature/setting-value-function into main
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 added 2 commits 2026-08-05 01:40:02 +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.
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 added 2 commits 2026-08-05 01:45:53 +02:00
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 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
This pull request doesn't have enough required approvals yet. 0 of 1 official approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/setting-value-function:feature/setting-value-function
git checkout feature/setting-value-function
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Seekra/frontend#168