tldraw/packages
Steve Ruiz 4801b35768
[tinyish] Simplify / skip some work in Shape (#3176)
This PR is a minor cleanup of the Shape component.

Here we:
- use some dumb memoized info to avoid unnecessary style changes
- move the dpr check up out of the shapes themselves, avoiding renders
on instance state changes

Culled shapes:
- move the props setting on the culled shape component to a layout
reactor
- no longer set the height / width on the culled shape component
- no longer update the culled shape component when the shape changes

Random:
- move the arrow shape defs to the arrow shape util (using that neat API
we didn't used to have)

### 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 ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `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. Use shapes
2. Use culled shapes

### Release Notes

- SDK: minor improvements to the Shape component
2024-03-17 21:37:37 +00:00
..
assets Update CHANGELOG.md [skip ci] 2024-02-29 18:28:45 +00:00
editor [tinyish] Simplify / skip some work in Shape (#3176) 2024-03-17 21:37:37 +00:00
namespaced-tldraw Remove namespaced-tldraw/tldraw.css (#3068) 2024-03-04 17:13:12 +00:00
state [perf] Reinstate render throttling (#3160) 2024-03-15 16:18:23 +00:00
store Performance improvements (#2977) 2024-03-11 13:17:31 +00:00
tldraw [tinyish] Simplify / skip some work in Shape (#3176) 2024-03-17 21:37:37 +00:00
tlschema Remove dependabot config since it only controls version updates? (#3057) 2024-03-04 13:19:51 +00:00
tlsync [sync] allow connections from v4 clients (#3173) 2024-03-16 10:21:37 +00:00
utils fixup file helpers (#3130) 2024-03-12 16:51:29 +00:00
validate Update CHANGELOG.md [skip ci] 2024-02-29 18:28:45 +00:00