Skip to content

[Due for payment 2025-08-15] [$250] Avoid rendering PopoverMenus before they are opened #67895

@mountiny

Description

@mountiny

Coming from here

Background:

PopoverMenu is a component that displays a popover on wide layout and a bottom sheet on narrow screens.

Problem:

Popovers are rendered with their parents, even if they are not visible. It means that on some screens there might be 10+ PopoverMenus with some complex MenuItems in the DOM tree, even though they are not displayed even once

Solution:

Write a wrapper for PopoverMenu that controls if the component should be rendered.

Rendering the Workspaces tab (with 12 PopoverMenus)

  • Before: 887 ms
  • After: 442 ms (-50%)

Rendering the Reports tab with multiple reports (with 4 PopoverMenus)

  • Before: 1761 ms
  • After: 1608 ms (-9%)
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021952688737946794120
  • Upwork Job ID: 1952688737946794120
  • Last Price Increase: 2025-08-05
Issue OwnerCurrent Issue Owner: @dylanexpensify
Issue OwnerCurrent Issue Owner: @staszekscp

Metadata

Metadata

Labels

AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions