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 back Left Menus and Left Menu Navigation #939

Merged
merged 16 commits into from
Feb 14, 2024
Merged

Add back Left Menus and Left Menu Navigation #939

merged 16 commits into from
Feb 14, 2024

Conversation

Al12rs
Copy link
Contributor

@Al12rs Al12rs commented Feb 13, 2024

closes #932

  • Added WorkspaceId to ILeftMenuViewModel and pass WorkspaceContructor etc to LeftMenuViewModel implementations.
    • This is to allow Left Menus to have an associated workspace and have the ability to Open pages on it.
  • Added ILeftMenuFactorys for Loadout, Home and Downloads Left Menus.
  • Added IWorkspaceAttachmentsFactoryManager that uses ILeftMenuFactories to return attached ILeftMenuViewModels.
  • Added Pages entries for My Games My Mods and In Progress pages on LeftMenus
    • Implemented opening the pages in the Workspace.
  • Added OpenPageBehavior.PrimaryDefault and OpenPageBehavior.SecondaryDefault behaviours, for right click and middle click.
  • Added methods to select a specific tab from inside WorkspaceViewModel, necessary to make sure to bring opened page into view if it replacing an existing tab.
  • Added check to avoid creating a new page when replacing a tab, if the tab has exactly the same data.
  • Automatically open the Home Workspace when opening the app (so we don't have empty workspace for now)

Skipped the workspace name stuff for this PR.
I'm actually thinking of having a property on the Workspace itself, not unlike the TabName.

@Al12rs Al12rs requested a review from erri120 February 13, 2024 16:53
@Al12rs Al12rs self-assigned this Feb 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2024

Codecov Report

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

Comparison is base (8bd7919) 55.28% compared to head (f10165e) 58.57%.

❗ 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     #939      +/-   ##
==========================================
+ Coverage   55.28%   58.57%   +3.28%     
==========================================
  Files         620      626       +6     
  Lines       20058    20177     +119     
  Branches     1545     1551       +6     
==========================================
+ Hits        11089    11818     +729     
+ Misses       8620     8003     -617     
- Partials      349      356       +7     
Flag Coverage Δ
Linux 57.90% <36.19%> (+3.16%) ⬆️
Windows 57.81% <36.19%> (+3.25%) ⬆️
clean_environment_tests 58.55% <36.19%> (+3.28%) ⬆️
network_tests ?
networking_tests ?

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

Files Coverage Δ
...usMods.App.UI/LeftMenu/Home/HomeLeftMenuFactory.cs 100.00% <100.00%> (ø)
src/NexusMods.App.UI/LeftMenu/ILeftMenuFactory.cs 100.00% <100.00%> (ø)
src/NexusMods.App.UI/Services.cs 98.44% <100.00%> (+0.10%) ⬆️
...eAttachments/WorkspaceAttachmentsFactoryManager.cs 100.00% <100.00%> (ø)
...pp.UI/LeftMenu/Home/HomeLeftMenuDesignViewModel.cs 0.00% <0.00%> (ø)
.../NexusMods.App.UI/Controls/Spine/SpineViewModel.cs 67.87% <92.59%> (+20.10%) ⬆️
...Menu/Downloads/DownloadsLeftMenuDesignViewModel.cs 0.00% <0.00%> (ø)
....UI/LeftMenu/Downloads/DownloadsLeftMenuFactory.cs 25.00% <25.00%> (ø)
...exusMods.App.UI/LeftMenu/EmptyLeftMenuViewModel.cs 0.00% <0.00%> (ø)
....App.UI/LeftMenu/Loadout/LoadoutLeftMenuFactory.cs 25.00% <25.00%> (ø)
... and 7 more

... and 42 files with indirect coverage changes

- Remove Primary and Secondary defaults from `OpenPageBehavior`
- Use new system for LeftMenu navigation
@Al12rs Al12rs requested a review from erri120 February 14, 2024 11:57
@Al12rs Al12rs merged commit d6e79c9 into main Feb 14, 2024
5 checks passed
@Al12rs Al12rs deleted the left_menu branch February 14, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants