-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add named IDs to stregsystemet #295
Conversation
Codecov Report
@@ Coverage Diff @@
## next #295 +/- ##
==========================================
+ Coverage 82.44% 82.84% +0.39%
==========================================
Files 31 31
Lines 2518 2623 +105
Branches 182 188 +6
==========================================
+ Hits 2076 2173 +97
- Misses 412 418 +6
- Partials 30 32 +2
Continue to review full report at Codecov.
|
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 haven't tested this, only read the code changes, and left some comments based on that. I think some more validation of the names of NamedProduct
are required.
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.
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 alias handling in views could be handled better.
- Why do we show a random alias instead of all?
- Why do we have to show an alias if none exist? (N/A -> id)
However this is nothing that blocks merging.
This pull request adds named IDs to stregsystemet.
This has been requested by several fembers since STS got named IDs as shorthands for buying.
The named IDs do not change the way products are parsed when purchases, as they are handled in pre-processing. This means the user does not need to know about the IDs, however may use them if they are known to the user.
An example of a named ID purchase is
tester øl
which would be preprocessed totester 14
by looking for a named ID in the database linked to øl. If an ID is not found, the string is left as is (e.g.tester asdfghjkl
would remain the same) and give a parse error.