deprem-yardim-frontend icon indicating copy to clipboard operation
deprem-yardim-frontend copied to clipboard

bug: zIndex's are bloated and conflicts MUI

Open emirefek opened this issue 2 years ago • 4 comments

Hata Tanımı

zIndex values are not really making any sense, and they are broking MUI's popper components. Popper component is needed for MUI's components with Pop-up UX purpose. They needed to get lower then 100z.

## Hata Ortamı I noticed this problem while developing feature with MUI's Autocomplete component. PR: #495 When you add MUI's Autocomplete component the component stays under Header.

Hatayı nasıl aldığınızı adım adım açıklayın

  1. Checkout the PR: #495
  2. Don't forget to add GCloud api-key as env variable. It's needed for feature.
  3. Type something to search box and you'll see it stays under header.
  4. Don't try to manipulate zIndex because you shouldn't bypass MUI's default values like this if you don't really need.

Beklenen Davranış

It should be on top and when I look source code. These are the all zIndex values in whole project: [9999, 99999, 1000, 998, 999, 1000, 999, 999, 1000, 2, -1, -1, 1, 1, 9999, 999] I think we needed to get away from this bloated stuff. And manage zIndex properly.

Ekran Görüntüleri

ss

Masaüstü Bilgileri

  • İşletim Sistemi: [Windows 11]
  • Tarayıcı [Chrome]
  • Sürüm [stable@latest]

Akıllı Telefon Bilgileri

  • Cihaz: [S21]
  • İşletim Sistemi: [A13]
  • Tarayıcı [Chrome]
  • Sürüm [stable@latest]

Ek Bağlam

It's easy to fix problem. If you assign me the issue I can coordinate the zIndexes and order them properly.

emirefek avatar Feb 08 '23 20:02 emirefek

Also #502 numbered issue has same problem. That's a quite global problem about MUI and zIndex'es.

emirefek avatar Feb 08 '23 20:02 emirefek

@eraygundogmus @usirin request for attention.

0xCakin avatar Feb 09 '23 04:02 0xCakin

Be my guest and fix it.

lyketia avatar Feb 09 '23 04:02 lyketia

Be my guest and fix it.

So I fixed it in my fork, waiting for approved status to create PR. 57903d7 @eraygundogmus @usirin @canerakin111

canerakin111 added improvement and removed bug labels 6 hours ago

Also this is a bug+refactoring. Not improvement, there is other issues about z-fighting and in feature can really cause many more troubles. The new feature developments always needs to override MUI components with bloated z-index values if we don't fix leaflet css like this.

emirefek avatar Feb 09 '23 10:02 emirefek

May I ask why it's closed?

emirefek avatar Feb 10 '23 07:02 emirefek