ecamp3 icon indicating copy to clipboard operation
ecamp3 copied to clipboard

Experiment: Tables in rich text

Open carlobeltrame opened this issue 1 year ago • 1 comments

Just playing around a little... And nuxt print is broken locally, so I want the feature branch deployment to see something :grimacing:

One bug I which has to be investigated still: The horizontal space allocation in client print is different depending on whether you print the whole camp (in camp admin) or just a single activity (from the activity detail view):

Printing the activity from camp admin: Screenshot 2024-04-05 at 20-29-19 Sola-2023-14 pdf

Printing the same activity from the activity detail view: Screenshot 2024-04-05 at 20-29-15 Sportblock-pdf-4 pdf

carlobeltrame avatar Mar 26 '24 20:03 carlobeltrame

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

github-actions[bot] avatar Mar 26 '24 20:03 github-actions[bot]

Can we close this PR?

BacLuc avatar Jul 26 '25 07:07 BacLuc

Yes, for now I'm not working on this actively. I think the following limitations were still present:

  • Fully dynamic width columns are not possible with the flexbox-only model of react-pdf (but fixed width such as 100px or 50% works)
  • rowspan (merging cells vertically) isn't possible. Colspan should work
  • The mentioned bug with the difference between camp admin print and direct activity print was never investigated further

The first two should be solvable if react-pdf switches from yoga to a layout engine like DioxusLabs/taffy which has flexbox as well as grid support (maybe one day even table layout support). They are working on WASM bindings DioxusLabs/taffy#394 and I was experimenting with it to replace yoga in react-pdf, but it's still in the early stages.

carlobeltrame avatar Jul 26 '25 08:07 carlobeltrame