Skip to content

Commit 36e85c8

Browse files
committed
Merge remote-tracking branch 'upstream/main' into production
2 parents e6c1753 + c9c3a55 commit 36e85c8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

website/architecture/landing-page.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ In the current architecture, we use `onLayout` to get the measurements of the vi
3434
function ViewWithTooltip() {
3535
// ...
3636

37-
// We get the layout information and pass to ToolTip to position itself
37+
// We get the layout information and pass to Tooltip to position itself
3838
const onLayout = React.useCallback(event => {
3939
targetRef.current?.measureInWindow((x, y, width, height) => {
4040
// This state update is not guaranteed to run in the same commit
41-
// This results in a visual "jump" as the ToolTip repositions itself
41+
// This results in a visual "jump" as the Tooltip repositions itself
4242
setTargetRect({x, y, width, height});
4343
});
4444
}, []);
@@ -62,7 +62,7 @@ function ViewWithTooltip() {
6262

6363
useLayoutEffect(() => {
6464
// The measurement and state update for `targetRect` happens in a single commit
65-
// allowing ToolTip to position itself without intermediate paints
65+
// allowing Tooltip to position itself without intermediate paints
6666
targetRef.current?.measureInWindow((x, y, width, height) => {
6767
setTargetRect({x, y, width, height});
6868
});
@@ -82,11 +82,11 @@ function ViewWithTooltip() {
8282
<div className="TwoColumns TwoFigures">
8383
<figure>
8484
<img src="/img/new-architecture/async-on-layout.gif" alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The tooltip is rendered after a short delay after the view moves" />
85-
<figcaption>Asynchronous measurement and render of the ToolTip. [See code](https://gist.github.com/lunaleaps/eabd653d9864082ac1d3772dac217ab9).</figcaption>
85+
<figcaption>Asynchronous measurement and render of the Tooltip. [See code](https://gist.github.com/lunaleaps/eabd653d9864082ac1d3772dac217ab9).</figcaption>
8686
</figure>
8787
<figure>
8888
<img src="/img/new-architecture/sync-use-layout-effect.gif" alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The view and tooltip move in unison." />
89-
<figcaption>Synchronous measurement and render of the ToolTip. [See code](https://gist.github.com/lunaleaps/148756563999c83220887757f2e549a3).</figcaption>
89+
<figcaption>Synchronous measurement and render of the Tooltip. [See code](https://gist.github.com/lunaleaps/148756563999c83220887757f2e549a3).</figcaption>
9090
</figure>
9191
</div>
9292

0 commit comments

Comments
 (0)