fix(ui-v2): fix Recharts tooltip rendering behind other charts #19697
+2
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After upgrading to Recharts 3, tooltips on pages with multiple charts (like the deployments page) were rendering behind the bars of other charts when the tooltip extended beyond its own chart row.
Root cause: Each chart row creates its own stacking context. When a tooltip from one chart extends into rows below, it appeared behind those rows' chart bars due to normal stacking order.
Fix: Add a high z-index class (
z-20) to theChartContainerwhen the tooltip is active, ensuring the hovered chart and its tooltip are in a higher stacking layer than surrounding rows. Therelativepositioning is added to ensure the z-index takes effect.Note: There is a separate issue where tooltips can be clipped by table container boundaries (especially near the bottom of the table). This PR does not address that issue - it requires further investigation to identify the exact element causing the clipping.
Human Review Checklist
z-20is sufficient (may need adjustment if other elements have higher z-index)relativepositioning to ChartContainerFlowRunActivityBarChartChecklist
<link to issue>"mint.json.Requested by: @desertaxle ([email protected])
Link to Devin run: https://app.devin.ai/sessions/187bbb9d6eb043c0a4fc9f48dd1fa562