seek-oss / playroom

Design with JSX, powered by your own component library.
MIT License
4.45k stars 183 forks source link

Add tag wrapping key #279

Closed benjervis closed 1 year ago

benjervis commented 1 year ago

Last additional keybinding (probably) before attempting CodeMirror 6, pressing CmdShift,(or, on Windows, CtrlShift,) will wrap the currently selected text in an empty fragment that is ready to be typed in.

All keyboard shortcuts are now shown in a legend in the settings panel.

Screen Shot 2023-03-09 at 11 48 46 am Screen Shot 2023-03-09 at 11 52 33 am

This required a slight reworking of the light mode colour palette, updating gray2 and making neutral not some dark grey.

Also adds some util help for preloading the code panel with content during a cypress test, with an optional param to loadPlayroom.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 525fe3102769cc5617486bd0502e728649e7c565

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------- | ----- | | playroom | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

mrm007 commented 1 year ago

Here's what I had in mind: https://github.com/seek-oss/playroom/commit/652289a20579a1508105a3426e33a5f12f3f512a

Try it out: https://playroom--5d1645e7ff3a95b4f9f5d4b124342eb3b78d7144.surge.sh/

benjervis commented 1 year ago

@mrm007 I see what you were going for, but I think the tradeoff here between DRY-ness and readability isn't quite working for me. It's a bit more chaotic, and quite disconnected from the single use case of the description in the settings panel.

There's a couple of other good cleanups in there though, I'll bring a few of those across.