Skip to content

Improve expand-all-collapsed-code #3472

Closed

Description

@jacob-greenfield

Example URL: 86aad75#diff-0730bb7c2e8f9ea2438b52e419dd86c9L42-L115

Screen Shot 2020-08-17 at 2 41 17 PM

The way this currently works is that if you alt-click on any expand button, the whole file expands. There are a few ways I believe this could be improved:

  • Add a dedicated "Expand all" button somewhere in the file header (possibly under the ellipsis, but I think it deserves a dedicated space, even as just an icon)
  • Change the default behavior to only, yet fully, expand the bar you click on when holding alt. Often it is very tedious to fully expand the space between two parts of a file 20 lines at a time (in the link/screenshot, it takes 4 clicks for lines 43-114). The new alt-click behavior would be to fully expand just those lines, rather than the whole file.
  • Make it work properly with extend-diff-expander

Activity

  1. fregante commented on Aug 17, 2020

    @fregante
    Member
    • Add a dedicated "Expand all" button

    I wouldn't mind placing a button at the top and at the bottom of the file

    • The new alt-click behavior would be to fully expand just those lines, rather than the whole file.

    A button here would be easier to understand. I think the top/bottom buttons would be "expand whole file" while this button would be "expand whole cluster"

    • Make it work properly with extend-diff-expander

    Indeed, that's an oversight. But if we add the buttons we can drop the alt-click behavior altogether

  2. fregante commented on Aug 17, 2020

    @fregante
    Member

    I think as a start we can can replace the alt-click with buttons at the top and bottom of each file. The second point can come later.

  3. fregante commented on Mar 24, 2021

    @fregante
    Member

    GitHub implemented this feature natively 🎉 #4149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions