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

[DO NOT MERGE] Transition to mod profiles being composed of mod groups #30

Closed
wants to merge 4 commits into from
Closed

Conversation

jieyouxu
Copy link
Collaborator

@jieyouxu jieyouxu commented Aug 4, 2023

⚠️ DEPRECATED: this PR will be superseded by a future PR ⚠️

This PR migrates the conceptual model from the simple model of mod profiles simply containing mods to a more hierarchical model of mod profiles being composed of layered mod groups. Updating a mod group in turn updates all the mod profiles which depend on it. See #14 for more context.

It also implements versioned configuration files (config.json, profiles.json -> mod_data.json, cache.json) and their migration.

Pending Work

  • Add drag-and-drop move support for the profiles so the contained mod profiles can be reordered to adjust load order.
  • Add some explanation to the new model.
  • Handle config file versioning and migration (config.json, profiles.json -> mod_data.json, cache.json). NEEDS TESTING.

Future Work

  • Migrate from side-by-side panel to floating windows.

@jieyouxu jieyouxu changed the title [PROTOTYPE] Transition to mod profiles being composed of mod groups Transition to mod profiles being composed of mod groups Aug 4, 2023
@jieyouxu jieyouxu marked this pull request as ready for review August 4, 2023 23:21
@trumank trumank force-pushed the master branch 2 times, most recently from 7349f60 to 7c90eaa Compare August 5, 2023 16:13
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
#	src/gui/mod.rs
Manually editing the `profiles.json` and `mod_groups.json` config files
are prone to errors and likely will cause crashes.
src/main.rs Outdated Show resolved Hide resolved
@trumank
Copy link
Owner

trumank commented Aug 7, 2023

I think the mod groups feature conceptually needs a lot more work before it's ready to be merged, and refactoring the current GUI logic and implementing versioned config migrations are things that should happen before then. The currently GUI logic is a sprawling mess which makes maintaining this PR a lot of work in the meantime.

Here are things that should be addressed beforehand:

  • split async GUI logic into its own module
  • unify "GUI locking" check into just a single function call or flag
    • Currently every action that can possibly lock the entire GUI is checked individually in each place its needed which is verbose and error prone
  • modularize the current "profile view" so it's possible to do things like put it in a window or create multiple windows each showing a different profile
  • modularize the current "select/add/remove/rename thing" component so it can be shared between many types of things
  • migrate internal state to using mod groups without actually exposing it in the UI
    • Most of the complexity of mod groups is just in the UI so spitting the feature into two stages (internal state and UI) would allow for versioned configs and migrations to be implemented now without being blocked by the complexity of the UI

Once these are complete it should make implementing the rest of the mod groups feature a lot simpler.

@jieyouxu
Copy link
Collaborator Author

jieyouxu commented Aug 7, 2023

Makes a lot of sense to me. I would prefer to restart this PR after some GUI refactoring and versioned config land to not contribute even more mess to the current GUI. If you have some refactoring that you'd want to do, please do go ahead as I don't plan to maintain this PR (I prefer to start fresh after the refactoring due to inevitable large amounts of merge conflicts) at its current form.

@jieyouxu jieyouxu changed the title Transition to mod profiles being composed of mod groups [DO NOT MERGE] Transition to mod profiles being composed of mod groups Aug 7, 2023
@jieyouxu jieyouxu marked this pull request as draft August 7, 2023 18:21
@jieyouxu jieyouxu mentioned this pull request Aug 7, 2023
4 tasks
@jieyouxu
Copy link
Collaborator Author

Closing since #46 is merged.

@jieyouxu jieyouxu closed this Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants