plouc / nivo

nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
https://nivo.rocks
MIT License
13.08k stars 1.02k forks source link

0.85.1 of @nivo/bar breaks tooltips that use position: fixed style #2560

Open kariwhitcomb opened 5 months ago

kariwhitcomb commented 5 months ago

Describe/explain the bug A clear and concise description of what the bug is.

When we upgraded to @nivo/bar 0.85.1 the custom tooltips we use on our bar charts stopped appearing

To Reproduce https://codesandbox.io/p/sandbox/pedantic-keldysh-tfvysn

Steps to reproduce the behavior:

  1. Hover over a bar in the chart
  2. In the top one, it does not show the tooltip. The bottom one does. The only difference is that one has the style set.
  3. If you change package.json to use 0.85.0 version, then both charts show the tooltip

Expected behavior

Both charts should show the tooltip.

Screenshots If applicable, add screenshots to help explain your problem. chart with broken tooltip

Desktop (please complete the following information):

Additional context Add any other context about the problem here. The only change I can figure might have changed this behavior in 0.85.1 is https://github.com/plouc/nivo/pull/2480/files, but I don't understand why

liringlas commented 5 months ago

So basically position: fixed works for tooltips which CSS styles are applied by CSS className, not style attribute? Maybe your style overrides the one which should be applied by nivo?

plouc commented 4 months ago

Seems related to https://github.com/plouc/nivo/pull/2480, the tooltip is there, but its opacity remains 0.

browniefed commented 4 months ago

Can confirm this has broken our tooltips. They render but stick at opacity: 0

browniefed commented 4 months ago

If any styling is applied at all, whether that is className or style it will never toggle to opacity: 1

jornncc commented 3 months ago

This is still happening. Please fix.

kariwhitcomb commented 2 weeks ago

This issue is preventing us from picking up new versions of nivo