add settings configuration parser #78

Merged
jakob.scheid merged 20 commits from feature/settings-config-parser into main 2026-05-29 14:03:15 +02:00
Member

Adds a JSON-based settings configuration parser. The config file lives at src/features/settings/settings.json and is loaded via dynamic import. A validator checks all entry types (bool, number, string, selection, section) and a Vue.js composable provides reactive access to the parsed configuration.

Related Issues

Closes: #77

Adds a JSON-based settings configuration parser. The config file lives at `src/features/settings/settings.json` and is loaded via dynamic import. A validator checks all entry types (bool, number, string, selection, section) and a Vue.js composable provides reactive access to the parsed configuration. # Related Issues Closes: #77
johannes.vos added this to the mvp-frontend milestone 2026-05-26 11:39:57 +02:00
johannes.vos added the
prio
medium
area
settings
type
feature
labels 2026-05-26 11:39:57 +02:00
johannes.vos added this to the MVP Frontend project 2026-05-26 11:39:57 +02:00
johannes.vos added 10 commits 2026-05-26 11:39:58 +02:00
johannes.vos moved this to In progress in MVP Frontend on 2026-05-26 11:40:04 +02:00
johannes.vos moved this to Review in MVP Frontend on 2026-05-26 11:40:07 +02:00
jakob.scheid requested changes 2026-05-26 11:49:46 +02:00
Dismissed
jakob.scheid left a comment
Owner

Please do not put the settings file into public/ and do not load it via fetch. You should use a dynamic JavaScript import (await import('…')) and I ask you to put the settings into src/features/settings/settings.json or something similar.

Please do not put the settings file into `public/` and do not load it via `fetch`. You should use a dynamic JavaScript import (`await import('…')`) and I ask you to put the settings into `src/features/settings/settings.json` or something similar.
Owner

Please provide a description/summay of the PR.

Please provide a description/summay of the PR.
Owner

Why did you create the empty file public/settings.js?

Why did you create the empty file `public/settings.js`?
jakob.scheid requested changes 2026-05-26 12:01:28 +02:00
Dismissed
jakob.scheid left a comment
Owner

Can you please remove the example settings?

Can you please remove the example settings?
jakob.scheid reviewed 2026-05-26 12:09:22 +02:00
@@ -0,0 +57,4 @@
assertString(entry.name, `${path}.name`);
assertString(entry.i18n, `${path}.i18n`);
if (entry.default === undefined) {
Owner

Not every setting does need a default value. I suggest omitting this check.

Not every setting does need a default value. I suggest omitting this check.
jakob.scheid marked this conversation as resolved
jakob.scheid reviewed 2026-05-26 12:11:06 +02:00
@@ -0,0 +72,4 @@
}
if (entry.type === 'selection') {
validateSelectionOptions(entry.options, path);
if (typeof entry.allowMultiple !== 'boolean') {
Owner

I think it should have a default value (false) that is used if it is not specified.

I think it should have a default value (`false`) that is used if it is not specified.
jakob.scheid marked this conversation as resolved
jakob.scheid added 1 commit 2026-05-26 12:21:56 +02:00
jakob.scheid reviewed 2026-05-26 12:31:30 +02:00
@@ -0,0 +32,4 @@
* @property {string} [description]
*/
/**
Owner

Could you please check the value of type instead of the type of default?

Could you please check the value of `type` instead of the type of `default`?
jakob.scheid marked this conversation as resolved
johannes.vos added 5 commits 2026-05-26 14:55:22 +02:00
jakob.scheid added 1 commit 2026-05-26 19:51:46 +02:00
jakob.scheid added 1 commit 2026-05-26 19:55:47 +02:00
jakob.scheid added 1 commit 2026-05-26 19:57:39 +02:00
jakob.scheid approved these changes 2026-05-29 14:02:56 +02:00
jakob.scheid added 1 commit 2026-05-29 14:03:00 +02:00
jakob.scheid merged commit 27a22ce569 into main 2026-05-29 14:03:15 +02:00
jakob.scheid deleted branch feature/settings-config-parser 2026-05-29 14:03:15 +02:00
jakob.scheid moved this to Done in MVP Frontend on 2026-05-29 14:03:41 +02:00
jakob.scheid modified the milestone from mvp-frontend to settings-ready 2026-06-05 11:14:01 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Seekra/frontend#78