tldraw/packages/tlschema/src
Mitja Bezenšek f1e0af7631
Display none for culled shapes (#3291)
Comparing different culling optimizations:


https://github.com/tldraw/tldraw/assets/2523721/0b3b8b42-ed70-45b7-bf83-41023c36a563

I think we should go with the `display: none` + showing the skeleteon.
The way it works is:
- We now add a sibling to the shape wrapper div which serves as the
skeleton for the culled shapes.
- Only one of the two divs (shape wrapper and skeleton div) is
displayed. The other one is using `display: none` to improve
performance.

### Change Type

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

- [ ] `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
- [x] `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


- Improve performance of culled shapes by using `display: none`.

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-04-05 13:23:02 +00:00
..
assets Faster validations + record reference stability at the same time (#2848) 2024-02-20 12:35:25 +00:00
misc [Snapping 2/5] Fix line-handle mid-point snapping (#2831) 2024-02-15 10:27:55 +00:00
records Add white migration (#3334) 2024-04-04 18:16:17 +00:00
shapes Display none for culled shapes (#3291) 2024-04-05 13:23:02 +00:00
styles Add white (#3321) 2024-04-01 18:48:56 +00:00
translations Prevent iframe embedding for dotcom (except on tldraw.com) (#2947) 2024-02-26 18:30:55 +00:00
createPresenceStateDerivation.ts Replace Atom.value with Atom.get() (#2189) 2023-11-13 11:51:22 +00:00
createTLSchema.ts Setup papercuts (#2987) 2024-02-29 10:40:28 +00:00
index.ts Faster validations + record reference stability at the same time (#2848) 2024-02-20 12:35:25 +00:00
migrations.test.ts Add white migration (#3334) 2024-04-04 18:16:17 +00:00
store-migrations.ts [improvement] store snapshot types (#1657) 2023-06-27 12:25:55 +00:00
TLStore.ts [Snapping 1/5] Validation & strict types for fractional indexes (#2827) 2024-02-14 17:53:30 +00:00
util-types.ts hoist opacity out of props (#1526) 2023-06-06 16:15:12 +00:00