tldraw/packages/tlschema/src
Mitja Bezenšek 787eab75d6
Add migration for horizontal alignment (#1443)
This adds a migration to migrate existing alignment options to their
legacy counter parts (`start` -> `start-legacy`, `end` -> `end-legacy`,
`middle` -> `middle-legacy`).

With this change the legacy options don't show any align as active in
the Styles panel:
![CleanShot 2023-05-23 at 19 53
45](https://github.com/tldraw/tldraw/assets/2523721/4017e03a-9492-4a02-b991-ac206f40ae17)

I think this is probably what we want.

### Change Type

- [x] `patch` — Bug Fix

### Test Plan

1. Use some old preview link to create Geo and Note shapes with old
alignment options. You can use this one:
https://examples-kzwtf68jr-tldraw.vercel.app/
2. Copy and paste these shapes over to staging. Nothing should change
visually.
3. Also try out exporting to svg (with both old and new alignment
options)

- [x] Unit Tests
- [ ] Webdriver tests

### Release Notes

- Add support for legacy alignment options.

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2023-05-24 11:34:13 +00:00
..
assets Stricter ID types (#1439) 2023-05-24 11:25:41 +00:00
records Stricter ID types (#1439) 2023-05-24 11:25:41 +00:00
shapes Add migration for horizontal alignment (#1443) 2023-05-24 11:34:13 +00:00
createTLSchema.ts [refactor] restore createTLSchema (#1444) 2023-05-24 10:48:31 +00:00
defaultDerivePresenceState.ts [chore] move schema construction to tlschema package (#1334) 2023-05-09 14:40:58 +00:00
fixup.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
geometry-types.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
index.ts [refactor] restore createTLSchema (#1444) 2023-05-24 10:48:31 +00:00
languages.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
migrations.test.ts Add migration for horizontal alignment (#1443) 2023-05-24 11:34:13 +00:00
schema.ts [refactor] record migrations (#1430) 2023-05-22 21:46:24 +00:00
style-types.ts Add migration for horizontal alignment (#1443) 2023-05-24 11:34:13 +00:00
TLRecord.ts derived presence state (#1204) 2023-04-27 18:03:19 +00:00
TLStore.ts [perf] make ensureStoreIsUsable scale better (#1362) 2023-05-12 11:39:36 +00:00
translations.test.ts [fix] pick a better default language (#1201) 2023-04-29 23:06:02 +00:00
translations.ts [fix] pick a better default language (#1201) 2023-04-29 23:06:02 +00:00
ui-types.ts [feature] add laser pointer (#1412) 2023-05-19 11:09:13 +00:00
util-types.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
validation.ts Add migration for horizontal alignment (#1443) 2023-05-24 11:34:13 +00:00