Skip to content

fix: [Duplicate to run workflows and deploy] Fix off-center popover flash when clicking CopyToClipboard #3461

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cansuaa
Copy link
Member

@cansuaa cansuaa commented Apr 29, 2025

Because the clipboard API is async, the popover briefly renders in the "pending" state before rendering in the "success" or "error" state, which is perceived as a visual glitch.

The fix here is to wait to open the popover until we're out of the "pending" state. To achieve that, I've modified the InternalPopover API so that it doesn't render a popover if the given content is null, regardless of its internal visible state.

Description

Related links, issue #, if available: n/a

How has this been tested?

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.

Because the clipboard API is async, the popover briefly renders in the
"pending" state before rendering in the "success" or "error" state,
which is perceived as a visual glitch.

The fix here is to wait to open the popover until we're out of the
"pending" state. To achieve that, I've modified the `InternalPopover`
API so that it doesn't render a popover if the given `content` is
`null`, regardless of its internal `visible` state.
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