react/scripts/jest
Sebastian Markbåge f6a4882859
[DevTools] Show the Suspense boundary name in the rect if there's no overlap (#34918)
This shows the title in the top corner of the rect if there's enough
space.

The complex bit here is that it can be noisy if too many boundaries
occupy the same space to overlap or partially overlap.

This uses an R-tree to store all the rects to find overlapping
boundaries to cut the available space to draw inside the rect. We use
this to compute the rectangle within the rect which doesn't have any
overlapping boundaries.

The roots don't count as overlapping. Similarly, a parent rect is not
consider overlapping a child. However, if two sibling boundaries occupy
the same space, no title will be drawn.

<img width="734" height="813" alt="Screenshot 2025-10-19 at 5 34 49 PM"
src="https://github.com/user-attachments/assets/2b848b9c-3b78-48e5-9476-dd59a7baf6bf"
/>

We might also consider drawing the "Initial Paint" title at the root but
that's less interesting. It's interesting in the beginning before you
know about the special case at the root but after that it's just always
the same value so just adds noise.
2025-10-19 22:17:45 -04:00
..
devtools [mcp] Add MCP tool to print out the component tree of the currently open React App (#33305) 2025-06-02 21:42:34 -07:00
matchers [tests] Remove to*Dev matchers (#31989) 2025-01-07 14:17:14 -05:00
spec-equivalence-reporter [tests] Remove to*Dev matchers (#31989) 2025-01-07 14:17:14 -05:00
typescript [tests] Remove to*Dev matchers (#31989) 2025-01-07 14:17:14 -05:00
config.base.js [tests] remove pretest compiler script (#33452) 2025-06-06 09:16:58 -04:00
config.build-devtools.js [DevTools] Show the Suspense boundary name in the rect if there's no overlap (#34918) 2025-10-19 22:17:45 -04:00
config.build.js [BE] upgrade prettier to 3.3.3 (#30420) 2024-07-22 16:09:01 -04:00
config.source-persistent.js DevTools: Show hook names based on variable usage (#21641) 2021-07-01 14:39:18 -04:00
config.source-www.js DevTools: Show hook names based on variable usage (#21641) 2021-07-01 14:39:18 -04:00
config.source-xplat.js Add xplat test variants (#29734) 2024-06-04 13:07:29 -04:00
config.source.js DevTools: Show hook names based on variable usage (#21641) 2021-07-01 14:39:18 -04:00
dont-run-jest-directly.js Add error when running jest directly (#12726) 2018-05-01 12:46:17 -07:00
jest-cli.js [ci] Cleanup --ci flag 2024-07-29 19:18:03 -04:00
jest.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
patchMessageChannel.js Unify serverAct helpers (#33327) 2025-05-21 16:13:54 -04:00
patchSetImmediate.js Unify serverAct helpers (#33327) 2025-05-21 16:13:54 -04:00
preprocessor.js Fix some DevTools regression test actions and assertions (#34459) 2025-09-15 15:31:58 +02:00
ReactDOMServerIntegrationEnvironment.js Client render dehydrated Suspense boundaries on document load (#31620) 2024-12-03 13:13:35 -08:00
ReactJSDOMEnvironment.js Client render dehydrated Suspense boundaries on document load (#31620) 2024-12-03 13:13:35 -08:00
setupEnvironment.js [Flight][Fizz] schedule work async (#29551) 2024-06-06 10:07:24 -07:00
setupGlobal.js Use toMatchInlineSnapshot for dehydrated values (#20618) 2021-04-26 12:30:34 -04:00
setupHostConfigs.js Stop exporting dev-only methods in OSS production builds (#32200) 2025-02-13 18:26:36 +01:00
setupTests.build.js Enforce that the "react-server" build of "react" is used (#27436) 2023-09-29 18:24:05 -04:00
setupTests.js Revert Node Web Streams (#33472) 2025-06-06 16:26:36 -04:00
setupTests.persistent.js Update jest to v26 (#21574) 2021-05-27 16:33:57 +01:00
setupTests.www.js Fix ownerStackLimit feature gating for tests (#32726) 2025-03-26 12:01:05 -04:00
setupTests.xplat.js Fix ownerStackLimit feature gating for tests (#32726) 2025-03-26 12:01:05 -04:00
TestFlags.js Release Activity in Canary (#34374) 2025-09-12 12:47:40 -04:00