-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
feat: add option to set the position of the preview window #2064
base: main
Are you sure you want to change the base?
Conversation
This change will move the preview to the top, so that the search box and results are not shifted around. If `invert` is true, the preview is at the bottom (current behavior).
Why are we moving the preview to the top in non-inverted mode? It's been at the bottom ever since it was introduced. I find this change jarring, and am likely not alone there. I think realistically this needs to be configurable and opt in, because I can pretty much guarantee as soon as this is released we will have unhappy users in the issues. Probably a "preview position" or something would make sense, and leave the default as they have been |
I was testing with This means that while you are searching the preview window changes size and the search and result window move up and down. I was very distracted by this behavior and thought it was a bug. And apparently somebody else (Adda in the forum) also thought it was strange and described it as a flickering of the screen. Just to clarify, this has nothing to do with my change I introduced a while back to only show a preview when the command is longer than the terminal width. When using this new option it only makes this behavior stand out even more. I have been verifying my findings by testing with an atuin version (897af9a) before my PR was merged. Here is a video of what I mean (also taken from atuin 897af9a): jump.mp4However, I also understand that people might be shocked and annoyed by this change. I am more than happy to add a setting to make the position configurable. |
I've updated the title and description of this PR. Unfortunately the code is not as pretty as I hoped. The TUI components are a pain and there are not many options to make it more succinct. I set one |
@ellie this one is ready for another review and also I'm more than happy to change it as mentioned in my previous comment. |
This change adds an option to set the position of the preview window.
The default is
bottom
, which is the current behavior.See the forum discussion here.
For this particular TUI change there are no test cases to write. I thought how I could write any, but none of them made any sense.
I tested all variations (compact/invert/preview) manually.
invert = false
invert = true
Checks