Add more settings to settings page #37
Labels
No labels
Blocked
Good First Issue
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nexus/nexus#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This issue is for tracking the settings page development.
For the settings page we need a good balance between intuitive UI/UX, accessibility and familiarity with other matrix clients or chat apps.
As case studies we can look at clients like Cinny, Element and maybe Discord/Telegram and look for the good and bad. Ultimately we want the client to be easily accessible and nice and easy to use. This means we need to think about "sane defaults" and intuitive and findable settings for whatever you may want to change for your use case.
Personally I think crucial features are:
Notes:
https://docs.federated.nexus/docs/a8d7e170-2670-43d5-bf71-b46c0b680caf/
Settings Page Developmentto Settings PageGoing to just write down the way this works in my mind:
We have a
IMap<String, IList<Setting>>to describe the settings page, where the String is a category name, and each Setting is a class with:Widget widget, String name, String description, for searching.Then, on mobile, these will be shown as buttons, each one pushing a page of widgets for that category.
On desktop, categories will be a sidebar, and the main pane will show the widgets for that category.
For search, we can have a search icon that pushes a page that searches all settings' descriptions and names for a match, and shows specifically those widgets in a listview.
For actually storing the client settings, we have two main choices:
@Henry-Hiles wrote in #37 (comment):
I think long term JSON is better for multiple reasons:
- Easy to export as it is just a file.
- Easy to import, just swap existing JSON-File with new one in one go.
- More flexibility, in case we ever need it. (like nested structures.)
- Same underlying structure for settings on all systems.
- JSON is widely adopted/easy to read and use
- JSON-Serializer is build in into dart
If we want to make it easy we could just use Shared Preferences to safe a JSON String, but I think https://pub.dev/packages/path_provider would be a good option meaning we would technically have no platform specific code we would have to write ourselves. (Although we could if we wanted.)
@Henry-Hiles What do you think?
Yes, we already use
path_provider, so we would use that to find the path.Settings Pageto Add more settings to settings pageA settings page was implemented, but I'm reopening this to track adding more settings, as right now we only have a couple.
Files of interest:
lib/controllers/settings_sections_controller.dart: Describes each setting in the UI: title, description, icon, etc.lib/models/settings.dart: Describes each setting in the config file, and the defaults.These two should be all thats needed to be modified for more settings :)