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

Strike through menu button shortcut should use "S" instead of "X" #305

Conversation

abaransy-business
Copy link
Contributor

@abaransy-business abaransy-business commented Dec 18, 2024

Hello, just noticed this small issue. Thought Id push a quick fix.

Thank you for this. You're a hero for building it.

@sjdemartini
Copy link
Owner

Thanks for opening the merge request. I'd seen it mentioned in the release notes a while back that they'd changed the shortcut (https://github.com/ueberdosis/tiptap/releases/tag/v2.1.0), but had forgotten about updating it. I think it's probably best to just update the default shortcut as you've done here, and anyone can override it with <MenuButtonStrikethrough tooltipShortcutKeys={["mod", "Shift", "X"]} /> if they're using an old version of tiptap (but latest of mui-tiptap). Before merging, I would want to bump the internal dev dependencies for tiptap to at least 2.1.0 so that the demo itself is in alignment with the shortcut being displayed by default. I can come back to this after doing that separately.

In the meantime, you can use <MenuButtonStrikethrough tooltipShortcutKeys={["mod", "Shift", "S"]} /> in your own app.

@sjdemartini
Copy link
Owner

I also opened an alternative implementation PR #314 which checks what keyboard shortcut is configured in the extension, as a way to be backwards compatible and still show mod+Shift+X for users of Tiptap <2.1.0, but I don't think it's worth the complexity/overhead of that implementation, so I'll go ahead and merge this.

Thanks again!

@sjdemartini
Copy link
Owner

(Oh and I did update the dev dependencies for mui-tiptap in #312, as I mentioned I wanted to do first.)

@sjdemartini sjdemartini merged commit 779c811 into sjdemartini:main Dec 28, 2024
3 checks passed
@abaransy-business
Copy link
Contributor Author

Thank you for the thoughtful review @sjdemartini. Happy to see that you ended up merging this.

Happy new years :)

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