Code Monkey home page Code Monkey logo

Comments (3)

LFDanLu avatar LFDanLu commented on September 13, 2024

Its hard to tell what exactly is broken here since I can't easily tell what changes exist between the sandbox and the RSP ComboBox component. It seems like a 1:1 copy but there are styles that are missing because the Spectrum specific class names don't have their associated styles and there are other behavioral differences from the RSP ComboBox like the popover closing even with "Emulate a focused page" turned on. Can you try unifying the packages so they only use the monopakage import where possible so that there aren't any duplicate package issues? Might be easier to debug if you use the Item/etc implementations straight from @adobe/react-spectrum and then gradually change them to your custom implementation to see where the break happens.

from react-spectrum.

RajaTheKing826 avatar RajaTheKing826 commented on September 13, 2024

@LFDanLu When i read the spectrum code the height of the popover is calculating in hooks instead of with css classnames so i think class names aren't the issue. Can you define what is unifying packages because we didn't install any duplicate package versions in the above codesandbox.

So can you please check the code once and tell what we are missing.

from react-spectrum.

LFDanLu avatar LFDanLu commented on September 13, 2024

I don't think the class names would be the issue either but as I mentioned there are other behavior differences other that the additional whitespace that you are seeing that make me think that there are other changes to the copied code that I can tell from a glance or something else in the setup (duplicate packages/etc) that are causing these issues. Duplicate packages can arise due to each installed package pulling its own version of various dependencies that aren't deduplicated by the package manager automatically. I would recommend you start with first using the ComboBox as is from React Spectrum's @adobe/react-spectrum package, then slowly replace the implementation bit by bit and see when/where it breaks.

That being said, if you are trying to create your own combobox, I'd highly recommend using the React Aria Components version of it rather than copying the React Spectrum implementation. The React Spectrum implementation comes with many Spectrum Design specific behaviors and may be difficult to untangle and customize. Virtualization support is being worked on for React Aria Components as a whole as well so soon there will be parity between the two.

from react-spectrum.

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.