cuire / svelte-grid-extended

A draggable and resizable grid layout, for Svelte
https://svelte-grid-extended.vercel.app
MIT License
78 stars 9 forks source link

[Feature] New API #23

Closed cuire closed 1 year ago

cuire commented 1 year ago

I want to change plugin api. The current version creates too many restrictions and is not intuitive in many ways. My plan is to something like this:

<Grid cols={10} rows={10}>
    <GridItem x={0} y={0}>Content<GridItem />
    <GridItem x={1} y={1}>Content<GridItem />
    <GridItem>{ /* somehow calc insert position */}<GridItem />
</Grid>

This will allow users to control the creation of the grid themselves. This approach opens up many possibilities for customization, for example, custom logic for moving a single cell and much more.

Also, this approach will allow you to use slots for modifications (#21).

<Grid cols={10} rows={10}>
    <GridItem x={0} y={0}>
        <div slot="dragHandle">Drag Me</div>
        <p>Content</p>
    <GridItem />
</Grid>

I will probably start working on it in 2 weeks. Stay tuned 💖

fabiot21 commented 1 year ago

Hi @cuire! is this still in dev? I'm asking so to build some features in the near future on top of this new API.

cuire commented 1 year ago

Hi @cuire! is this still in dev? I'm asking so to build some features in the near future on top of this new API.

Hello, new API is almost done. I have a blockage at work, as soon as I figure it out, I will publish a pr

multiplehats commented 1 year ago

Looking forward to this :)!

secondme2 commented 1 year ago

Hey @cuire! Foremost, thank you so much for this amazing library. Just wanted to ask: are you still planning on adding this new API? Is the library still maintained?

cuire commented 1 year ago

@secondme2 hey I graduated and free to work on it. Half way on 💖

cuire commented 1 year ago

Done in 1.0.0

secondme2 commented 1 year ago

You're the best @cuire