noi-techpark / it.bz.opendatahub.databrowser

Explore and navigate through Open Data you need to build your next service.
https://databrowser.opendatahub.com
GNU Affero General Public License v3.0
8 stars 7 forks source link

Z-index centralization #401

Open henri-egger opened 1 year ago

henri-egger commented 1 year ago

@gappc as you mentioned a better solution for z-index organization would be nice.

In my opinion it would be best to declare an enum (or a class) which holds the values so that they are named. That way when using the values it is much clearer what you are trying to achieve. Also when changing, adding or removing values you only have to do it once.

I made a branch implementing these changes. I located the enum under databrowser/src/components/utils/z-index.ts, I think it is apropriate to put it here but please correct me if not. I also opted for an enum instead of computed values which would be more expressive but I don't think it's necessary to overcomplicate things. The names for the values are taken from the corrisponding bootstrap css variables, as there doesn't seem to be a general standard for naming z-index values. I don't think however that they are very fitting for this project so please tell me what you are thinking regarding this.

To apply the changes it will just be necessary to import the enum and add :class="zIndex.<layer>" to the affected elements.

sseppi commented 2 months ago

@gappc is this issue still valid in your point of view? I can't find the "Z-index branch" mentioned by Henry.