Skip to content

Conversation

@issackjohn
Copy link
Owner

@issackjohn issackjohn commented Jul 23, 2025

Step Name force-layout: getBoundingClientRect force-layout: getBoundingRectAndElementFromPoint
LoadChatAndExpandRecipes
ReduceWidthIn5Steps
ScrollToChatAndSendMessages
IncreaseWidthIn5Steps

@issackjohn issackjohn changed the title Capture sync async gbcr Capture sync async with getBoundingClientRect Jul 24, 2025
@issackjohn issackjohn requested a review from Copilot July 24, 2025 21:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors benchmark test code to improve layout synchronization with iframe content by changing how page layout forcing is handled and how iframe elements are accessed.

  • Updated all benchmark test steps to pass specific target elements to the layout() method instead of forcing layout on the entire page
  • Refactored iframe element access pattern to use getContentDocument() and explicit element wrapping
  • Added async/await synchronization points using requestAnimationFrame and setTimeout to ensure layout operations complete

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
resources/tests.mjs Updated all benchmark test steps to use targeted layout forcing and new iframe access pattern
resources/benchmark-runner.mjs Modified layout() method to accept target parameter and made wrapElement() public
experimental/responsive-design/src/lib/components/information-window.js Removed unnecessary requestUpdate() call
experimental/responsive-design/src/lib/components/chat-window.js Made chat methods async
experimental/responsive-design/src/lib/components/chat-input.js Removed event bubbling properties
experimental/responsive-design/src/lib/components/app-ribbon.js Optimized resize handling to avoid unnecessary updates

@issackjohn
Copy link
Owner Author

@lpardosixtosMs do you mind taking a look at tests.mjs please.

@issackjohn issackjohn marked this pull request as ready for review July 24, 2025 23:34
@issackjohn issackjohn closed this Jul 24, 2025
@issackjohn issackjohn reopened this Jul 24, 2025
@issackjohn issackjohn merged commit 943bc6a into responsive-design Jul 28, 2025
@issackjohn issackjohn deleted the capture-sync-async-gbcr branch July 28, 2025 22:25
issackjohn added a commit that referenced this pull request Aug 25, 2025
* Refactor layout method to accept target element for improved flexibility
* refactor: simplify layout method by using logical OR for body assignment
* refactor: replace magic numbers with named constants for media query breakpoints
* refactor: replace repeated calls to getContentDocument with a variable for improved readability
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.

1 participant