Skip to content

Toggle all PR comments' visibility #2398

Closed

Description

@fregante

Follows #212 and #2087

Note: this feature is already offered natively by pressing the i key. This issue discusses what else can be done, if anything.

image

Possible additions

  • Add a tooltip on the menuitem explaining that they can press i to "toggle all"

  • Trigger GitHub's own feature by simulating a keypress when the menu item is alt-clicked:

     document.dispatchEvent(new KeyboardEvent('keydown', {code: 'KeyI', key: 'i'}))

Alt-click

The alt-click solution was discussed at length in #2087 and its last iteration was this. It didn't work in Firefox.

  1. Go to https://github.com/sindresorhus/refined-github/pull/1896/files#diff-745c47517b47e007eb2f34f4d2072fa0
  2. Open the file's dropdown
  3. Alt-click "✓ Show comments"

Screenshot 2019-09-03 at 01 53 51

It should hide all the comment threads on the page, as part of toggle-everything-with-alt

Semi-related issue

#2329

Activity

  1. changed the title [-]Toggle all PR comments' visibility with alt+click[/-] [+]Toggle all PR comments' visibility[/+] on Sep 7, 2019
  2. fregante commented on Nov 10, 2019

    @fregante
    MemberAuthor

    I’d go with this:

    Add a tooltip on the menuitem explaining that they can press i to "toggle all"

    It’s pretty easy and not as troublesome as the previously-tried alt-click implementation.

    PR welcome via aria-label attribute and tooltipped classes.

  3. added
    small
    and removed on Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedenhancementsmall

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions