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(builder): Enable ctrl+z to undo changes in editor #255

Merged

Conversation

Jorgelig
Copy link
Contributor

Added shortcut Ctrl + z requested in task #217

Closes #217

@vercel
Copy link

vercel bot commented Jan 15, 2023

@Jorgelig is attempting to deploy a commit to the Typebot Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jan 15, 2023

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

Name Status Preview Comments Updated
builder-v2 ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 17, 2023 at 1:09PM (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 17, 2023 at 1:09PM (UTC)

@Jorgelig Jorgelig force-pushed the feat/enable-ctrl-z-undo-changes branch from cc19346 to 26d9ea5 Compare January 16, 2023 08:25
@baptisteArno
Copy link
Owner

I'm concerned with this scenario:

What happens if we edit a text bubble, and we just want to hit "Cmd + z" to undo the text? It would undo the whole typebot

@baptisteArno
Copy link
Owner

I'll have to test it a bit and will let you know 👍

@Jorgelig
Copy link
Contributor Author

I'm concerned with this scenario:

What happens if we edit a text bubble, and we just want to hit "Cmd + z" to undo the text? It would undo the whole typebot

The undo functionality already exists within Typebot js. When reusing that function, it should behave the same as directly clicking the undo button in the header.

Jorgelig and others added 2 commits January 17, 2023 10:25
Make sure it doesn't trigger if the user is typing. Also gives a better visual indication when the undo shortcut is triggered
@baptisteArno
Copy link
Owner

baptisteArno commented Jan 17, 2023

So I had to improve it a bit:

  • A visual tooltip when triggering the shortcut
  • Avoid triggering the shortcut when the user is typing

See 17b2741

Let me know if it's ok with you!

@Jorgelig
Copy link
Contributor Author

So I had to improve it a bit:

  • A visual tooltip when triggering the shortcut
  • Avoid triggering the shortcut when the user is typing

See 17b2741

Let me know if it's ok with you!

I did not imagine that scenario, the change looks good. Thanks

@Jorgelig Jorgelig self-assigned this Jan 17, 2023
@baptisteArno baptisteArno merged commit c711f36 into baptisteArno:main Jan 17, 2023
@baptisteArno baptisteArno deleted the feat/enable-ctrl-z-undo-changes branch January 17, 2023 16:01
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.

Enable ctrl+z to undo changes in editor
2 participants