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

Toggle table of contents (or other menu items) #32

Closed
gennaro-tedesco opened this issue May 3, 2023 · 3 comments · Fixed by #36
Closed

Toggle table of contents (or other menu items) #32

gennaro-tedesco opened this issue May 3, 2023 · 3 comments · Fixed by #36
Assignees
Labels
enhancement New feature or request

Comments

@gennaro-tedesco
Copy link

Thank you for frogmouth, it's awesome!

At the moment a set of shortcuts are allowed, say ctrl-t/n/b/l to show specific items of the menu: would it be possible to make such keymaps toggle rather than just open? Practically speaking, if I use ctrl-t to quickly show the table of content, I would expect to be able to quickly hide it back again without moving the hands from the keys (instead of having to use ctrl-n to toggle-hide the whole menu)

@davep
Copy link
Contributor

davep commented May 3, 2023

Originally an action within one of those panes would auto-close the navigation sidebar; so selecting a file from the bookmarks would auto-close and get you back to reading. That got changed just before release. I was wanting to make that behaviour optionally available again. My thinking being, Ctrl+N toggles the navigation open and closed, the others are about getting you to the specific pane (so auto-open-and-focus) and selecting something would close if you had that open switched on.

But, yeah, I can also see the value in making them all toggles. I'll keep it in mind when I come to tidying this up.

And thanks for your kind words, glad you're enjoying it. :-)

@davep davep added the enhancement New feature or request label May 3, 2023
@gennaro-tedesco
Copy link
Author

so selecting a file from the bookmarks would auto-close and get you back to reading.

this would only work for the bookmarks (or history), specifically: for the table of contents after selecting a certain part of the README I want to skip to, the left panel is still open.

Obviously this is just nitpicking, mentioning it in case some other users want to refer to this too :)

@davep
Copy link
Contributor

davep commented May 3, 2023

Not nitpicking at all! It's useful to know different people's preferences, habits, expectations and muscle memory!

@davep davep self-assigned this May 4, 2023
davep added a commit that referenced this issue May 4, 2023
For any given navigation pane, if it isn't visible it is made visible,
popping the navigation sidebar out if it isn't popped out. If the called
navigation pane is the currently-visible one, the navigation sidebar is
closed.

See #32.
@davep davep linked a pull request May 4, 2023 that will close this issue
@davep davep closed this as completed in #36 May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants