amfora
amfora copied to clipboard
Make help page look more like a pop-up
Currently only escape exits help. Allowing the back key (b/alt-left) is a little more convenient and makes the UI more consistent as this is already supported by the bookmarks pane.
Thanks for noting this! I've also been meaning to allow the quit key (default q) to work there as well.
I'll work on this when I can, or would accept a PR.
I took a look at display/help.go. I'm totally unfamiliar with tcell/cview, but I gather that it's supposed to behave like a popup window (so escape/enter) quits rather than a tab. However, there aren't visual cues to show this is the case, as both the tabs and address bar remain visible. This is part of the confusion, as despite being visible none of the normal navigation keys work. For example, it's not possible to switch between help or other tabs with the shift+N keys or to go to a new URL with space/e. So including a frame around help, or hiding the other GUI elements would help convey the modal nature of help. An alternative longer-term approach would be to turn help into a locally served page, something like amfora:help.
In the meantime, made a PR to note that Enter will also exit out of the help text, as it's a bit more convenient
Hmm, good points thanks. I think I prefer the approach of making help look more like a modal popup. A page like about:help
would be nice, but less convenient I think, it's nice to have a quick look at help then go back to what you were doing.
If I may cast my vote, I would greatly prefer a about:help page, in the same fashion of bookmarks. I frequently find myself trying to go back and forth from it (with b & f) or trying to go to the home page from it. It's just easy muscle memory that apply to nearly everything but the help modal.
Thanks for adding that. I'm unsure what to do. about:help
is more consistent, but like what if someone clicks through several pages, then goes back a bit, then wants to pull up the help? They'll lose all their forward history, just because they couldn't remember some key.
Maybe if I made the help modal just a bit smaller, to make feel more like a modal as well?
but like what if someone clicks through several pages, then goes back a bit, then wants to pull up the help? They'll lose all their forward history, just because they couldn't remember some key.
This is a valid and interesting case, that I have not thought of. Maybe the ?
could open a new tab with the about:help. This would preserve the forward history, and still allow navigation to everywhere else with the url bar or shortcuts (or close the tab).
Still the unique (non navigational) semantic of the help page make it feel like the modal is indeed the correct way to go. mmm... Not an easy decision.
Maybe the
?
could open a new tab with the about:help
Good idea, maybe this is the way to go. Seems the simplest.
Maybe the
?
could open a new tab with the about:helpGood idea, maybe this is the way to go. Seems the simplest.
I say bonus points if the about:help
page is searchable. I find myself wanting to search the help page from time to time.
Searching is long-standing separate issue. It's described in #36. But making the help a proper page would make searching possible in the future, good point.