Closed bnichs closed 1 week ago
Thank you for the feedback! PR #138 will improve this by removing the spacing for the debug header and the space for an expanded help panel. Check out this screenshot:
Do you think that this is sufficient? I could also look into make it even more compact, but I'm inclined to start with this improvement rather than making the TUI overly dense.
If you run hishtory update
, you'll get the latest version with these improvements. Please let me know what you think!
Thank you for the quick update! Also, that update command is great! I updated to:
% hishtory update
Verified signature against tlog entry index 54503613 at URL: https://rekor.sigstore.dev/api/v1/log/entries/24296fb24b8ad77afa0a008e9611acf5ba3f43dbf075c8fbf676a25ff93ea7dabc491a46d95c91d8
Verified build using builder https://github.com/slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@refs/tags/v1.2.1 at commit be3ad76e680cfdb97a275d54cec408adaee9910a
Successfully updated hishtory from v0.256 to v0.258
Its better in that i get that first history entry now instead of none. However, these two lines seem to be wasted space as once they disappear, its just a blank line (or two sometimes depending on load time of the remote):
⣻ Loading hishtory entries from other devices...
⣻ Executing search query...
It's not ideal that the space used by those messages isn't always reclaimed. Or if its not meant to be reclaimed, i'd love for those messages to only be shown under a debug or high verbosity mode.
This update also seems to introduce a weird spacing on the bottom margin:
Seems like if that bottom margin were cleaned up we could get maybe 3 or so history entries where we currently have 1. When combined with the top margin mentioned above, we could probably get 5 or 6 total entries in the list even in a very small terminal like I'm using in idea.
For reference, the window size im using is:
% python -c "import shutil;print(shutil.get_terminal_size())"
os.terminal_size(columns=74, lines=11)
Got it, thank you for the explanation and details! I've pushed out another update with improved handling for these extra small terminals (see #140 for the code). Please give it a shot and let me know what you think.
Looks great! Now the smallest window i can do before showing no entries is 7 rows which is way too small to be useful anyway.
Thanks for the great work! lmk if i can buy you a coffee.
When using hishtory in a small window like those within an IDE, the whitespacing causes for a lot of wasted screen usage and when small enough, it will report that there are no history entries.
TUI erroneously showing no entries:![Screenshot_20231130_111450](https://github.com/ddworken/hishtory/assets/1915791/b84cc446-26fd-477c-9c44-87b2504fb190)
TUI showing entries but wasting half of the usable vertical space:![hishtory-small-window](https://github.com/ddworken/hishtory/assets/1915791/d4e26233-4562-4860-b809-032efa9e8d16)
Is it possible to have a config option for more compact screen usage? There are a few approaches i could see: 1) It looks like the space between "Search Query" and the prompt is used for debug messages, but those don't seem to be super useful compared to the history information being sought. It would be nice to either have those debug messages in the bottom footer, or make it so when they disappear the space being used is taken back to allow for history result to have the entire screen.
2) The footer might be useful in the first few invocations, but when using the tool a lot its just redundant information that takes space from history items.
3) The spacing between history items and the "Search Query" line could be reduced.
4) The column headers seem to have a lot of spacing around them.
Any of these changes would be useful for smaller windows, but in general, my opinion is that the history items should be the first priority in terms of screen real estate, with everything else being optional.
If this seems like something that would be useful I can look into making a patch.
Thanks!