Skip to content

Add tooltip to memory dropdown select element - #6444

Open
MM071022 wants to merge 1 commit into
firefox-devtools:mainfrom
MM071022:fix/tooltip-memory-dropdown-5352
Open

MM071022 wants to merge 1 commit into
firefox-devtools:mainfrom
MM071022:fix/tooltip-memory-dropdown-5352

Conversation

@MM071022

@MM071022 MM071022 commented Nov 9, 2026 •

Copy link
Copy Markdown

Main | Deploy preview

Summary

Fixes #5352

This PR adds a tooltip to the call tree strategy dropdown (the "data source" selector) so that users can see the description of the currently selected option even when the dropdown menu is closed.

Problem

Previously, the <select> element for choosing between "Timing", "Deallocated memory", "Deallocation sites", etc. only showed tooltips on individual <option> elements. This meant users could only see what an option meant while the dropdown menu was open. Once closed, hovering over the select showed no description.

Solution

  • Converted CallTreeStrategySettingImpl from a class component to a function component
  • Used the useLocalization() hook from @fluent/react to retrieve the localized description of the currently selected strategy
  • Set this description as the title attribute on the <select> element itself

Now when users hover over the closed dropdown, they see a tooltip explaining what the selected data source means.

Changes

  • src/components/shared/CallTreeStrategySetting.tsx: Converted class component to function component, added title attribute to <select> using localized string

Test Plan

  • Open a profile with allocation data
  • Navigate to the call tree panel
  • Hover over the "Data source" dropdown when closed
  • Verify that a tooltip appears showing the description of the selected option
  • Change the selection and verify the tooltip updates accordingly

The call tree strategy dropdown (data source selector) only showed
tooltips for individual options when the menu was open. This made it
difficult for users to understand what options like "Deallocated memory"
or "Deallocation sites" mean after making a selection.

This fix converts the class component to a function component and uses
the useLocalization hook to get the localized description of the
currently selected strategy, then sets it as the title attribute on
the select element itself. Now users can hover over the closed dropdown
to see what the selected option means.

Fixes firefox-devtools#5352
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.

Add a tooltip to the memory dropdown ("data source" / "call tree summary strategy")

1 participant