Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: useVirtualizer composable #388

Open
zernonia opened this issue Feb 20, 2024 · 3 comments
Open

Feature request: useVirtualizer composable #388

zernonia opened this issue Feb 20, 2024 · 3 comments

Comments

@zernonia
Copy link

Is your feature request related to a problem? Please describe.
I love how small and flexible the package is, and would like to use it to build Virtualizer and ListItem component for radix-vue.

Currently there's no core functionalities being exported other than React, Vue, or Solid component.

Describe the solution you'd like
Expose createScroller, createResizer and other core function

Describe alternatives you've considered
Or, create a virtualizer composable similar to TanStack Virtualizer

@zernonia zernonia changed the title Expose core functionalities and let user uilt their own Virtualizer/ListItem Expose core functionalities and let user build their own Virtualizer/ListItem Feb 20, 2024
@inokawa
Copy link
Owner

inokawa commented Feb 20, 2024

Hello,
I'd like to increase customizability of this package. However I'm also cautious to expose core because internal APIs are not stable and they can induce misuse of this package.

I can add lacking features to Virtualizer if they are reasonable.
Or it may be OK to expose core with prefix like import { unstable_createScroller, unstable_createResizer } from 'virtua/core;, and tell use them at your own risk. One of the reason why this package is small is that we compress internal APIs as much as possible, so it can increase bundle size somewhat.

@zernonia
Copy link
Author

Thanks for your swift response @inokawa . I understand your concern. Exposing unstable function might not be ideal for now.

Perhaps I can rename this ticket to "feature request: useVirtualizer"? This way whoever interested with the composition could react '👍🏻' as a gauge for feature demand, and you can slowly work towards stabilizing codebase? 😁

@inokawa
Copy link
Owner

inokawa commented Feb 20, 2024

@zernonia Yes. No problem!

I'm not sure tanstack like approach is the best, but anyway I agree with that packed useVirtualizer like function would be needed because in some case we want to display items with different algorithm (ex. table tag #312 ).

@zernonia zernonia changed the title Expose core functionalities and let user build their own Virtualizer/ListItem Feature reqesut: useVirtualizer composable Feb 20, 2024
@zernonia zernonia changed the title Feature reqesut: useVirtualizer composable Feature request: useVirtualizer composable Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants