cybersemics / em

A beautiful, minimalistic note-taking app for personal sensemaking.
Other
282 stars 107 forks source link

1873: Initial implementation of narrow col1 wrap logic. #2438

Open kevinstubbs opened 4 days ago

kevinstubbs commented 4 days ago

Resolves #1873 by implementing the formula col1width = avg1/(avg1+avg2) * totalWidth with 7em as the minimum col1 width and 20em as the maximum.

Before image

After

image

An example where col 2 widths are very small.

raineorshine commented 4 days ago

Thanks! I'll let @trevinhofmann do a first pass.

Please update the puppeteer snapshots by running yarn test:puppeteer -u. Check any snapshots that were updated and make sure they look okay. If all looks good, you can push the new snapshots in a new commit to the PR. Then the CI will pass and the new snapshots will show up in the diff for our review.

raineorshine commented 3 days ago

Thanks for the initial review @trevinhofmann. Looks like we may have to tweak the algorithm a bit to find a good balance.

When both columns are relatively wide, some of the rows begin to overlap

This might be a separate bug, just made apparent through the new table calculation. Can it be reproduced in main? I don't want to increase the scope of this issue unless we know it is a regression.