Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Render Visual Refresh background height in sync with content #1344

Closed
wants to merge 13 commits into from

Conversation

jperals
Copy link
Member

@jperals jperals commented Jul 19, 2023

Description

Alternative approach to #1331, a bit more orthodox (follows guidance from facebook/react#24331) but with performance impact.

As a long-term fix, we want to refactor app layout so that resize observer calls are not necessary to keep the content and the background in sync.

Ticket: AWSUI-21410

How has this been tested?

  • Tested manually by locally switching the package to React 18 and using Chrome developer tools (CPU throttling, performance tools)
  • Added page to manually test
  • Deployed in my pipeline including Lighthouse tests

Lighthouse tests indicate the following performance impact in React 18 (average of 2 table views, 3 runs each):

  • Score: -0.01
  • Bootup time: virtually the same
  • Total blocking time: between +55ms and +95ms. In percentages: between +10.1% and +16.52%

Performance recordings in tools indicate an average increase of time from interaction to next paint of 28.4ms (from 153.2 to 181.6ms, +18.53%) compared to #1331 (tried 5 times each)

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b80535d) 93.46% compared to head (26760f2) 93.46%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1344   +/-   ##
=======================================
  Coverage   93.46%   93.46%           
=======================================
  Files         623      624    +1     
  Lines       16731    16743   +12     
  Branches     5527     5530    +3     
=======================================
+ Hits        15637    15649   +12     
  Misses       1021     1021           
  Partials       73       73           
Impacted Files Coverage Δ
...nal/hooks/container-queries/use-resize-observer.ts 100.00% <100.00%> (ø)
src/internal/hooks/container-queries/utils.ts 100.00% <100.00%> (ø)
src/internal/hooks/use-dynamic-overlap/index.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jperals jperals marked this pull request as ready for review July 19, 2023 16:37
@jperals jperals requested a review from a team as a code owner July 19, 2023 16:37
@jperals jperals requested review from rubencarvalho and removed request for a team July 19, 2023 16:37
@jperals
Copy link
Member Author

jperals commented Jul 24, 2023

Working on #1331 as our preferred option. Will close this one once that one is merged.

@just-boris
Copy link
Member

Closing in favor of #1331

@just-boris just-boris closed this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants