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

Mod (downloads) Library UI initial impl #1268

Merged
merged 34 commits into from
Apr 29, 2024
Merged

Conversation

Al12rs
Copy link
Contributor

@Al12rs Al12rs commented Apr 24, 2024

Related to #1210 and #1155

  • This adds the page, the ui layouts, the bindings, and the Add button functionality.
  • Most columns are empty for now
  • Page needs to be closed and reopened to refresh the data for now
  • This also adds Icons to most of the pages
  • Remaining work will be addressed in future PRs

TODO:

  • Add Left menu entry and icon (use the new navigation system from Add NavigationControl #1266 )
  • Update Page name to "Library"
  • Update Page icon to library icon
  • Update Page name in discovery details to Library
  • Review UI to match colors and fonts from design

Bumping out to future PRs:

  • Tracking issue: Mod Library Refinements #1284
  • Make list update in real-time (get observable stream from database) (better wait for Download manager to MNemonicDB #1276 )
  • Downloaded date/time data (put "Manually added" for mod archives not downloaded through the app)
  • Use the Nexus mod name for archives that come from nexus instead of the file name.
  • Version data if available (will not be for archives that don't come from nexus, but for manual archives that come from nexus it should be possible to obtain the data with an API call, or by parsing the archive name for the embedded version number)
  • Added column data (not sure how to implement this yet, loadouts and mods probably need to be moved to Mnemonic first)
  • Filter out archives that are not manually added or downloaded (don't show nested archives like Installer.dat from SMAPI)
@Al12rs Al12rs self-assigned this Apr 24, 2024
Copy link
Contributor

This PR conflicts with main. You need to rebase the PR before it can be merged.

# Conflicts:
#	src/NexusMods.App.UI/LeftMenu/Home/HomeLeftMenuViewModel.cs
#	src/NexusMods.App.UI/Pages/LoadoutGrid/LoadoutGridViewModel.cs
Copy link
Contributor

This PR doesn't conflict with main anymore. It can be merged after all status checks have passed and it has been reviewed.

Copy link
Contributor

This PR conflicts with main. You need to rebase the PR before it can be merged.

# Conflicts:
#	src/NexusMods.App.UI/Pages/Downloads/InProgressViewModel.cs
#	src/NexusMods.App.UI/Pages/MyGames/MyGamesViewModel.cs
#	src/NexusMods.App.UI/Resources/Language.resx
Copy link
Contributor

This PR doesn't conflict with main anymore. It can be merged after all status checks have passed and it has been reviewed.

@Al12rs Al12rs marked this pull request as ready for review April 29, 2024 10:37
@Al12rs Al12rs mentioned this pull request Apr 29, 2024
8 tasks
@erri120 erri120 self-requested a review April 29, 2024 10:46
Comment on lines 9 to 11
string Version { get; init; }
string Size { get; init; }
string Date { get; init; }
Copy link
Member

Choose a reason for hiding this comment

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

These shouldn't be strings. If they stay as strings, then they won't be sortable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We store versions as strings, and comparisons there should work.
I'm not really sure how to show "-" in case of unknown date though

Copy link
Member

Choose a reason for hiding this comment

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

We store versions as strings, and comparisons there should work.

Right.

I'm not really sure how to show "-" in case of unknown date though

Hijack how the dates are displayed. Use Optional<DateTime> or something, if it's None you display - or just display nothing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm doing a direct binding from the property to the DataGridTextColumn, there is no conversion step in the code behind or anything like that. I'd prefer not to do something like the LoadoutDataGrid where each column needs a custom view, vm, type, and an special definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this to the things to to do #1284

Copy link
Member

@erri120 erri120 Apr 29, 2024

Choose a reason for hiding this comment

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

You should be able to update the binding and change the string formatting or use a converter. If that doesn't work, you can always make the text columns into template columns, which is probably easier.

@Al12rs Al12rs merged commit 44f21bb into main Apr 29, 2024
7 checks passed
@Al12rs Al12rs deleted the feat/1155-downloads-library-ui branch April 29, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants