sillsdev / sillsdev/languageforge-lexbox

Design a preferences backend model

Open
#1,532 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💻 FW Lite
Dominant language
C#
Stars
9
Forks
8
Avg merge
2d 13h
Merged PRs (30d)
49

Description

Describe the feature
We want to allow users to specify preferences. We also want to be able to utilize the great Configuration model built in to dotnet. Sadly MAUI does not bridge this gap for us. To do this ourselves we need to create a Configuration Provider, then we should be able to read settings saved by MAUI via Prferences, and save them back there when changed. These preferences should always override default values. This gives us a sort of back door to override default configuration in the application as well. This should be very helpful for troubleshooting or modifying log levels without having to ship a new version of the application to the user.

Shiny does something similar, but it's not using the Maui Preferences integration and their version does not support Windows so there's not much benefit for us.

For FwLiteWeb we can just create a settings.json file and read and write it on settings changes.

The API for this would look something like this:
void UpdateSettings(string key, string value)
it should be exposed to the frontend so the frontend can persist settings there.

Finally for actual user preferences. We should create a UserPreferences class in shared and we can put stuff like light/dark in there along with the selected View. Maybe we want an arbitrary dictionary for stuff but I wouldn't start there.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the MAUI Preferences integration and the Configuration Provider approach described in the issue, then compare how FwLiteWeb should use settings.json. Define the shared UserPreferences model and the frontend-facing UpdateSettings(string key, string value) API. Done means preferences override defaults, persist across supported targets, and cover the proposed light/dark and selected View settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, frontend, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.