mathuo / dockview

Zero dependency Docking Layout Manager. Supports Vanilla TypeScript, React and Vue.
https://dockview.dev
MIT License
730 stars 51 forks source link

Allow customization of the DEFAULT_OVERLAY_Z_INDEX value #720

Closed jdk2pq closed 1 month ago

jdk2pq commented 2 months ago

Is your feature request related to a problem? Please describe. I want to be able to customize the DEFAULT_OVERLAY_Z_INDEX value to set it higher than 999. This will help ensure that floating Dockview groups and panels will always remain on top of other elements in my app, where some elements necessitate using z-index: 1000, but I still want the floating Dockview groups/panels to have a higher z-index than those elements.

Describe the solution you'd like Add a function to set DEFAULT_OVERLAY_Z_INDEX or add it as a custom option in Dockview.

Describe alternatives you've considered Adding my own CSS to target floating Dockview panels/groups. This seems less ideal because the z-index won't increment with each new panel/group, like it does when setting the z-index with DEFAULT_OVERLAY_Z_INDEX, and it will just be static.

Also, another alternative is patching this library to update the value from 999 to 1000. That's what I'm currently doing, but maintaining patches for libraries seems potentially flakey to me, so I'd ideally like to have support to change this value in the library.

Additional context Add any other context or screenshots about the feature request here.

mathuo commented 1 month ago

@amirmamaghani I made a small change to rename the variable to --dv-overlay-z-index and use that variable in a couple more places. Everything is relative to this --dv-overlay-z-index value.

Ive deployed an experimental build from master with those changes if you did want to try it out, otherwise I'll aim to release an offical build in the coming days.

0.0.0-experimental-8015860-20241009

amirmamaghani commented 1 month ago

Thank you @mathuo , tested and works flawlessly. Thank you and looking forward to have it in official release.

mathuo commented 1 month ago

Published as 1.17.2

jdk2pq commented 1 month ago

Thank you for the quick work on this @amirmamaghani and @mathuo! Really appreciate it!