From 8681fccd2e1c2a6483654058f35dea69749a9356 Mon Sep 17 00:00:00 2001 From: Dmitrii Rogozin Date: Mon, 7 Jul 2014 17:54:22 +0300 Subject: Fix regression in notification for chameleon caused by 13885.(#14172) Change-Id: I33d70c54b9118e85c9542e56b917b993516ae213 --- .../VAADIN/themes/chameleon/components/notification/notification.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss b/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss index fbf78d40c4..783e4bcc1f 100644 --- a/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss +++ b/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss @@ -8,6 +8,7 @@ div.#{$primaryStyleName} { -webkit-box-shadow: 0 2px 5px rgba(0,0,0,.7); -moz-box-shadow: 0 2px 5px rgba(0,0,0,.7); box-shadow: 0 2px 5px rgba(0,0,0,.7); + background:rgba(255,255,255,.90) url(../img/grad-light-top.png) repeat-x; } .#{$primaryStyleName} p { -- cgit v1.2.3 From 61905e0d49bb0f0be75626b2fa1bb9e53d1fe611 Mon Sep 17 00:00:00 2001 From: Felype Santiago Ferreira Date: Mon, 7 Jul 2014 17:25:48 +0300 Subject: Adds a scrollbar to table column drop down (#14156). Change-Id: I7ce7c61f842a09af1842a14fedec3412120944c7 --- WebContent/VAADIN/themes/base/common/common.scss | 6 ++ client/src/com/vaadin/client/ui/VContextMenu.java | 2 + .../components/table/TableTooManyColumns.java | 65 ++++++++++++++++++++++ .../components/table/TableTooManyColumnsTest.java | 46 +++++++++++++++ 4 files changed, 119 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/table/TableTooManyColumns.java create mode 100644 uitest/src/com/vaadin/tests/components/table/TableTooManyColumnsTest.java (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/base/common/common.scss b/WebContent/VAADIN/themes/base/common/common.scss index 0a493e0356..77248c0c96 100644 --- a/WebContent/VAADIN/themes/base/common/common.scss +++ b/WebContent/VAADIN/themes/base/common/common.scss @@ -146,6 +146,12 @@ body &.v-app .v-app-loading { border: 0; margin: 0; } + +.v-contextmenu .gwt-MenuBar { + overflow-y: auto; + overflow-x: hidden; +} + .v-contextmenu .gwt-MenuItem div { cursor: pointer; vertical-align: middle; diff --git a/client/src/com/vaadin/client/ui/VContextMenu.java b/client/src/com/vaadin/client/ui/VContextMenu.java index 038ee27dad..1b0181fb7d 100644 --- a/client/src/com/vaadin/client/ui/VContextMenu.java +++ b/client/src/com/vaadin/client/ui/VContextMenu.java @@ -161,6 +161,8 @@ public class VContextMenu extends VOverlay implements SubPartAware { top = top - offsetHeight; if (top < 0) { top = 0; + + setHeight(Window.getClientHeight() + "px"); } } setPopupPosition(left, top); diff --git a/uitest/src/com/vaadin/tests/components/table/TableTooManyColumns.java b/uitest/src/com/vaadin/tests/components/table/TableTooManyColumns.java new file mode 100644 index 0000000000..2d27636420 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/table/TableTooManyColumns.java @@ -0,0 +1,65 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.table; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Table; +import com.vaadin.ui.Table.ColumnGenerator; + +public class TableTooManyColumns extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + Table table = new Table(); + + table.setColumnCollapsingAllowed(true); + + for (int i = 0; i < 91; i++) { + table.addGeneratedColumn("COLUMN " + i, new ColumnGenerator() { + + @Override + public Object generateCell(Table source, Object itemId, + Object columnId) { + return columnId; + } + }); + } + + addComponent(table); + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() + */ + @Override + protected String getTestDescription() { + return "Table column drop down becomes too large to fit the screen."; + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() + */ + @Override + protected Integer getTicketNumber() { + return 14156; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/table/TableTooManyColumnsTest.java b/uitest/src/com/vaadin/tests/components/table/TableTooManyColumnsTest.java new file mode 100644 index 0000000000..2244365e00 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/table/TableTooManyColumnsTest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.table; + +import java.io.IOException; + +import org.junit.Test; +import org.openqa.selenium.WebElement; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.commands.TestBenchElementCommands; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class TableTooManyColumnsTest extends MultiBrowserTest { + + @Test + public void testDropdownTable() throws IOException { + openTestURL(); + + WebElement element = findElement(By + .className("v-table-column-selector")); + + element.click(); + + WebElement menu = findElement(By.className("gwt-MenuBar-vertical")); + + TestBenchElementCommands scrollable = testBenchElement(menu); + scrollable.scroll(3000); + + compareScreen(getScreenshotBaseName()); + } + +} -- cgit v1.2.3 From 81a5f4275d7df9f7572009548286a4d63fc6d2d8 Mon Sep 17 00:00:00 2001 From: Johannes Tuikkala Date: Wed, 9 Jul 2014 14:44:03 +0300 Subject: Fix Tabsheet scrollbutton by css position in Chameleon theme (#12154) Change-Id: Icd38631f8802fc86949fa29dd517f1aca0499c33 --- .../chameleon/components/tabsheet/tabsheet.scss | 1 + .../tabsheet/TabsheetNotEnoughHorizontalSpace.java | 75 ++++++++++++++++++++++ .../TabsheetNotEnoughHorizontalSpaceTest.java | 47 ++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java create mode 100644 uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.scss b/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.scss index dfa1c51c3a..d7f968fe43 100644 --- a/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.scss +++ b/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.scss @@ -89,6 +89,7 @@ .#{$primaryStyleName}-scrollerNext-disabled, .#{$primaryStyleName}-scrollerPrev-disabled:active, .#{$primaryStyleName}-scrollerNext-disabled:active { + padding-top: 12px; border: 1px solid #b3b3b3; border-width: 0; background: transparent url(../../img/tab-arrows.png) no-repeat 6px 50%; diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java new file mode 100644 index 0000000000..0105498f27 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java @@ -0,0 +1,75 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.tabsheet; + +import com.vaadin.annotations.Theme; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Panel; +import com.vaadin.ui.TabSheet; + +/** + * Test to see if tabsheet navigation buttons render correctly in Chameleon + * + * @author Vaadin Ltd + */ +@Theme("chameleon") +public class TabsheetNotEnoughHorizontalSpace extends AbstractTestUI { + + private TabSheet tabsheet = new TabSheet(); + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. + * VaadinRequest) + */ + @Override + protected void setup(VaadinRequest request) { + generateTabs(); + tabsheet.setSizeFull(); + addComponent(tabsheet); + + } + + private void generateTabs() { + tabsheet.removeAllComponents(); + for (int i = 0; i < 100; ++i) { + tabsheet.addTab(new Panel(), "Tab" + i); + } + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() + */ + @Override + protected String getTestDescription() { + return "Scroll-buttons should render correctly on all browsers"; + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() + */ + @Override + protected Integer getTicketNumber() { + return 12154; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java new file mode 100644 index 0000000000..990f545697 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.tabsheet; + +import java.io.IOException; + +import org.junit.Test; + +import com.vaadin.testbench.By; +import com.vaadin.tests.tb3.MultiBrowserTest; + +/** + * Tests that tabsheet's scroll button are rendered correctly in Chameleon + * theme. + * + * Ticket #12154 + * + * @since + * @author Vaadin Ltd + */ +public class TabsheetNotEnoughHorizontalSpaceTest extends MultiBrowserTest { + + @Test + public void testThatTabScrollButtonsAreRenderedCorrectly() + throws IOException { + openTestURL(); + + driver.findElement(By.className("v-tabsheet-scrollerPrev-disabled")); + driver.findElement(By.className("v-tabsheet-scrollerNext")); + + compareScreen(getScreenshotBaseName()); + } + +} -- cgit v1.2.3