Files icon indicating copy to clipboard operation
Files copied to clipboard

Feature: Add action to collapse & expand sidebar

Open Hasan-01 opened this issue 1 year ago • 9 comments

What feature or improvement do you think would benefit Files?

A keyboard shortcut to toggle the sidebar on and off would be helpful.

Requirements

  • This proposal will accomplish X
  • This proposal will accomplish Y
  • This proposal will accomplish Z

Files Version

3.6.0.0

Windows Version

10.0.22631.3880

Comments

No response

Hasan-01 avatar Aug 13 '24 06:08 Hasan-01

Thanks for the feedback, I have added this to the project board.

Josh65-2201 avatar Aug 13 '24 13:08 Josh65-2201

Can you clarify what you mean by turning the sidebar on or off?

yaira2 avatar Aug 13 '24 17:08 yaira2

I mean this: Files_rEHrTCOjLr

Hasan-01 avatar Aug 14 '24 05:08 Hasan-01

So a Collapse action as a keyboard shortcut.

Do we want an action for setting it to the Overlay mode via keyboard too? Regardless of Window size.

mdtauk avatar Aug 14 '24 05:08 mdtauk

Thanks for clearing that up! We actually had a keyboard shortcut for toggling the sidebar, but it got left out when we revamped the sidebar (funny enough, it was exactly a year ago!). We initially planned to reintroduce it, but it didn’t happen due to a lack of interest. We’re happy to move forward with this if interest picks up. Before committing to this feature, we’ll keep this issue open for a while to gauge community interest

https://github.com/files-community/Files/pull/13052/files#diff-8f73572d36ee4bb40aa3cda8358f70950a57d03ca40cb0b98e02e1e3fe217e27

yaira2 avatar Aug 14 '24 14:08 yaira2

@ninadch06 we're currently waiting to see if there is enough interest in this issue before moving forward with it. You can check the status of an issue from the right side of the page. image

yaira2 avatar Aug 25 '24 14:08 yaira2

I'm interested. What amount of traction is needed or do you require, to start working on it?

SAHILGAWLI avatar Aug 25 '24 15:08 SAHILGAWLI

More traction on this issue and on Discord.

yaira2 avatar Aug 25 '24 16:08 yaira2

This would be a great feature to better utilize the small screen area e.g. on laptops.

zurkozar123 avatar Sep 16 '24 13:09 zurkozar123

@zurkozar123 it's worth noting that you can already collapse the sidebar by double clicking the sidebar border. This request is to add a keyboard shortcut for this action.

yaira2 avatar Sep 16 '24 14:09 yaira2

you can already collapse the sidebar by double clicking the sidebar border

You couldn't have proposed a more fiddly gesture than hunting down a border with the mouse pointer to click not once, but twice in quick succession without moving..! 😆

Sure, here's my show of interest for a keyboard shortcut.
Seems rather silly to gate such a simple feature behind an interest condition, especially if it's already been implemented previously…

Mock procedural state machine callback conditional pseudocode:

def keyboard_shortcut_callback()
  if sidebar.collapsed then
    sidebar.size = sidebar.last_size
    sidebar.collapsed = false
  else
    sidebar.last_size = sidebar.size
    sidebar.size = 0
    sidebar.collapsed = true
  end
end

In fact… could I be pointed to where in the code is double-click implemented?

Erquint avatar Nov 01 '24 21:11 Erquint

Here is an idea @yaira2 what about an option to always show the sidebar toggle button on the address bar?

mdtauk avatar Nov 01 '24 22:11 mdtauk

Found it. Trying to work on a draft PR.

Erquint avatar Nov 02 '24 00:11 Erquint

All checks on the draft PR passed. I'll make it ready for review once the issue is marked as ready to accept an active PR.

Erquint avatar Nov 02 '24 03:11 Erquint

Here is an idea @yaira2 what about an option to always show the sidebar toggle button on the address bar?

@mdtauk the toolbar button is for showing the sidebar overlay, whereas this feature request is referring to collapsing to the icons.

yaira2 avatar Nov 03 '24 01:11 yaira2