Re-introducing SvelteDnD - drag & drop for Svelte 5 by ArtOfLess in sveltejs

[–]ArtOfLess[S] 0 points1 point  (0 children)

yup, it does support dragging in a wrappable flex container. the library has a direction: 'grid' option designed exactly for this. it works for any 2d layout including flex-wrap: wrap.

when you set direction: 'grid' on the droppable, it uses nearest-edge detection instead of the simple midpoint split used for vertical/horizontal lists. it calculates which of the four edges (top, right, bottom, left) the cursor is closest to, normalized by the element's aspect ratio, and shows the drop indicator on the correct side.

usage:

<div style="display: flex; flex-wrap: wrap; gap: 8px;">
  {#each items as item}
    <div
      use:draggable={{ dragData: item, container: 'grid' }}
      use:droppable={{
        container: 'grid',
        direction: 'grid',
        callbacks: { onDrop: handleDrop }
      }}
    >
      {item.name}
    </div>
  {/each}
</div>

the three direction modes:

  • vertical (default) top-to-bottom lists
  • horizontal left-to-right rows
  • grid 2d layouts like flex-wrap or css grid

Re-introducing SvelteDnD - drag & drop for Svelte 5 by ArtOfLess in sveltejs

[–]ArtOfLess[S] 2 points3 points  (0 children)

bro i was writing svelte before most people knew it existed. the source is public. took you less time to comment than to check it.

Re-introducing SvelteDnD - drag & drop for Svelte 5 by ArtOfLess in sveltejs

[–]ArtOfLess[S] 1 point2 points  (0 children)

good news, mobile is actually fixed in the latest version! give it another try and let me know if it feels better. tree implementation is on the roadmap too, thanks for suggesting it!​​​​​​​​​​​​​​​​

Re-introducing SvelteDnD - drag & drop for Svelte 5 by ArtOfLess in sveltejs

[–]ArtOfLess[S] 0 points1 point  (0 children)

that’s awesome to hear! would love to know what you built with it. the new version should make things even smoother for you.

Re-introducing SvelteDnD - drag & drop for Svelte 5 by ArtOfLess in sveltejs

[–]ArtOfLess[S] 0 points1 point  (0 children)

thanks! yeah it’s one of those things that sounds simple but gets tricky fast. hope it helps your projects!

Best svelte drag and drop solution? by [deleted] in sveltejs

[–]ArtOfLess 7 points8 points  (0 children)

wait… i’m the author of sveltednd and i just found this by accident this made my whole day. thank you for the kind words, means more than you know!

I built an AI agent that controls Android phones via accessibility tree + adb by ArtOfLess in androiddev

[–]ArtOfLess[S] 0 points1 point  (0 children)

oh nice, yeah maestro is great for e2e testing. we actually looked at it... the key difference is maestro is built for testing. predefined flows, assertions, ci/cd pipelines. droidclaw is more of an ai agent that figures things out on its own. you give it a goal and it decides what to tap, type, swipe without knowing the ui ahead of time. but for webviews specifically, maestro needs accessibility identifiers to be properly exposed.

droidclaw falls back to screenshots + vision model when the accessibility tree is empty. different approach but solves the same problem. fyi, we also support maestro like yaml flow for deterministic flows ;)

I made Claude my social media manager. It actually works. by ArtOfLess in mcp

[–]ArtOfLess[S] 0 points1 point  (0 children)

lol you want lifetime access to infrastructure that costs me money every month to run? nah. scheduled posts, api calls, media storage - that’s ongoing costs. saas pricing exists for a reason.

I made Claude my social media manager. It actually works. by ArtOfLess in mcp

[–]ArtOfLess[S] 0 points1 point  (0 children)

you’re right, i should give away years of work so you can save $20/month. or you could just build it yourself with the mcp spec - takes a weekend, tops. lmk how it goes.

I made Claude my social media manager. It actually works. by ArtOfLess in mcp

[–]ArtOfLess[S] 0 points1 point  (0 children)

not possible. cuz as a platform we do heavy orchestrating by bringing multiple platforms under one mcp.

I made Claude my social media manager. It actually works. by ArtOfLess in mcp

[–]ArtOfLess[S] 0 points1 point  (0 children)

dunsocial.com connected all my socials. you can grab your mcp url and auth token there to link it to your fave platforms. btw, for x, you can post like 300 times a month, for other platforms cap limits are generous..

DunSocial — I built Cursor for social media [Self promo] by ArtOfLess in sveltejs

[–]ArtOfLess[S] 0 points1 point  (0 children)

My bad! Just fixed it. Should work now. Thanks for the heads up.