tldraw/apps/examples/e2e/tests
Mime Čuvalo 68bc29f103
textfields: fix RTL layout for SVG exports (#3680)
Followup to https://github.com/tldraw/tldraw/pull/3188 (although this
problem was there before that PR)

This does more work for RTL rendering in SVG context, especially since
we position each span one-by-one.

I had to do a bit of esoteric spelunking and it turns out
[`unicode-bidi:
plaintext`](https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi)
solves our issue even though it isn't really recommend to be used by web
developers. Fun times 🙃

Before:
<img width="369" alt="Screenshot 2024-05-02 at 11 45 44"
src="https://github.com/tldraw/tldraw/assets/469604/df55e03a-4760-4b8f-adad-ed1a8c13ad51">


After:
<img width="365" alt="Screenshot 2024-05-02 at 11 54 48"
src="https://github.com/tldraw/tldraw/assets/469604/3339bbf4-041a-4fdf-8b6e-6fa19dfb0a9e">




### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Test LTR text.
2. Test RTL text.
3. Test mixed LTR/RTL on different lines.

- [ ] Unit Tests
- [x] End to end tests

### Release Notes

- [Add a brief release note for your PR here.](textfields: fix RTL
layout for SVG exports)

---------

Co-authored-by: huppy-bot[bot] <128400622+huppy-bot[bot]@users.noreply.github.com>
2024-05-03 13:40:59 +00:00
..
export-snapshots.spec.ts-snapshots textfields: fix RTL layout for SVG exports (#3680) 2024-05-03 13:40:59 +00:00
fixtures Fix jpg export and tests (#3198) 2024-03-18 15:08:09 +00:00
test-canvas-events.spec.ts-snapshots Replace Atom.value with Atom.get() (#2189) 2023-11-13 11:51:22 +00:00
export-snapshots.spec.ts textfields: fix RTL layout for SVG exports (#3680) 2024-05-03 13:40:59 +00:00
test-actions-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-api.spec.ts Fix jpg export and tests (#3198) 2024-03-18 15:08:09 +00:00
test-camera.spec.ts Add playwright tests (#1484) 2023-05-30 15:28:56 +01:00
test-canvas-events.spec.ts Input buffering (#3223) 2024-04-02 14:29:14 +00:00
test-clipboard.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-context-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-focus.spec.ts Component-based toolbar customisation API (#3067) 2024-03-12 16:14:28 +00:00
test-help-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-kbds.spec.ts Component-based toolbar customisation API (#3067) 2024-03-12 16:14:28 +00:00
test-main-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-navigation-panel.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-page-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-routes.spec.ts PDF editor example (#3159) 2024-03-19 11:55:21 +00:00
test-shapes.spec.ts Input buffering (#3223) 2024-04-02 14:29:14 +00:00
test-smoke.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-style-panel.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-text.spec.ts Stickies: release candidate (#3249) 2024-04-14 18:40:02 +00:00
test-toolbar.spec.ts E2E Style Panel Tests (#2878) 2024-02-23 14:37:15 +00:00