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

Add initial Apply UI implementation #973

Merged
merged 9 commits into from
Feb 20, 2024
Merged

Add initial Apply UI implementation #973

merged 9 commits into from
Feb 20, 2024

Conversation

Al12rs
Copy link
Contributor

@Al12rs Al12rs commented Feb 20, 2024

This PR adds an initial quite rough Apply button implementation.

  • Added ApplyService to be used later to queue Apply operations and ensure only one loadout is being applied to a game at a time.
  • Added ApplyControlView that contains the Apply and Launch buttons.
  • Toggled visibility of buttons based on whether there are things to apply or things are being applied.

So for now the Apply button shows up after the user makes at least one new Loadout revision since starting the app.
Pressing the button Applies the loadout while showing a spinner and hiding the Launch button.
After applying is done the button is hidden waiting for new loadout changes.

Limitations of this PR:

  • We currently don't save the last applied Loadout or the last applied Loadout revision, which is necessary to determine whether there are things that need to be applied or not (see Deploying one loadout triggers an ingestion in another loadout #871 for details).
  • Currently the newest loadout revision on startup is used as the last applied revision arbitrarily.
  • Likewise the number of changes (loadout revisions) to be applied is currently not available.
  • In this implementation Apply always ingests outside changes on top of the latest version of the loadout.
  • Launch button currently still applies (main reason is that we want to do an ingest after the program returns).
  • Ui design for the button only vaguely matches the ones on figma for now.

All of these limitations should be handled after event sourcing has been integrated, together with #871

@Al12rs Al12rs requested a review from a team February 20, 2024 13:41
@Al12rs Al12rs self-assigned this Feb 20, 2024
Copy link
Member

@erri120 erri120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

Add scheduler to ToProperty
use .Equals
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2024

Codecov Report

Attention: 98 lines in your changes are missing coverage. Please review.

Comparison is base (8728b65) 0.00% compared to head (3387fc8) 58.18%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           main     #973       +/-   ##
=========================================
+ Coverage      0   58.18%   +58.18%     
=========================================
  Files         0      637      +637     
  Lines         0    20520    +20520     
  Branches      0     1572     +1572     
=========================================
+ Hits          0    11939    +11939     
- Misses        0     8217     +8217     
- Partials      0      364      +364     
Flag Coverage Δ
Linux 57.44% <2.97%> (?)
Windows 57.39% <2.97%> (?)
clean_environment_tests 58.16% <2.97%> (?)
macOS 56.83% <2.97%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/NexusMods.App.UI/Services.cs 98.51% <100.00%> (ø)
src/NexusMods.DataModel/Services.cs 100.00% <100.00%> (ø)
...pp.UI/LeftMenu/Loadout/LoadoutLeftMenuViewModel.cs 0.00% <0.00%> (ø)
...LeftMenu/Loadout/LoadoutLeftMenuDesignViewModel.cs 0.00% <0.00%> (ø)
...p.UI/LeftMenu/Items/ApplyControlDesignViewModel.cs 0.00% <0.00%> (ø)
src/NexusMods.DataModel/ApplyService.cs 0.00% <0.00%> (ø)
...ods.App.UI/LeftMenu/Items/ApplyControlViewModel.cs 0.00% <0.00%> (ø)

... and 630 files with indirect coverage changes

@Al12rs Al12rs requested a review from erri120 February 20, 2024 15:03
@Al12rs Al12rs merged commit 24181ea into main Feb 20, 2024
7 checks passed
@Al12rs Al12rs deleted the apply_ui branch February 20, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants