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
Recommendation feedback [DB + API] #1143
Recommendation feedback [DB + API] #1143
Conversation
Hello @vansika! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-10-20 11:08:46 UTC |
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.
This looks very good -- only minor comments. Now ready for tests!
listenbrainz/webserver/views/recommendations_cf_recording_feedback_api.py
Show resolved
Hide resolved
listenbrainz/webserver/views/recommendations_cf_recording_feedback_api.py
Outdated
Show resolved
Hide resolved
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.
The PR looks awesome. Was just wondering if the Pydantic model can be simplified.
@mayhem pushed the requested changes and tests. Have a look, I want to merge it today, possibly :) |
I doubt I'll have time until Tuesday, sadly. |
listenbrainz/db/tests/test_recommendations_cf_recording_feedback.py
Outdated
Show resolved
Hide resolved
listenbrainz/tests/integration/test_recommendations_cf_recording_feedback_api.py
Show resolved
Hide resolved
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.
Looks good to me, even though I find it weird to create the objects twice..
listenbrainz/db/tests/test_recommendations_cf_recording_feedback.py
Outdated
Show resolved
Hide resolved
e805734
to
639210e
Compare
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.
* recommendation feedback model * use enum vals as feeeback to store in db * db and api script for recommendation feedback * PEP-8 fixes * tests feedback (db) * tests feedback (API) * tests update * don't create two objects
* recommendation feedback model * use enum vals as feeeback to store in db * db and api script for recommendation feedback * PEP-8 fixes * tests feedback (db) * tests feedback (API) * tests update * don't create two objects
* schema for storing recommendation feedback (#1126) * schema for recommendation feedback * rename enum strings and enum name * Separate component for Recommendations (#1133) * recommendation componeent and recommendation card * CSS for recommendation component * shift recommendationPaginationControl to main method don't modify bootstrap classes in recommendation-page.less * fix utils.tsx error * html emoticons for rec feddback * update func name * revamp listens and recommendations type * tests for recommendation component * tests for rec component * Refactor RecentListens - Remove recommendations code (#1146) * refactor recentListens * fix indentation * remove unused const * Recommendation feedback [DB + API] (#1143) * recommendation feedback model * use enum vals as feeeback to store in db * db and api script for recommendation feedback * PEP-8 fixes * tests feedback (db) * tests feedback (API) * tests update * don't create two objects * Sync recommendation feedback with emoticons (#1149) * tests feedback (db) * tests update * sync feedback * add missing props to test file * simplify get feedback for multiple recording query * keep recommendationFeedback type same as recommendationFeedback enum don't mutate the previous state * add event.stopPagination to stop closing of dropdown when submitting feedback * use Icon + text for feedback * use regular font awsome icons in place of stroke * if feedback given render corresponding feedback solid * remove redundant log statements * don't use prevState value in currRecPage * remove componentDidUpdate * adjust alignement of feedback for mobile view * capitalize feedback text * don't show feedbacks options for user != currentUser * define mediaquery after regular padding * tests for feedback * don't overwrite afterRecommendationDisplay in tests * add comment to instruct eslint to ignore import issue * tests for db * check for html elements before and after updating feedback * test interdependency of button and dropdown * format tests - nitpicks * remove bad_recommendation feddback type * adjust spacing between emoticons
Database script to store recommendation feedback + Feedback API script to submit, delete, get recommendation feedback!