shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

feat: implement new `Tasks BigData` example for useVirtualList usage

Open hrynevychroman opened this issue 1 year ago • 13 comments

This PR try to fix #296

So I add a new example where implemented virtualList based on vueuse core function.

I tried to use seperate package but it don't fit for table HTML at all because creating 2 div wrappers.

Please watch this video 👇 , or try by yourself, you will feel performance improvements at all

https://github.com/radix-vue/shadcn-vue/assets/82209198/50fa452d-a92a-4c6f-a950-963b27d77e38

@sadeghbarati need help with this, what will be the best Doc for this, because if we are porting only original package, there is no BigData example at all 🙂

hrynevychroman avatar Feb 13 '24 18:02 hrynevychroman

Thanks, Man! @romanhrynevych

Will try to checkout to your branch to fully test it ❤️

Also, I think the issue you linked is related to DropdownMenu itself and its DropdownMenuItems It might be related to this discussion is Discord Help and Question (Combobox or Dropdown Virtual List) but thanks anyway 😁


need help with this, what will be the best Doc for this, because if we are porting only original package, there is no BigData example at all

Can you explain more please 🙏

sadeghbarati avatar Feb 13 '24 18:02 sadeghbarati

need help with this, what will be the best Doc for this, because if we are porting only original package, there is no BigData example at all

Can you explain more please 🙏

Don't think that this place on main page is great position for example, maybe you will move it to another place 😁❤️

hrynevychroman avatar Feb 13 '24 18:02 hrynevychroman

Don't think that this place on main page is great position for example, maybe you will move it to another place 😁❤️

~~I think it's better to replace it with the Original Task page~~ let see what is Zernonia's opinion is

I think in data-table.md after column pinning example is good place

sadeghbarati avatar Feb 13 '24 18:02 sadeghbarati

@zernonia can you take a look on this PR? What you think is the best place to show Tasks Example?

hrynevychroman avatar Feb 15 '24 14:02 hrynevychroman

Thanks for the PR @romanhrynevych . I don't think we need to duplicate a whole other component just to showcase large dataset. Most of the component/utilities are the same and can be reuse from examples/tasks.

And let's create another path (https://www.shadcn-vue.com/docs/guide/rendering-large-data.html), and write some guide/steps to help other dev to use the virtualisation package instead of another demo.

I believe this way it will be more clear, and more helpful.

zernonia avatar Feb 19 '24 09:02 zernonia

Ok, I will update this PR to your advice soon ❤️

hrynevychroman avatar Feb 19 '24 09:02 hrynevychroman

@sadeghbarati hi 👋

I added new guide section, but don't know where to move examples/big-data folder, because it has custom logic for this type of tables only, maybe you will provide nice place for it ❤️

If it will be some more fixes feel free to provide them, i will fix all of them 😁

hrynevychroman avatar Feb 20 '24 21:02 hrynevychroman

Thanks Roman will check

sadeghbarati avatar Feb 21 '24 02:02 sadeghbarati

@sadeghbarati just noticed that tanstack has his own virtualizer (noticed in this Radix-vue Issue your comment 😁 ) https://github.com/radix-vue/radix-vue/issues/696#issuecomment-1953807473, maybe here I will replace vueuse integration with tanstack table example?

Link: https://tanstack.com/virtual/latest/docs/framework/vue/examples/table

hrynevychroman avatar Feb 21 '24 10:02 hrynevychroman

Feel free to switch to TanStack Virtual or add both?

sadeghbarati avatar Feb 21 '24 10:02 sadeghbarati

thinking about switching to TanStack for more extended features in future 🤔

hrynevychroman avatar Feb 21 '24 10:02 hrynevychroman

Yes TanStack for the Win

sadeghbarati avatar Feb 21 '24 10:02 sadeghbarati

I've found tanstack virtualized more difficult to use (and finnicky) than vue-use, but vue-use has less features

Coudln't really manage to make this work with a table without hitting display issues, so I ended up adding fixed-width to all cells and using a "list" with each row made of cells

maelp avatar Feb 23 '24 21:02 maelp