Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prepare for JavaFX-property-based launcher settings #665

Merged
merged 2 commits into from
Nov 12, 2021

Conversation

skaldarnar
Copy link
Member

@skaldarnar skaldarnar commented Sep 1, 2021

Contains

This prepares Settings to take over the role of LauncherSettings as source of truth for the launcher settings.

The information is stored in JavaFX properties wrapping the actual value. The use of properties allows for reactive bindings to simplify automatic updates of the UI.

When storig a (legacy) LauncherSettings object we also deserialize an equivalent Settings object to JSON. Vice versa, we can also read Settings from a JSON file.

The new Settings object is not yet used.

  • feat: evolve Settings to an FX property-based settings object
  • feat: use fx-json to automate de-/encoding of JavaFX properties

How to test

This PR has no semantic or funcational changes.

However, you can test that the Settings object is properly serialized alongside the `.properties' file. The content should be pretty-printed JSON with the same values as the (soon-to-be legacy) launcher settings file.

Vice versa, the settings.json is parsed to a Settings object if present and it's content printed out when the launcher loads settings from disk. Check the logs for correctnes of the output.


Contributes to #522

Based on #662

Extracted from #663

@skaldarnar skaldarnar added Topic: Configuration Related to configuration design, settings and storage Type: Enhancement New features or noticable improvements. labels Sep 1, 2021
@skaldarnar skaldarnar changed the base branch from master to chore/consolidate-launcher-settings September 1, 2021 16:15
Base automatically changed from chore/consolidate-launcher-settings to master September 1, 2021 16:18
This prepares `Settings` to take over the role of `LauncherSettings` as
source of truth for the launcher settings.

The information is stored in JavaFX properties wrapping the actual
value. The use of properties allows for reactive bindings to simplify
automatic updates of the UI.

When storig a (legacy) `LauncherSettings` object we also deserialize an
equivalent `Settings` object to JSON. Vice versa, we can also read
`Settings` from a JSON file.

The new `Settings` object is not yet used.
@jdrueckert
Copy link
Member

Launcher improvements

@jdrueckert jdrueckert merged commit 634037c into master Nov 12, 2021
@jdrueckert jdrueckert deleted the feat/fx-property-based-settings branch November 12, 2021 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: Configuration Related to configuration design, settings and storage Type: Enhancement New features or noticable improvements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants