beta.55 Improved Search, Drag, and Happiness 😊

Search Improvements

beta.55 has a vastly improved search:

Search descriptions 🎉

CleanShot 2021-08-20 at 13 37 44

Search shortcuts

CleanShot 2021-08-20 at 13 51 49

Search by kenv

CleanShot 2021-08-20 at 13 51 18

Sear by "command-name" (if you can't think of // Menu: name)

CleanShot 2021-08-20 at 13 54 45

Sorts by "score" (rather than alphabetically)

Drag

Choices can now take a drag property. This will make list items "draggable" and allow you to drag/drop to copy files from your machine (or even from URLs!) into any app. When using remote URLs, their will be a bit of "delay" while the file downloads (depending on the file size) between "drag start" and "drop enabled", so just be aware. I'll add some sort of download progress indicator sometime in the future, just not high priority 😅

// Menu: Drag demo
await arg(
{
placeholder: "Drag something from below",
ignoreBlur: true,
},
[
{
name: "Heart Eyes (local)",
drag: "/Users/johnlindquist/Downloads/john-hearts@2x.png",
img: "/Users/johnlindquist/Downloads/john-hearts@2x.png",
},
{
name: "React logo svg (wikipedia)",
drag: "https://upload.wikimedia.org/wikipedia/commons/a/a7/React-icon.svg",
img: "https://upload.wikimedia.org/wikipedia/commons/a/a7/React-icon.svg",
},
]
)

CleanShot 2021-08-20 at 15 26 07

You can use the drag object syntax to define a format and data

text/html: Renders the HTML payload in contentEditable elements and rich text (WYSIWYG) editors like Google Docs, Microsoft Word, and others. text/plain: Sets the value of input elements, content of code editors, and the fallback from text/html. text/uri-list: Navigates to the URL when dropping on the URL bar or browser page. A URL shortcut will be created when dropping on a directory or the desktop.

// Menu: Drag demo
await arg(
{
placeholder: "Drag something from below",
ignoreBlur: true,
},
[
{
name: "Padding 4",
drag: {
format: "text/plain",
data: `className="p-4"`,
},
},
{
name: "I love code",
drag: {
format: "text/html",
data: `<span style="background-color:yellow;font-family:Roboto Mono">I ❤️ code</span>`,
},
},
]
)

CleanShot 2021-08-20 at 15 48 00

Happiness

I'm very happy with the state of Script Kit. When I started almost a year ago, I had no idea I could push the concept of creating/sharing/managing custom scripts so far. I think it looks great, feels speedy, and is flexible enough to handle so, so many scenarios.

With everything in place, next week I'm starting on creating lessons, demos, and docs. It's time to show you what Script Kit can really do 😉

P.S. - Thanks for all the beta-testing and feedback. It's been tremendously helpful!

Discuss Post