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: show confirm-cancel prompt for comments and approvals #518

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

sideshowbarker
Copy link
Contributor

@sideshowbarker sideshowbarker commented Jan 31, 2025

Summary

This change causes gh-dash to show a “Really cancel comment? (Press Ctrl+c/esc again to cancel)” confirm-quit prompt when the user is typing a comment or approval and they press Ctrl+c/esc — similar to the existing confirm-cancel prompt that gh-dash shows when the user has hit q/esc to exit from gh-dash itself.

How did you test this change?

I ran make test (go test -v ./...), to ensure this change didn’t regress any existing tests.

Otherwise, I just tested by manually by building this branch and then in PR dashboard and issue dashboard, using the c shortcut to open the comment-entry UI, and in the PR dashboard, using the v shortcut to open the approval-entry UI.

Images/Videos

Comment-entry UI:

image


Approval-entry UI:

image

Copy link
Owner

@dlvhdr dlvhdr left a comment

Choose a reason for hiding this comment

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

This is great! <3

ui/components/issuesidebar/issuesidebar.go Outdated Show resolved Hide resolved
ui/components/issuesidebar/issuesidebar.go Show resolved Hide resolved
ui/components/prsidebar/prsidebar.go Show resolved Hide resolved
@sideshowbarker
Copy link
Contributor Author

OK, thanks! — made the fixes suggested, and pushed

@sideshowbarker sideshowbarker requested a review from dlvhdr February 2, 2025 11:39
Copy link
Owner

@dlvhdr dlvhdr left a comment

Choose a reason for hiding this comment

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

Thank you! nice work!

@dlvhdr dlvhdr merged commit 93aa7b1 into dlvhdr:main Feb 7, 2025
@sideshowbarker sideshowbarker deleted the comment-confirm-cancel branch February 9, 2025 09:13
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