tldraw/packages/editor
Steve Ruiz a722e3e6f0
[fix] various text (#1350)
This PR updates tests for the text shape, as well as updating the logic
of `getTextLines`. We now:

- allow leading whitespace
- allow white space to cause line breaks, trim the whitespace off of the
end of the line. Crazy times!
- fix a bug with geo shapes changes width when growY changes

Note that this is not a "full solution" to line breaks that are caused
by whitespace + wrapping. AFAIK this is impossible to fix in SVG-land
without measuring the SVG element in order to collapse whitespace in the
same way that it collapses in HTML layout.

### Change Type

- [x] `patch` — Bug Fix
- [ ] `minor` — New Feature
- [ ] `major` — Breaking Change

- [ ] `dependencies` — Dependency Update (publishes a `patch` release,
for devDependencies use `internal`)

- [ ] `documentation` — Changes to the documentation only (will not
publish a new version)
- [ ] `tests` — Changes to any testing-related code only (will not
publish a new version)
- [ ] `internal` — Any other changes that don't affect the published
package (will not publish a new version)

### Test Plan

- [x] Webdriver tests

### Release Notes

- Allow leading whitespace
2023-05-11 22:15:24 +00:00
..
src [fix] various text (#1350) 2023-05-11 22:15:24 +00:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md [feature] ui events (#1326) 2023-05-11 22:14:58 +00:00
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
editor.css [feature] ui events (#1326) 2023-05-11 22:14:58 +00:00
LICENSE transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json [chore] Bump nanoid (#1349) 2023-05-11 11:55:00 +00:00
README.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
setupTests.js derived presence state (#1204) 2023-04-27 18:03:19 +00:00
tsconfig.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00

tldraw/tldraw

Benchmark

To run the benchmarks

yarn workspace @tldraw/tldraw benchmark

Or

yarn workspace @tldraw/tldraw benchmark "file_search_string"