Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-pills] Added debouncing for resize observer #2143

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Conversation

adavijit
Copy link
Collaborator

@adavijit adavijit commented Apr 23, 2024

Summary

What was changed:
Replaced direct invocation of handleResize inside ResizeObserver callback with a debounced function.

Why it was changed:
To prevent potential cyclic dependencies leading to infinite loops, ensuring that handleResize is called only after a specified delay, thus resolving the issue.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-10369


Thank you for contributing to Terra.
@cerner/terra

@github-actions github-actions bot temporarily deployed to preview-pr-2143 April 23, 2024 04:41 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2143 April 23, 2024 04:50 Destroyed
@adavijit adavijit self-assigned this Apr 23, 2024
@adavijit adavijit changed the title UXPLATFORM-10369 Added debouncing for resize observer [terra-pills] Added debouncing for resize observer Apr 23, 2024
@sugan2416 sugan2416 merged commit f103cfb into main Apr 23, 2024
22 checks passed
@sugan2416 sugan2416 deleted the UXPLATFORM-10369 branch April 23, 2024 07:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants