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

[CONFIGURATOR] Versioning + UI #1013

Merged
merged 20 commits into from
Jan 6, 2025
Merged

Conversation

Nico-Sanchez
Copy link
Collaborator

@Nico-Sanchez Nico-Sanchez commented Dec 19, 2024

Motivation

This is part of #1002
Closes #1029
Closes #1030

Summary of changes

How to test it?

To create a new version:

  • New version button
  • Go all way down and submit the form.
  • In versions index, you can see all the versions + the one you just created.
  • You can see everything in it, edit it, etc.

What to check:

  • The game will use the current one, if you mark as current a new one, everything should work as expected.
  • Everything should be properly associated, without losing any record.

Known issues and next steps:
#1028

Checklist

  • Tested the changes locally.
  • Reviewed the changes on GitHub, line by line.
  • This change requires new documentation.
    • Documentation has been added/updated.

@Nico-Sanchez Nico-Sanchez changed the title Create new settings version table [CONFIGURATOR] Versioning + UI Dec 19, 2024
@Nico-Sanchez Nico-Sanchez force-pushed the create-new-settings-version-table branch from 8e125da to 79ee94e Compare December 24, 2024 16:54
@Nico-Sanchez Nico-Sanchez marked this pull request as ready for review December 24, 2024 17:00
@Nico-Sanchez Nico-Sanchez force-pushed the create-new-settings-version-table branch from b6f5d9e to 2f70766 Compare January 2, 2025 14:50
Copy link
Contributor

@tvillegas98 tvillegas98 left a comment

Choose a reason for hiding this comment

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

Great work Nico!! Although the PR is big, it adds a lot of things that were needed for the configurator.
Regarding the UX for the version creation and the problem it has now, probably we should make the user create the things in the order we want to, for example, if Characters depends on Skills, lets set the skills first then the characters later, so we can use the updated skills from these version and not the previous one 😄. We can address it in another PR

|> cast_assoc(:consumable_items)
|> cast_assoc(:skills, with: &Skill.assoc_changeset/2)
|> cast_assoc(:map_configurations, with: &MapConfiguration.assoc_changeset/2)
|> cast_assoc(:game_configuration, with: &GameConfiguration.assoc_changeset/2)
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to add a unique_constraint for the name because otherwise this could happen very easily

Screenshot 2025-01-03 at 5 36 03 pm

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As we discussed at the office, we'll address this in the future.
We might want to "soft-delete" a version and re-use that name. Also, the feature is quite lax for now, we can modify everything and move to any version.
After we use it, we'll know better how to make this feature more secure and restrictive in a useful way to our needs.

@manucamejo manucamejo merged commit e511e14 into main Jan 6, 2025
1 check passed
@manucamejo manucamejo deleted the create-new-settings-version-table branch January 6, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants