Code Monkey home page Code Monkey logo

Comments (6)

martinkrulltott avatar martinkrulltott commented on June 11, 2024 2

Confirmed that the issue in DV was because it was using multiple versions of ui-core. This has now been resolved to 4.16.0, which fixes the issue. z-index correctly sets to 3001. 🎉

from ui.

HendrikThePendric avatar HendrikThePendric commented on June 11, 2024

Some directions we could take this:

  • Just file this as a known limitation and make sure @dhis2/ui-core / @dhis2/ui is always a peer-dependency, so every app just ends up with a single instance of it...
  • Don't use context, but implement a layer system that purely relies on DOM traversal.
  • Introduce some sort of wrapper component that creates the base Layer context so the context is not created in the Layer module
  • Forget about the whole layering system and expose a zIndex prop on every component that "pops up", so that the app can control this...

These are just some pretty random ideas... Nothing is tested and everything is fully hypothetical...

from ui.

HendrikThePendric avatar HendrikThePendric commented on June 11, 2024

FYI: I see we also have a TableContext file. It seems less likely that this is going to cause similar problems, but it does also create the context in the module too.

from ui.

HendrikThePendric avatar HendrikThePendric commented on June 11, 2024

See this PR for an illustration of the problem #16, specifically the http://localhost:5000/?path=/story/component-widget-layer--it-falls-apart story...

from ui.

varl avatar varl commented on June 11, 2024

This is a problem with anything that uses hooks really, and the consumers need to make sure that UI resolves to a single instance inside of node_modules. The best option is probably to use the resolutions property in package.json as we do for React.

from ui.

HendrikThePendric avatar HendrikThePendric commented on June 11, 2024

Update: @amcgee and @martinkrulltott are looking into a way of solving this in the app. If they are successful, we should provide instructions on how to prevent this problem in the docs.

from ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.