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

🪲 duplicate adventures #5385

Merged
merged 7 commits into from
Apr 9, 2024
Merged

🪲 duplicate adventures #5385

merged 7 commits into from
Apr 9, 2024

Conversation

hasan-sh
Copy link
Collaborator

@hasan-sh hasan-sh commented Apr 8, 2024

Fixes #5375

This PR changes how adventures are created. We don't need to "store" the adventures unless the teacher appllies some changes. This means whenever we redirect the teacher to the customize-adventure page, we simply initialize an adventrue, save in the current session, and if they apply a change, then we basically save it in our DB.

Not only does this prevent the issue I'm fixing, but also reduce the number of trial adventures created by teachers.

Moreover, the only downside is that teachers would have to write out the name themselves, however, this may not be a min-point afterall since giving default names is kinda encouraging creating more, and more will be created just because it becomes easy to do so!

How to test?
Create an adventure from the

  • for-teachers page
  • class-overview page
  • customize-class page

@hasan-sh hasan-sh changed the title 🪲 duplicate adventures #5375 🪲 duplicate adventures Apr 8, 2024
@hasan-sh hasan-sh marked this pull request as ready for review April 9, 2024 09:32
@Felienne Felienne self-assigned this Apr 9, 2024
Copy link
Member

@Felienne Felienne left a comment

Choose a reason for hiding this comment

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

Yes, works, thanks!

I am wondering (maybe for another issue?) if we can make all warnings look the same? Now an empty title is a lot more subtle that adding an adventure to 2 levels:

image

Maybe we should make the empty title warning in the same place?

Copy link
Contributor

mergify bot commented Apr 9, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 11163d1 into main Apr 9, 2024
12 checks passed
@mergify mergify bot deleted the fix-duplicate-adventures branch April 9, 2024 17:53
Copy link
Contributor

mergify bot commented Apr 9, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🪲 duplicate adventures
2 participants