FrancescoCastaldi opened a new pull request, #43584:
URL: https://github.com/apache/superset/pull/43584

   ### SUMMARY
   Fixes #43386.
   
   When hovering over the 'i' (\InfoCircleOutlined\) description icon next to a 
control's label (such as the Date Range / Time Range picker), two tooltips 
could be shown simultaneously.
   
   #### Root Cause
   In \ControlHeader.tsx\, \ enderOptionalIcons()\ (which renders the 'i' icon 
and its description \<Tooltip>\) was nested inside the \<FormLabel 
htmlFor={name}>\ / \<label>\ tag. Because the interactive info icon was a child 
of the form label, hovering over the info icon also triggered the browser's 
form label association, causing the underlying control (such as the 
\DateFilterLabel\ pill's datetime range tooltip) to activate and pop up in the 
same position as the description tooltip.
   
   #### Changes
   1. Moved \ enderOptionalIcons()\ outside \<FormLabel>\ in 
\superset-frontend/src/explore/components/ControlHeader.tsx\ and 
\packages/superset-ui-chart-controls/src/components/ControlHeader.tsx\.
   2. Wrapped the header label and optional icons in a flex container to 
preserve visual layout and alignment.
   3. Added unit tests in \ControlHeader.test.tsx\ to ensure the info icon is 
rendered outside the form label and only displays the description tooltip on 
hover.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Hovering the 'i' icon now only displays the field description tooltip, 
without triggering redundant tooltips from labeled form controls below it.
   
   ### TESTING INSTRUCTIONS
   1. Open any chart in Explore (e.g. Table chart or Time-series chart).
   2. Hover over the 'i' icon next to the Date Range / Time Range field label.
   3. Verify only the description tooltip for the 'i' icon appears.
   4. Hover over the date range pill below to verify the range tooltip still 
displays as expected.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #43386
   - [x] Changes UI
   - [ ] Requires DB Migration


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to