Tldraw/packages/tldraw/src/test
Mitja Bezenšek 0b44a8b47a
Fix culling. (#3504)
Fixes culling for cases when another user would drag shapes inside your
viewport. We weren't correctly calculating the culling status for arrows
that might be bound to those shapes and also for shapes within dragged
in groups / frames.


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

- [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. Open the same room in two browsers / tabs.
2. Have some shapes that are visible in one browser, but not the other.
3. Drag these shapes so that they are visible in the other browser as
well.
4. They should correctly get unculled.
5. Do this by dragging shapes that have arrows bound to them (arrows
should uncull), groups (shapes within them should uncull), frames.

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

### Release Notes

- Fix culling.
2024-04-17 11:39:09 +00:00
..
__snapshots__ Update the project to Node 20 (#2691) 2024-01-31 16:53:40 +00:00
commands Fix SVG exports in Next.js (#3446) 2024-04-11 14:02:05 +00:00
perf Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
testutils Roundup fixes (#2862) 2024-02-19 14:52:43 +00:00
ui Roundup fixes (#2862) 2024-02-19 14:52:43 +00:00
ClickManager.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
Editor.test.tsx Use canvas bounds for viewport bounds (#2798) 2024-02-12 15:03:25 +00:00
EraserTool.test.ts No impure getters pt8 (#2221) 2023-11-14 16:32:27 +00:00
HandTool.test.ts StateNode atoms (#2213) 2023-11-14 13:02:50 +00:00
HighlightShape.test.ts No impure getters pt3 (#2203) 2023-11-13 14:31:27 +00:00
LaserTool.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
SelectTool.test.ts Stickies: release candidate (#3249) 2024-04-14 18:40:02 +00:00
TLSessionStateSnapshot.test.ts Update the project to Node 20 (#2691) 2024-01-31 16:53:40 +00:00
TLUserPreferences.test.ts Start scrolling if we are dragging close to the window edges. (#2299) 2023-12-15 23:37:03 +00:00
TestEditor.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
TestEditor.ts Stickies: release candidate (#3249) 2024-04-14 18:40:02 +00:00
TldrawEditor.test.tsx New migrations again (#3220) 2024-04-15 12:53:42 +00:00
ZoomTool.test.ts No impure getters pt6 (#2218) 2023-11-14 11:57:43 +00:00
arrowBindingsIndex.test.tsx [improvements] arrows x enclosing shapes x precision. (#2265) 2023-12-01 21:34:12 +00:00
arrows-megabus.test.tsx Maintain bindings whilst translating arrows (#2424) 2024-01-13 20:09:05 +00:00
assets.test.ts Custom Tools DX + screenshot example (#2198) 2023-11-15 18:06:02 +00:00
bookmark-shapes.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
cleanup.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
cropping.test.ts Custom Tools DX + screenshot example (#2198) 2023-11-15 18:06:02 +00:00
customSnapping.test.tsx Add line IDs & fractional indexes (#2890) 2024-02-21 10:06:14 +00:00
drawing.test.ts Revert perf changes (#3217) 2024-03-21 10:05:44 +00:00
duplicate.test.ts Improved duplication (#2480) 2024-01-26 14:54:52 +00:00
flipShapes.test.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
frames.test.ts Stickies: release candidate (#3249) 2024-04-14 18:40:02 +00:00
getCulledShapes.test.tsx Fix culling. (#3504) 2024-04-17 11:39:09 +00:00
getShapeAtPoint.test.ts Fix arrow handle snapping, snapping to text labels, selection of text labels (#1910) 2023-09-18 14:59:27 +00:00
getSnapLines.ts Split snap manager into ShapeBoundsSnaps and HandleSnaps (#2747) 2024-02-07 10:40:01 +00:00
groups.test.ts Split snap manager into ShapeBoundsSnaps and HandleSnaps (#2747) 2024-02-07 10:40:01 +00:00
middleMouseButtonPanning.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
modifiers.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
panning.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
parentsToChildrenWithIndexes.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
paste.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
renderingShapes.test.tsx Perf: Incremental culled shapes calculation. (#3411) 2024-04-10 10:29:11 +00:00
resizeBox.test.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
resizing.test.ts Split snap manager into ShapeBoundsSnaps and HandleSnaps (#2747) 2024-02-07 10:40:01 +00:00
rotating.test.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
roundedBox.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
select.test.tsx Stickies: release candidate (#3249) 2024-04-14 18:40:02 +00:00
selection-omnibus.test.ts Revert "RBush again? (#3439)" (#3481) 2024-04-16 10:56:35 +00:00
shapeIdsInCurrentPage.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
shapeutils.test.ts StateNode atoms (#2213) 2023-11-14 13:02:50 +00:00
spacebarPanning.test.ts Replace Atom.value with Atom.get() (#2189) 2023-11-13 11:51:22 +00:00
styles2.test.tsx no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
styles3.test.ts Rename shapes apis (#1787) 2023-08-02 18:12:25 +00:00
test-jsx.tsx [Snapping 3/5] Custom snapping API (#2793) 2024-02-15 15:10:04 +00:00
text.test.ts Rename shapes apis (#1787) 2023-08-02 18:12:25 +00:00
translating.test.ts Stickies: release candidate (#3249) 2024-04-14 18:40:02 +00:00
viewport-following.test.ts history options / markId / createPage (#1796) 2023-08-05 11:21:07 +00:00