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

Add `minimize-user-comments` feature #2146

Open
wants to merge 27 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@notlmn
Copy link
Contributor

commented Jun 10, 2019

Closes #1629.

  • Let's you mute or unmute users from the dropdown available for comments. Comments from these muted users will be minimized on page load.
  • As mentioned in #1629 (comment), the original post, issues, and PRs from muted users will still be visible, but any of their comments will be minimized.
  • Shows list of users who are muted in the options.
  • Disable self-muting.
  • Possibly show on a users profile if you are muting them.

Screenshots

A minimized comment

image

Unmute button

image

Mute button

image

Options menu

image

Test

On any issue or PR.

notlmn added some commits Jun 10, 2019

@bfred-it

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2019

Should the comment be hidden by hide-useless-comments instead of being minimized inline? If not, then this is a completely different feature from hide-useless-comments and should be separate.

@notlmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Should the comment be hidden by hide-useless-comments instead of being minimized inline?

Looking at the feature name, it should be hidden and not minimized. But if a user were having a conversation with another user muted by the viewer then it would not make any sense on what is happening. But if there were a minimized comment then that would mean the they are having a conversation.

And if the comments were hidden inline, then the user can individually expand that specific comment, unmute the user then and there without having to go look in the options section and try to see who commented on the issue/PR by individually unmuting each user.


If not, then this is a completely different feature from hide-useless-comments and should be separate.

That's what I initially thought when the code grew a bit large than what it was before. WDYT? Should I move it to something like minimize-muted-user-comments?

@bfred-it

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2019

And if the comments were hidden inline, then the user can individually expand that specific comment, unmute the user then and there without having to go look in the options section and try to see who commented on the issue/PR by individually unmuting each user.

To see the hidden comment you’d click the regular link at the bottom: “3 unhelpful comments were hidden”

I never needed this feature so let’s see what @sindresorhus expects from it.

If split, it would be called mute-users

@sindresorhus

This comment has been minimized.

Copy link
Owner

commented Jun 14, 2019

Should the comment be hidden by hide-useless-comments instead of being minimized inline?

It should be minimized.

@bfred-it

This comment has been minimized.

Copy link
Collaborator

commented Jun 19, 2019

Then should be extracts into mute-users because there’s no overlap.

Also perhaps if the feature runs before the minimized comment preview, a preview can automatically appear here too.

What kind of comment do you plan on muting? Would this be effective even if it doesn’t block notifications? Are you sure you’re not going to unminimize the comment anyway?

Show resolved Hide resolved source/options.html Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated

notlmn added some commits Jun 19, 2019

Show resolved Hide resolved source/features/hide-useless-comments.tsx Outdated
Show resolved Hide resolved source/features/mute-users.tsx Outdated
Show resolved Hide resolved source/features/mute-users.tsx Outdated
Show resolved Hide resolved source/features/mute-users.tsx Outdated
Show resolved Hide resolved source/features/mute-users.tsx Outdated
Show resolved Hide resolved source/options.css
Show resolved Hide resolved source/options.tsx
Show resolved Hide resolved source/options.css
Show resolved Hide resolved source/options.css Outdated
Show resolved Hide resolved source/features/mute-users.tsx Outdated

notlmn added some commits Jun 20, 2019

notlmn added some commits Jun 22, 2019

@bfred-it bfred-it self-assigned this Jun 23, 2019

@bfred-it bfred-it removed their assignment Jun 23, 2019

@bfred-it
Copy link
Collaborator

left a comment

This currently doesn't hide review comments and any other comments on the site, e.g. comments on commits.

But it may be ok for now, it's just something to keep in mind.

function toggleComment(comment: HTMLElement, minimize: boolean): void {
if (comment.id.startsWith('issue-')) {
return;
}

This comment has been minimized.

Copy link
@bfred-it

bfred-it Jun 23, 2019

Collaborator

Hopefully the last change. It may be a good idea to not hide comments by the OP, but currently:

  • nothing happens when you Minimize the user
  • the button changes to Maximize Restore but it still does nothing and makes no sense, because the comment isn't minimized.

So either we hide all comments anyway, except the first one (this can be done in minimizeMutedUserComments's selector) or still apply some visual changes to the author's comments, e.g. opacity: 0.5 or color: gray

notlmn and others added some commits Jun 24, 2019

Revert some changes in options.tsx
They were made upstream in a5dd228
@notlmn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 25, 2019

@bfred-it

This comment has been minimized.

Copy link
Collaborator

commented Jul 4, 2019

(tested #2185)

@bfred-it

This comment has been minimized.

Copy link
Collaborator

commented Jul 10, 2019

Is this still blocked?

@notlmn

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

Is this still blocked?

Need a new release of https://github.com/bfred-it/webext-options-sync.

@bfred-it

This comment has been minimized.

Copy link
Collaborator

commented Jul 11, 2019

oops, done. 0.21.2

@notlmn notlmn force-pushed the notlmn:mute-users branch from ef799a7 to 86e8c0f Jul 11, 2019

notlmn and others added some commits Jul 11, 2019

Update source/features/minimize-user-comments.tsx
Co-Authored-By: Federico Brigante <github@bfred.it>

@notlmn notlmn changed the title Add ability to mute users Add `minimize-user-comments` feature Jul 11, 2019

@bfred-it

This comment has been minimized.

Copy link
Collaborator

commented Jul 14, 2019

Weird, I minimized @notlmn first response here:

  • it was minimized
  • following page loads also kept it minimized

but... your second comment here was never minimized, even if the menu correctly says "restore user"

Screenshot 2019-07-15 at 02 05 58

It might have something to do with him being the OP

@bfred-it
Copy link
Collaborator

left a comment

After that fix, this is basically ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.