Skip to content

LB-1508 Allow hiding personal recommendations #2808

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

Conversation

Sumit1797
Copy link
Contributor

@Sumit1797 Sumit1797 commented Mar 12, 2024

Problem

A user can hide recommendations received from another user but not personal recommendations.
(https://tickets.metabrainz.org/browse/LB-1508?filter=12410)

Solution

Add the ability to hide personal recommendations

Action

Change the backend api user_timeline_event_api to add an entry for personal recommendations in the hide_timeline_events table in database.

@pep8speaks
Copy link

pep8speaks commented Mar 12, 2024

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

Line 696:5: E125 continuation line with same indent as next logical line

Comment last updated at 2024-07-17 09:00:28 UTC

@Sumit1797 Sumit1797 changed the title LB-1508 bug fix LB-1508 Allow hiding personal recommendations Mar 12, 2024
Copy link
Member

@amCap1712 amCap1712 left a comment

Choose a reason for hiding this comment

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

Hi! Sorry for the delay. I just came across this PR. Can you please add tests for the feature as well?

@MonkeyDo
Copy link
Member

Ping @Sumit1797
Hi! Just wanted to know if you're able to finish the PR, or if one of us should take it over.
Thanks for letting us know !

@Sumit1797
Copy link
Contributor Author

Ping @Sumit1797 Hi! Just wanted to know if you're able to finish the PR, or if one of us should take it over. Thanks for letting us know !

Hi I missed the requested changes, I will updated the PR.

@MonkeyDo MonkeyDo requested a review from amCap1712 June 26, 2024 11:50
@MonkeyDo
Copy link
Member

MonkeyDo commented Jun 26, 2024

@amCap1712 Note that I had to add a small change to the DB create_types SQL script which will be required to run when deploying

@MonkeyDo
Copy link
Member

@Sumit1797 Hope you don't mind, it seemed like life did its thing so I took over since there wasn't much left to do and I wanted to see this PR merged :)

@Sumit1797
Copy link
Contributor Author

@Sumit1797 Hope you don't mind, it seemed like life did its thing so I took over since there wasn't much left to do and I wanted to see this PR merged :)

No problem, Sorry I couldn't spend more time on it, looking at your code it's a learning for me!

MonkeyDo added 2 commits July 17, 2024 10:04
add the personal_recording_recommendation enum value
if hidden in the database, make them hidden on the front-end as well by setting its `hidden` attribute to true
@MonkeyDo
Copy link
Member

Finished and tested on test.listenbrainz.org, users can hide an event from front-end, then reloading the page shows the hidden event, then users can unhide the event and similarly after a refresh the event is unhidden.

@MonkeyDo MonkeyDo merged commit 7ed01c4 into metabrainz:master Jul 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants