Coder Social home page Coder Social logo

Comments (6)

Shubhdeep12 avatar Shubhdeep12 commented on June 14, 2024 1

Hi @brhallin @Hotell
Can I try resolving this bug?

It appears there are two issues:

  1. divRef.current is passed as null because after the initial render, when divRef gets its value, the component does not re-render.
  2. The infoLabel is not functioning correctly when passing mountNode in the infoButton prop. The reasons are:
    a. The infoLabel uses infoButton, which in turn uses PopOver.
    b. The PopOver surface uses Portal when the surface is not inline.
    c. In useInfoButton.tsx, the inline prop has a default value of true, which is causing the issue.
    d. We should either pass inline as false or have inline automatically set to false when mountNode is passed.

Thanks!

from fluentui.

brhallin avatar brhallin commented on June 14, 2024 1

Thanks for investigating the issue and identifying the problem!

We should either pass inline as false or have inline automatically set to false when mountNode is passed.

That's entirely up to the Fluent team, so I won't comment on the best decision. My team, however, now has a way forward -- we'll just add inline: false along with the mountNode prop, and we'll be unblocked.

🍻

from fluentui.

Shubhdeep12 avatar Shubhdeep12 commented on June 14, 2024

Sure but we are halfway.

on passing inline: false along with mountNode in infoButton, do create the infoLabel popover inside the mountNode element, but the positioning of the popover is still at infoButton.

Reference: popover is created and gets added in mountNode div element but still shown above the infoButton
image

from fluentui.

brhallin avatar brhallin commented on June 14, 2024

FWIW, in our use case, with the Canvas environment, the mountNode property we're providing points to a valid DOM element and with the addition of inline: false, it's now respecting that element.

image

from fluentui.

brhallin avatar brhallin commented on June 14, 2024

It's possible that the minimal demo I provided is faulty.

from fluentui.

Shubhdeep12 avatar Shubhdeep12 commented on June 14, 2024

great!

from fluentui.

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.