Giter VIP home page Giter VIP logo

Comments (11)

pat270 avatar pat270 commented on September 6, 2024

@edalgrin I might be misunderstanding the issue, but we have size="full-screen". It will make it expand to the edges of the viewport and the body will have a scrollbar if content overflows. It looks like the screenshot:

modal-full-screen

from clay.

edalgrin avatar edalgrin commented on September 6, 2024

Hey @pat270 , yes I think it's very similar to that but I'm not sure it's what we need. @ugeortiz?

from clay.

dsanz avatar dsanz commented on September 6, 2024

Ideally, we'd like to be able to have scrollable behavior in modals not rendered full-screen. DXP use case for this is the data set field mapping modal, where user needs to go through a potentially long list of fields and select which ones wants to map. As opposed to other scrollable modals such as permissions, this list is not wide enough to be rendered full width

from clay.

pat270 avatar pat270 commented on September 6, 2024

@dsanz @edalgrin we also have the class modal-height-full. You can set the width via size="md" and add the className to ClayModal. It would look something like:

<ClayModal
    className="modal-height-full"
    size="md"
>

One thing I noticed is we're not adding overflow: auto for modal-height-full. I can add it through this issue. It will look like this once I add the overflow.
modal-height-full

from clay.

edalgrin avatar edalgrin commented on September 6, 2024

Hey @pat270 yeah I tried also that one, and we talked about it, the problem with it is the height doesn't have to be always full, if the body content is short, the height must be short as well.

In any case, taking a look at the ClayModal component code, I noticed I can use either the size or the status to set a custom class in the modal-dialog, in our case modal-dialog-scrollable which is working but it feels like a "wrong" workaround.

image image image

from clay.

edalgrin avatar edalgrin commented on September 6, 2024

Hey guys, I'm not sure this fix is working because I don't have DXP updated and in the Clayui website is not working either, but from the code https://github.com/liferay/clay/blob/master/packages/clay-css/src/scss/variables/_modals.scss#L284 it looks like the modal will always take the viewport height available as its height, which is not the required behavior.

If the content inside the modal-body is a few lines, the modal should be shorter:
image
if the content is several lines, the modal-body will expand until it reaches the viewport height and then the scroll inside of it will start working
image

from clay.

matuzalemsteles avatar matuzalemsteles commented on September 6, 2024

Hey @edalgrin can you test this on https://next.clayui.com/docs/components/modal.html? We had a small change that didn't make it into the release that might affect this behavior. There is also a package update that includes these changes for DXP liferay-platform-experience/liferay-portal#195.

from clay.

edalgrin avatar edalgrin commented on September 6, 2024

Testing it
image

Adjusting it
image

The Modal is still always full height

from clay.

ethib137 avatar ethib137 commented on September 6, 2024

Hey @edalgrin I don't think you're supposed to change the size param to "height-full". If I set it to "md" and increase the text content I think I get the behavior you're wanting:

Screenshot 2023-08-02 at 2 26 04 PM

Screenshot 2023-08-02 at 2 26 15 PM

Does that look right?

from clay.

edalgrin avatar edalgrin commented on September 6, 2024

Actually, it does! I'm going to test it on our ticket, thanks!

from clay.

edalgrin avatar edalgrin commented on September 6, 2024

it's working on DXP, thanks!

from clay.

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.