GithubHelp home page GithubHelp logo

Comments (7)

voidgraphics avatar voidgraphics commented on August 15, 2024

Good catch, thanks. We'd accept a PR that fixes this if anyone is up to it.

from nova-flexible-content.

toonvandenbos avatar toonvandenbos commented on August 15, 2024

The problem comes from an overflow: hidden on nova's fields container. I see two possible fixes:

  • Move the dropdown DOM element outside the problematic div and position it absolutely ;
  • Show the dropdown below the button if we don't have enough space above.

The first one may be a little bit tricky with Vue.js I think, the second one doesn't solve anything if the Flexible field is the only field in the form.

Other ideas ?

from nova-flexible-content.

voidgraphics avatar voidgraphics commented on August 15, 2024

Maybe we should not make it absolutely positioned. Let it be in the flow. Might need a different design though? Not sure.

Or just find a way to disable the container's overflow: hidden without breaking anything.

from nova-flexible-content.

toonvandenbos avatar toonvandenbos commented on August 15, 2024

IMO we shouldn't touch Nova's base layout. There's probably a good reason (even if I couldn't find it...) for that particular overflow: hidden.

What are your arguments against the absolutely positioned dropdown?

from nova-flexible-content.

voidgraphics avatar voidgraphics commented on August 15, 2024

The argument is that we can not control the container's height, which means we can't prevent our popup from sticking out if it's too tall, if it's absolutely positioned.

I don't like this solution either but it might be the only way to make it work in every scenario.

from nova-flexible-content.

toonvandenbos avatar toonvandenbos commented on August 15, 2024

The dropdown has max-h-search overflow-y-auto, meaning its max height is 392px. After that, the dropdown has a scrollbar.

We could reduce it to max-height: 140px and position it absolutely, and it won't stick out. Here's an example:
image

But the Vue.js problem remains, I have no clue how to render the dropdown outside of the field component without messing with Vue's references. I did some quick searches but all the solutions I found are suggesting to modify the base template, which we can't do from a simple PHP package, unless I missed something important.

from nova-flexible-content.

toonvandenbos avatar toonvandenbos commented on August 15, 2024

This issue seems fixed in Nova 2.0.9 (or earlier, didn't notice the change before). The overflow: hidden; on the parent container has been removed.

from nova-flexible-content.

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.