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(tui): popup to list keybinds #9545

Merged
merged 14 commits into from
Dec 11, 2024
Merged

feat(tui): popup to list keybinds #9545

merged 14 commits into from
Dec 11, 2024

Conversation

anthonyshew
Copy link
Contributor

@anthonyshew anthonyshew commented Nov 29, 2024

Description

We're adding a host of binds to make the TUI even more useful, and listing them out with our current strategy is going to prove cumbersome quickly. Terminal real estate is valuable!

With this PR, we're putting in a popup that you can use to quickly get a glance of what's available to you.

Testing Instructions

Try it out!

Questions

  • (opinions wanted) Should I block all other inputs when this menu is open? (For what it's worth, I'm seeing things play nicely with other inputs left unblocked.)
  • (non-blocking) Is there a reasonable way to get the list items from input.rs?

@anthonyshew anthonyshew requested a review from a team as a code owner November 29, 2024 22:17
Copy link

vercel bot commented Nov 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 4:07am

@anthonyshew anthonyshew changed the title feat(tui): popup to help list keybinds feat(tui): popup to list keybinds Nov 29, 2024
@anthonyshew anthonyshew marked this pull request as draft November 29, 2024 22:17
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
@chris-olszewski
Copy link
Member

Should I block all other inputs when this menu is open? (For what it's worth, I'm seeing things play nicely with other inputs left unblocked.)

I think not blocking inputs is good. Do you think closing the popup on key interactions would be intuitive?

(non-blocking) Is there a reasonable way to get the list items from input.rs?

Not easily. If we swapped from a match to a long if / else if / else statement and introduce another wrapper on the KeyEvent type we could probably do it, but I would not block on this.

@anthonyshew
Copy link
Contributor Author

Do you think closing the popup on key interactions would be intuitive?

I played around with this, and I was discovering more inventive workflows than ever with keeping it open. It felt like I could get inspired about my next move more. However, I could also see this as "I checked the binds for the thing I wanted and I pushed it. Now go away." as a more experienced user. I don't think I have a strong opinion; I could see either behavior being useful depending on who you are. If I were forced to pick, I would keep it as-is (not auto-close).

If we swapped from a match to a long if / else if / else statement

Agree that this shouldn't block and hard to say if its YAGNI. I can explore options in follow-up.

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ITG

@anthonyshew anthonyshew merged commit 10a57d0 into main Dec 11, 2024
36 checks passed
@anthonyshew anthonyshew deleted the shew-5b0be branch December 11, 2024 02:15
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.

3 participants