-
Notifications
You must be signed in to change notification settings - Fork 51
Achievements #573
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
base: next
Are you sure you want to change the base?
Achievements #573
Conversation
Achievements readme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will need a bit more time to do a proper review, and test it properly
But my first thoughts:
- Having a few tests to check that the achievements keep working would be nice
- You can delete all the new migrations and regenerate a single migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another partial review,
I've just tested it as a user, my immediate thoughts
As a member:
-
It's thrilling to have achievements, awesome-ly rewarding experience
-
The popup could be bigger to make it more noticeable (and more rewarding)
-
The popup should also last longer (maybe double the duration as now)
-
Given that the duration is long enough, you could also have a link to the userpage if you click it
-
As I understand it, the Top score right now is just the amount of achievements unlocked, but it would be cool to see individual achievement scores to understand the rarity of an achievement (this could be added later)
-
We also discussed possibility of (non-)hidden achievements (but this could always also be added later)
As an admin (without reading the guide):
-
The relationship between models is quite confusing, why have achievements be attached to a constraint, when constraints intuitively are attached to achievements. This would also allow constraint reuse, if you have multiple achievements for Halloween or similar. This is also true for tasks, if they should be reusable as well
-
Furthermore, naming a constraint/task to make it more reuseable could also be neat (or at the very least adding a note field)
-
Use specialized fields instead of generic text fields, an example of this is the achievement image field, you can't know what the root path is, or the format of paths. To improve this I suggest using
FileField
or similar (as seen inKiosk
), this also allows dynamic upload of achievement icons (then you can move the achievement images from the static folder into the fixture folder) -
Add descriptions somewhere that explains what the fields in task do, I don't really understand task type, or the alcohol/caffeiene content fields
Overall, awesome work, if any of this doesn't make sense we can also discuss in person
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few suggestions :)
oops |
Koden er meget fin, den har jeg ingen ændringer til. Dog da jeg testede det på min egen computer virker det til alle altid har top 100% i achievements generelt og i de individuelle |
@ThomasBow Jeg kunne ikke genskabe problemet. For mig ser det ud til at virke, medmindre jeg overser noget. ENG: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's almost ready, I haven't tested it locally yet, I might not get time.
One of the things I'd like to test is how many more database queries a purchase causes with this change, vs. without.
I think Thomas also tested it locally.
The final thing I'd like, is at least ~10 suggestions for achievements to implement from day one when it's merged into the stregsystem (we can discuss in the FIT server) 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have achievement images in the repository? Or is this just for the fixture?
actions = [toggle_active_selected_products] | ||
|
||
|
||
class AchievementForm(forms.ModelForm): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this functionality looks like something that should be extracted to a different file, it looks like general IO for retrieving a particular filetype in the existing file structure. But I'm not even entirely sure what it does. Why not just have a file upload field, like in kiosk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need to update all the fixtures because of the migration, but I'll test it soon, and maybe just put this in the existing fixture, so we don't have to load all kinds of different fixtures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add creation date and last updated fields to all new models
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
return " | ".join(str_list) | ||
|
||
|
||
class AchievementConstraint(models.Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there really no existing month or weekday widgets? It would be cool to extract the functionality as a custom standalone field
No description provided.