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

feat(ux): show loading screen #1997

Merged
merged 2 commits into from
Dec 7, 2022
Merged

feat(ux): show loading screen #1997

merged 2 commits into from
Dec 7, 2022

Conversation

imsnif
Copy link
Member

@imsnif imsnif commented Dec 7, 2022

When Zellij loads, it queries the terminal emulator for its default colors and its pixel to cell ratio. Since it gets the responses over STDIN, we must drop all user input in the time that this query happens - otherwise it will get mixed up. For that reason the first 0.5 seconds after Zellij loads, input gets lots.

We can't do anything about that, but this PR communicates this to the user, showing a brief loading prompt while this happens so they know not to start typing.

img-2022-12-07-141118

@imsnif imsnif temporarily deployed to cachix December 7, 2022 13:20 — with GitHub Actions Inactive
@imsnif imsnif merged commit f8a078c into main Dec 7, 2022
@necauqua
Copy link

Hello!
Can't you like.. cache this? Or add an option to do so, again (also maybe reset the cache if TERM changes or something..)

0.5 seconds on every load is way too much, and I know that opening a bunch of terminal emulators is a flow that zellij is supposed to solve, but people (including myself) do that anyway - and swallowing 0.5 seconds of user input is also something that I kind of noticed previously, but as #2024 points out the flash of the screen (on every new terminal) is way more jarring, the snappinness - even if it was apparent because of the lost input - is gone

@imsnif
Copy link
Member Author

imsnif commented Dec 19, 2022

Hey @necauqua - the idea of caching also came up in a separate discussion on Matrix. The issue there was that it's hard to know when to cache-bust. But in the end we decided that the UX of leaving cache busting to the user (eg. delete this file and reload Zellij) is far better than the delay we have now and the issues with snappiness as you say.

I'm going to try to hack a quick solution together for the next version. Thank you for your patience!

This pull request was closed.
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.

2 participants