-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core/dropdown): adjusted height for dropdown (siemens#1671) #1762
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
} | ||
|
||
:host(.overflow) { | ||
max-height: 50vh; | ||
max-height: calc(50vh - 50px); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
overflow-y: auto; | ||
} | ||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just thought myself is a visual-regression test here really necessary? Should be also possible via a simple component test which makes snapshot creation not necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Additional/edge cases (e.g. dropdown opened via trigger element, dropdown opening above trigger) are missing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2024 Siemens AG | ||
|
||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body style="width: 100vw; height: 100vh;"> | ||
|
||
<div style="display: block; position: relative; width: 100rem; margin-top: 53vh; height: 90%"> | ||
<ix-dropdown> | ||
<ix-dropdown-item label="Test 1"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 2"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 3"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 4"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 5"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 6"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 7"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 8"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 9"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 10"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 11"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 12"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 13"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 14"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 15"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 16"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 17"></ix-dropdown-item> | ||
<ix-dropdown-item label="Test 18"></ix-dropdown-item> | ||
<ix-dropdown-item | ||
id="last-element" | ||
label="Should be visible!" | ||
></ix-dropdown-item> | ||
</ix-dropdown> | ||
<script type="module"> | ||
(async () => { | ||
await window.customElements.whenDefined('ix-dropdown'); | ||
await window.customElements.whenDefined('ix-dropdown-item'); | ||
|
||
const dropdown = document.querySelector('ix-dropdown'); | ||
dropdown.show = true; | ||
})(); | ||
</script> | ||
</div> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2025 Siemens AG | ||
|
||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
|
||
<body style="width: 100vw; height: 100vh; padding-top: 52vh;"> | ||
<ix-select value="2"> | ||
<ix-select-item label="Item 1" value="1"></ix-select-item> | ||
<ix-select-item label="Item 2" value="2"></ix-select-item> | ||
<ix-select-item label="Item 3" value="3"></ix-select-item> | ||
<ix-select-item label="Test 4" value="4"></ix-select-item> | ||
<ix-select-item label="Test 5" value="5"></ix-select-item> | ||
<ix-select-item label="Test 6" value="6"></ix-select-item> | ||
<ix-select-item label="Test 7" value="7"></ix-select-item> | ||
<ix-select-item label="Test 8" value="8"></ix-select-item> | ||
<ix-select-item label="Test 9" value="9"></ix-select-item> | ||
<ix-select-item label="Test 10" value="10"></ix-select-item> | ||
<ix-select-item label="Test 11" value="11"></ix-select-item> | ||
<ix-select-item label="Test 12" value="12"></ix-select-item> | ||
<ix-select-item label="Test 13" value="13"></ix-select-item> | ||
<ix-select-item label="Test 14" value="14"></ix-select-item> | ||
<ix-select-item label="Test 15" value="15"></ix-select-item> | ||
<ix-select-item label="Test 16" value="16"></ix-select-item> | ||
<ix-select-item label="Test 17" value="17"></ix-select-item> | ||
<ix-select-item label="Test 18" value="18"></ix-select-item> | ||
<ix-select-item | ||
id="last-element" | ||
label="Should be visible!" | ||
></ix-select-item> | ||
</ix-select> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use here a variable which makes it looks less like a magic number
50px