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

Recommendation feedback [DB + API] #1143

Merged
merged 8 commits into from Oct 20, 2020

Conversation

vansika
Copy link
Member

@vansika vansika commented Oct 16, 2020

Database script to store recommendation feedback + Feedback API script to submit, delete, get recommendation feedback!

@pep8speaks
Copy link

pep8speaks commented Oct 16, 2020

Hello @vansika! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 362:131: E501 line too long (139 > 130 characters)

Comment last updated at 2020-10-20 11:08:46 UTC

Copy link
Member

@mayhem mayhem left a 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!

Copy link
Collaborator

@shivam-kapila shivam-kapila left a 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.

listenbrainz/db/model/recommendation_feedback.py Outdated Show resolved Hide resolved
@vansika
Copy link
Member Author

vansika commented Oct 17, 2020

@mayhem pushed the requested changes and tests. Have a look, I want to merge it today, possibly :)

@mayhem
Copy link
Member

mayhem commented Oct 17, 2020

I doubt I'll have time until Tuesday, sadly.

@vansika vansika requested review from mayhem and shivam-kapila and removed request for shivam-kapila October 19, 2020 05:58
Copy link
Member

@mayhem mayhem left a 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..

Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

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

:shipit:

@mayhem mayhem merged commit f54a4a3 into metabrainz:rec-component-feedback Oct 20, 2020
vansika added a commit to vansika/listenbrainz-server that referenced this pull request Dec 24, 2020
* 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
vansika added a commit to vansika/listenbrainz-server that referenced this pull request Jan 17, 2021
* 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
mayhem pushed a commit that referenced this pull request Jan 20, 2021
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants