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

Hide comments from specific user #291

Closed
malamud opened this issue Mar 21, 2019 · 4 comments
Closed

Hide comments from specific user #291

malamud opened this issue Mar 21, 2019 · 4 comments
Milestone

Comments

@malamud
Copy link

malamud commented Mar 21, 2019

As a user I would prefer not seeing comments from certain users.

Do I want to see answers on hidden user’s comments? No, I don’t.
Do I need a possibility to make that user visible again? No, I don’t.

@umputun
Copy link
Owner

umputun commented Mar 23, 2019

This is not a bad idea, but I think such action should be reversible, i.e. "make that user visible again" better to be supported. Another thing to keep in mind - this functionality may require partial hiding of some subtrees.

As of now, we don't have any support for lists of muted users and no way to attach it to other users. I think, implementing backend side for this should be very doable and even not too hard. Not sure about UI side of this.

Another idea - maybe all of this can be done completely on UI side? @Reeywhaar - what do you think? Maybe even the list of such user can be stored locally in the browser and UI will do the actual hiding. I'm not sure how easy this to make on the browser side but doesn't sound like a big deal to me. Or, maybe an in-between solution with server-side storage API and hiding on UI side.

@malamud
Copy link
Author

malamud commented Mar 23, 2019

I think it can be done completely on UI side. The list of muted users can be placed in browser storage or in cookies thereby muted user can be made visible by clearing storage or cookies. Maybe it’s not an elegant solution but the simplest one. Nevertheless if it possible to make list of muted user as part of UI it would be nice.

From the other hand if users are muted there is no need to transfer their comments from backend to frontend at all. So, maybe it should be implemented on backend as well. And maybe if do it only on UI some performance issues may appear.

@Reeywhaar
Copy link
Collaborator

Nothing complex here. Client only way is to store in localStorage.

Additionaly few endpoints can be added, so /api/v1/user will return additional list of blocked user ids, so list can be shared across multiple devices. Also, I haven't looked at #279 feature yet, what response /api/v1/user has this way.

@umputun
Copy link
Owner

umputun commented May 17, 2019

I don't think this has to support cross-device functionality. The reason for such "local filtration" can be not just "I hate this guy", but also "he's writing too many and too wordy comments I don't want to see on iphone, but fine on mac".

I suggest making it frontend-only function without any API changes, at least in the short term.

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

No branches or pull requests

3 participants