-
Notifications
You must be signed in to change notification settings - Fork 229
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
Added toggle sidebar feature #134
base: main
Are you sure you want to change the base?
Conversation
Could you add that shortcut to the help screen? |
Sure! Is that ok? |
Now that I've actually tried the patch, I'm actually not completely happy with it. The problem I see is that even in the disabled state, the sidebar can still accept focus, which is confusing. In addition, a small gray bar is still shown on the right. |
Good points. I updated the PR to unfocus the sidebar and hide the column separator (dividechars = 0) when the side bar is turned off. What do you think? |
Not entirely happy--I can still get the focus onto the sidebar, at which point my key events appear to go nowhere... @asmeurer, what do you think? |
I agree we should not allow the keyboard to get to the sidebar if it's hidden. Can you disable key bindings temporarily? |
Hi guys, thanks for the feedback! I know this is not what was suggested, but what about just making the sidebar visible first if someone tries to focus a sidebar element while the sidebar is not visible? Seems like reasonable UI behaviour. |
You don't get notified when the sidebar gets the focus (IIRC), so you'd have to poll (in the event loop or so). Not sure I'm a fan. |
Sidebar focus is set by RHColumnFocuser when one of 'V', 'S', or 'B' is pressed. RHColumnFocuser receives notification of the key press event from SignalWrap. I just added code inside RHColumnFocuser before it sets focus to the sidebar, to ensure the sidebar is visible first (no polling for focus on the sidebar required). Does this seem reasonable? |
No, because Urwid also messes with the Focus behind our backs. Pressing "Cursor Right" will also get the sidebar focused. |
Aha! Thanks for the clarification, I figured I was missing something. I'll have a think about this. |
I wanted to add support to copy pudb console output to the clipboard. Unfortunately, python libraries such as tkinter or pyclipboard rely on external modules to provide clipboard support, which makes this feature difficult to provide reliably.
As I work around, I have added support to toggle the sidebar using ctrl ^. When the sidebar is not visible you can select multiple lines of text in the console without selecting text from the sidebar.