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

chore: enable inline height and compact by default #2249

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

ellie
Copy link
Member

@ellie ellie commented Jul 10, 2024

I've been running Atuin this way for a really long time, and have heard from quite a few users now that they weren't a fan of Atuin using the whole screen.

If you'd prefer a compact and inline view (as in the screenshot), react with 👍

If you want things to stay as they are, please react with 👎

This is how it looks:

inline-height

However I have also learned that you only hear from people who don't like the way things currently are, right up until you change them - and then hear from everyone that was happy and quiet.

I'll try and circulate this PR as much as I can. It's the same as adding

style = "compact"
inline_height = 40

to the config file.

If this change is merged, it will change how Atuin looks for people who don't have anything set in their config. If they don't like it, they can restore how things were with

style = "auto"
inline_height = 0

We could change the default config file so this only happens for new users, but I'd like to be able to change defaults at some point and would like to see the general opinion first.

I can't think of a better way of getting feedback, short of opt-in telemetry. That's a different discussion :)

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@atuin-bot
Copy link

This pull request has been mentioned on Atuin Community. There might be relevant details there:

https://forum.atuin.sh/t/enable-inline-height-and-compact-ui-by-default/403/1

@Adda0
Copy link
Contributor

Adda0 commented Jul 10, 2024

Personally, I am running Atuin in the full-screen mode. That being said, I do not see much difference between the compact mode with up to 40 lines and the full-screen mode. On my screen with my font size, I see only about 35 records anyway. Therefore, the only notable difference is really whether to run Atuin inline by default, or in full-screen with the horizontal and vertical borders and separators. Still, I usually look on only about the first 5 records, 10 at most maybe.

Should the inline mode perhaps have inline_height set to way less by default if this PR is to be merged? Something like 20 to show about 15 records? To resemble a quick options picker rather than a full-blown TUI? Otherwise, I do not think those unsatisfied with the full-screen mode will really be happy with compact mode with 40 lines taking possibly a large portion of their screen anyway.

Generally, I think that having the full-screen mode by default is a smart thing to do, as it gives the new users some guidance about where to focus their attention and clearly distinguishes between different sections of the TUI. For example, by default, the preview of the selected command is nearly invisible unless you know to look for it. With the separators in the full-screen mode, the window is clearly visible, and a user will take a notice that it is a thing. The same goes for the keyboard shortcuts help.

(Regarding the telemetry, I am all for opt-in telemetry, if done right (KDE telemetry is a good example, in my opinion: opt-in, can see the gathered logs, and it clearly states what it collects---one really does not want to fear that the telemetry might collect the commands they run, for example---but I fully agree with herbcso on Atuin Discourse. @ellie said there that opt-out telemetry is not desirable. I argue that opt-out telemetry would even poise as a huge hindrance to adopting Atuin, in my opinion: fears like "It will steal my commands." and similar. Polling might actually get more attention from a broader Atuin community as it is something they will do once in a while without having to think about telemetry and their preferences about telemetry.)

@djc
Copy link

djc commented Jul 10, 2024

I've been running with compact/40 anyway, so this seems great!

(FWIW, 40 lines is about 40% of my usual terminal height but I think it's very rare for me to use an entry that's more than 10 back -- which is to say, I think it could make sense to go a bit shorter still?)

@tessus
Copy link
Contributor

tessus commented Jul 10, 2024

I am not a fan of most atuin's default settings. When it comes to these two, I am all for setting inline_height, although I'd go with a lower number. If you set it to 40 it might use all of the terminal, so not a big change between that and not setting it. (e.g. I use a Retina 2880 × 1800, my terminal is 55 lines, and I set my inline_height to 25.)
I don't like the compact mode, so that's a no for me.

Personally I don't mind either way, because I almost never use default values (in any SW) for anything that is important.

@ellie
Copy link
Member Author

ellie commented Jul 10, 2024

Size isn't actually the only reason for this change. Some of the other issues I've heard people have with full screen:

  1. Regardless of size, the transition flash between inline/full screen is jarring for some people
  2. The lack of context makes it feel a bit disconnected - even with 40 lines, there's still usually some context visible on most terminals
  3. This doesn't depend on altscreen, so will work with screen/etc without changing config (see GNU screen requires altscreen enabled #320)

With a lower value than 40, the inspector won't work very well. It might be something users want to change, but can't work as a default. The inspector does need some work to function better on smaller terminals, but it is a balance between "I want it to work on smaller terminals" and "I want to see/explore more information". Maybe the precise number will change in the future.

I think that having the full-screen mode by default is a smart thing to do, as it gives the new users some guidance about where to focus their attention

This was the initial reasoning, however I hear very often that the full screen is either something people change immediately, or that it's a reason they stop using Atuin entirely. I've made enough mistakes trying to guess what people might want that I'd rather try to use numbers.

Personally I don't mind either way, because I almost never use default values (in any SW) for anything that is important.

I totally expect that users will be changing these values, but I have absolutely no insight as to whether or not they do so. I'm trying to optimize for new users, and minimize the amount of config that they need to change to feel comfortable. This allows me to gauge if most people deviate from defaults, or if most people are happy with things how they are.

@plttn
Copy link

plttn commented Jul 10, 2024

At least for me, inline when not bounded by terminal height overlaps with the last line of my shell (Fish+Tide):

~ ❯                                                                                                            docker-desktop

becomes

~Atuin v18.3.0n ❯                   <esc>: exit, <tab>: edit, <enter>: edit, <ctrl-o>: inspect               history count: 12219p

If this didn't occur, I'd lean this change, but I prefer fullscreen at the moment. I'm sure this is a separate bug that should be filed 😅

@lilydjwg
Copy link
Contributor

I'm using compact mode with all lines below or 40% of lines, whichever is larger.

(I tried to invert the UI when cursor was near the bottom briefly, but it didn't feel good.)

@dcarosone
Copy link
Contributor

dcarosone commented Jul 15, 2024

I'm not particularly concerned with the default, as for personal use I will configure options anyway. Which is just another way of saying: optimise for new users, not me, by all means.

But I'm curious about the altscreen issue.. I use screen, with altscreen enabled, as a workaround for mosh not supporting altscreen. What's the behaviour in compact mode, with respect to screen contents? Do they just get overwritten, but it's supposed to be ok because it's not the whole screen? My preference is to preserve the screen in full.

@tessus
Copy link
Contributor

tessus commented Jul 15, 2024

The screen is preserved. When not using fullscreen atuin (altscreen), the text is not overwritten, but the TUI is created below the prompt. See my post on the forum. I've also provided a video what's happening.

@philtweir
Copy link
Contributor

Possibly not a helpful datapoint, but as someone who types Ctrl+r by default for commands over 2 chars, my use-case is "minimalist like traditional reverse search" -- I am not sure how common that is, but I nearly did a 5m try-and-move-on with Atuin as I had not spotted compact as an option immediately. As it happened, I was sufficiently fed up with traditional reverse search that I went back and searched through the docs/PRs again and then realised it was a setting (essentially, I hadn't realised what to search for first time). So strong propose for this suggestion, personally, but no idea if I'm a common case.

Regardless of size, the transition flash between inline/full screen is jarring for some people

For my type of use-case, absolutely, especially if hitting Ctrl+r at least once for nearly every command entered.

The lack of context makes it feel a bit disconnected - even with 40 lines, there's still usually some context visible on most terminals

Again, I use it as a helper to writing a command, rather than a full-featured search tool, so context is key for my type of use.

That said, I normally use Atuin in "ultracompact" 3-8 lines though, and have a customization that autohides non-critical UI lines when inline_height is under 10, so arguably my use-case should really be out-of-scope :D

Screenshot from 2024-07-15 13-53-13

(OT: @ellie with the theming landing, I have rebased this & the inspector work onto today's main, so it could be timely for me to PR, if this "ultracompact" use could be relevant for others and the compact UI is about to be highlighted more? No pressure, only if generally desirable obvs!)

@ellie
Copy link
Member Author

ellie commented Jul 17, 2024

(I tried to invert the UI when cursor was near the bottom briefly, but it didn't feel good.)

Same, I could never get the inverted UI to feel quite right, no matter what I tried. Some people seem to like it though 🤷‍♀️ I think it's because, depending on scroll position, the cursor either jumps up in inverted mode, or jumps down in not-inverted mode.

What's the behaviour in compact mode, with respect to screen contents?

For extra clarity, empty space is created below the prompt and the terminal essentially just scrolls a bit to make room for the TUI.

Again, I use it as a helper to writing a command

That is a pretty good datapoint! I've heard it from a few people now, and wonder how common it actually is.

Otherwise, I'd definitely be interested in a PR with your ultra-compact mode please! 🙏

@ellie
Copy link
Member Author

ellie commented Aug 27, 2024

I think this is fairly conclusive - I'll call it out in the release notes :)

@ellie ellie merged commit 5ed36b7 into main Aug 27, 2024
19 checks passed
@ellie ellie deleted the ellie/inline-height-default branch August 27, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants