covid19india / covid19india-react

Tracking the impact of COVID-19 in India
https://www.covid19india.org
MIT License
6.86k stars 3.41k forks source link

Map colours on Firefox and Chrome #1822

Closed AzimJaved closed 4 years ago

AzimJaved commented 4 years ago

Describe the bug Colours on Firefox and Chrome are vastly different, using the dark mode and, look ugly on Firefox.

To Reproduce Steps to reproduce the behavior: Visit the site using Firefox and Chrome.

Expected behavior Colours look like they do on Chrome even on Firefox.

Screenshots If applicable, add screenshots to help explain your problem. image image

Desktop (please complete the following information):

phoenicopteri commented 4 years ago

This also happens for active, recovered and deceased graphs

ACTIVE

active-negative

RECOVERED

recovered-negative

DECEASED

deceased-negative

Seems to be happening post release of latest version of firefox (76.0), works fine for older versions

shuklaayush commented 4 years ago

Was this fixed?

AzimJaved commented 4 years ago

Was this fixed?

Not yet.

shuklaayush commented 4 years ago

I can't seem to reproduce this. Are you sure that this is not because of DarkReader?

AzimJaved commented 4 years ago

I'm not sure. I still have the issue in Incognito with all addons disabled. @phoenicopteri was able to reproduce it.

image

phoenicopteri commented 4 years ago

Yes, this is still reproducing without DarkReader Please note issue is only on firefox, chrome works fine

bee-rickey commented 4 years ago

@phoenicopteri @AzimJaved It's working for me on Mac. Are you both on windows?

phoenicopteri commented 4 years ago

Yes this is on Windows 10 for me

shuklaayush commented 4 years ago

Weird, it's working for me on Windows. Which version of Firefox are you guys on?

AzimJaved commented 4 years ago

Windows 10, Firefox 76.0.1 for me.

phoenicopteri commented 4 years ago

Firefox 76.0.1, it worked fine in Firefox 75.x

shuklaayush commented 4 years ago

I'm on the same version and it's working fine for me. Do you guys get any logs?

ss

phoenicopteri commented 4 years ago

I did not get any logs. This issue seems to be happening on devices with the default Intel GPU only. Did not hit it on a Windows 7 machine with additional NVIDIA GeForce on it

shuklaayush commented 4 years ago

So, it probably has something to do with the SVG filters that we're using. Can you play around with those and see if changing anything fixes this?

image

AzimJaved commented 4 years ago

image Removing url(#balance-colour) makes it similar, although not exactly the same as on Chrome for me. Removing it from both Chrome and Firefox make the maps identical for me. If it matters, I run an Nvidia GPU and have this issue. I do not believe it's related.

shuklaayush commented 4 years ago

So that's a custom SVG filter that we've defined in https://github.com/covid19india/covid19india-react/blob/c030fa8f9d8b3bf83d34cc5c8cdaea7c498e3d8e/src/components/choropleth.js#L474-L486

Can you check if removing the position/height style attributes from this filter helps? You'll find it here

image

AzimJaved commented 4 years ago

Nope, no change. image The buttons below got shifted downwards a bit though.

shuklaayush commented 4 years ago

Yeah, ignore that. Looks like the filter is not working properly. This could be related to the GPU thing mentioned earlier. I'll read up and see if I can find anything

AzimJaved commented 4 years ago

Alright.

ROHROCK commented 4 years ago

Can we use cross-browser testing tools like Comparium or LambdaTest? I am also unable to replicate the bug, please share more details.

Details:

Firefox Version: Mozilla Firefox 77.0.1 OS: Ubuntu 18.04 Graphics Card: Intel Corporation HD Graphics 5500

Screenshot from 2020-06-27 01-40-24

itechdivyanshu commented 4 years ago

i think its a browser bug that happens sometimes

shuklaayush commented 4 years ago

Closing due to inactivity