JarekToro / responsive-layout

The layout to beat them all!
https://vaadin.com/directory#!addon/responsive-layout
57 stars 24 forks source link

Scrollbar showing in Panel #16

Closed bassmartin closed 7 years ago

bassmartin commented 8 years ago

There is a scrollbar showing in the Panel with the following code:

ResponsiveLayout layout = new ResponsiveLayout(ResponsiveLayout.ContainerType.FLUID)
        setCompositionRoot(layout) // 'this', is a Vaadin Panel
        layout.with {
            addRow().withMargin(ResponsiveRow.MarginSize.SMALL, true).withVerticalSpacing(ResponsiveRow.SpacingSize.SMALL, true).withHorizontalSpacing(true).with {
                addColumn().withDisplayRules(12, 12,12,12).setComponent(new Label("Test"))
            }
        }
screen shot 2016-11-01 at 09 18 20

I did some testing, and it seems to be caused by the usage of both withMargin(ResponsiveRow.MarginSize.SMALL, true).withVerticalSpacing(ResponsiveRow.SpacingSize.SMALL, true)

Thanks.

JarekToro commented 8 years ago

Ran into a similar issue while working on issue #14. It is fixed and will be committed soon.

bassmartin commented 7 years ago

I still have the issue @JarekToro If I set to SpacingSize.NORMAL, the scrollbar does not show.

Thanks.

JarekToro commented 7 years ago

Cant seem to recreate the issue? What browser are you using?

This is code I'm recreating with

Panel panel = new Panel("Panel");
setContent(panel);
ResponsiveLayout layout = new ResponsiveLayout(ResponsiveLayout.ContainerType.FLUID);
panel.setContent(layout);
layout.addRow()
       .withMargin(ResponsiveRow.MarginSize.SMALL)
       .withVerticalSpacing(ResponsiveRow.SpacingSize.SMALL, true)
       .withHorizontalSpacing(true)
       .addColumn().withDisplayRules(12, 12, 12, 12).setComponent(new Label("Test"));

The panel is the root view

bassmartin commented 7 years ago

Safari. I'll try with Chrome tomorrow.

-- Sébastien Martin

Le 29 nov. 2016 à 21:33, Jarek Toro notifications@github.com a écrit :

Cant seem to recreate the issue? What browser are you using?

This is code I'm recreating with

Panel panel = new Panel("Panel"); setContent(panel); ResponsiveLayout layout = new ResponsiveLayout(ResponsiveLayout.ContainerType.FLUID);

    panel.setContent(layout);

    layout.addRow().withMargin(ResponsiveRow.MarginSize.SMALL)
            .withVerticalSpacing(ResponsiveRow.SpacingSize.SMALL, true)
            .withHorizontalSpacing(true)
            .addColumn().withDisplayRules(12, 12, 12, 12).setComponent(new Label("Test"));

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

bassmartin commented 7 years ago

I just retested on both browser and no scrollbar is showing. I guess I was using a cached CSS in my browser when I reopened the issue.

Sorry about that.

I will close the issue :p

Left is safari, right is chrome:

screen shot 2016-11-30 at 10 31 55
JarekToro commented 7 years ago

No problem. Glad it's fixed