Skip to content

feat: Command popup#72

Merged
Cretezy merged 7 commits intoCretezy:mainfrom
xavierchanth:command-popup
Feb 15, 2025
Merged

feat: Command popup#72
Cretezy merged 7 commits intoCretezy:mainfrom
xavierchanth:command-popup

Conversation

@xavierchanth
Copy link
Contributor

@xavierchanth xavierchanth commented Nov 30, 2024

  • Added a new field to MessagePopup called text_align for text alignment which defaults to Center.
    • Updated all references to pass None for message popup.
  • Added a new popup called CommandPopup which is activated when : is pressed from any of the tabs.
    • The popup provides a TextArea which allows the user to run a jj command
      e.g. when help is typed, it will run jj help
    • Enter to confirm and execute the command
    • Esc to close the popup
  • Commands with output or an error message will show it in a message popup using the left align
  • Commands without output close the textarea and return to the view before running command popup (if they fail, they still show the error message)
  • New action to refresh the current tab which is called after running a command

Open to design feedback, first time writing any Rust, so please bear with me if I've made some mistakes.

asciinema showing a brief demo of the PR: https://asciinema.org/a/wFns1WU24IicaUdgh1G3RmOgR

@Cretezy Cretezy merged commit 7b81ee8 into Cretezy:main Feb 15, 2025
5 of 10 checks passed
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