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

Add keyboard shortcuts to modals #2977

Merged
merged 10 commits into from
Mar 28, 2024
Merged

Conversation

KeeJef
Copy link
Collaborator

@KeeJef KeeJef commented Nov 15, 2023

Working off this PR #2281 which adds shortcuts for the 'Delete' and 'Backspace'
keys to delete a message when a user is in selection mode.

This PR extends additional keyboard shortcuts for modals created using the SessionConfirm dialog component, adding 'Escape' which will call the onClickCancelHandler to close the modal and 'Enter' which will call the onClickOkHandler. This should make navigating deletion dialogs easier.

@KeeJef KeeJef marked this pull request as draft November 15, 2023 08:28
@KeeJef KeeJef marked this pull request as ready for review November 16, 2023 06:20
@Bilb Bilb changed the base branch from clearnet to unstable March 21, 2024 00:07
feat: confirm modal when enter is pressed

fix: fix linter issues

fix: update rebase and fix lint issues

fix: remove duplicate code
@yougotwill
Copy link
Collaborator

yougotwill commented Mar 21, 2024

Hi @KeeJef I have some concerns about this PR. Can we discuss further before merging?
Never mind. I was confused. I think we are good. Just reviewing to confirm my understanding.

Copy link
Collaborator

@yougotwill yougotwill left a comment

Choose a reason for hiding this comment

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

Looking good! one small change required

ts/components/conversation/SessionConversation.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@yougotwill yougotwill left a comment

Choose a reason for hiding this comment

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

Nice to see more accessibility happening!

ts/components/SessionWrapperModal.tsx Outdated Show resolved Hide resolved
ts/components/basic/SessionButton.tsx Show resolved Hide resolved
ts/components/basic/SessionButton.tsx Outdated Show resolved Hide resolved
ts/components/icon/SessionIconButton.tsx Show resolved Hide resolved
Copy link
Collaborator

@yougotwill yougotwill left a comment

Choose a reason for hiding this comment

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

LGTM! 🚢

Copy link
Collaborator

@yougotwill yougotwill left a comment

Choose a reason for hiding this comment

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

LGTM! 🚢

@Bilb Bilb merged commit 0f06998 into oxen-io:unstable Mar 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants