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

Switch to Taffy for layout #2542

Open
thecodrr opened this issue Jan 22, 2024 · 5 comments
Open

Switch to Taffy for layout #2542

thecodrr opened this issue Jan 22, 2024 · 5 comments

Comments

@thecodrr
Copy link

Yoga is fine but it only supports Flex layout whereas Taffy has now added support for Flex, Block & Grid layouts with more on their TODO list. I think react-pdf will greatly benefit from the migration.

@diegomura
Copy link
Owner

Interesting. Thanks for posting this. Didn't know about Taffy. I see it's written in rust. Is there a wasm port published somewhere so I can test?

@thecodrr
Copy link
Author

@nicoburns is working on a WASM build here: DioxusLabs/taffy#394

@diegomura
Copy link
Owner

Will try to be on the loop and try it out once available

@nicoburns
Copy link

nicoburns commented Jan 22, 2024

Currently working out how best to package/publishing as a module is the blocker for this. Does react-pdf need to run it's layout (so Yoga/Taffy) in both node and browsers? And if so, how are you abstracting away the differences? Rollup?

@diegomura
Copy link
Owner

diegomura commented Jan 24, 2024

Thanks for reaching out @nicoburns ! Yes, we run it in both node and browser. Particularly yoga does not need any abstraction to run in both, but several packages of this repo do, and we use rollup for building different versions for each platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants