Skip to content

Commit 6592e1e

Browse files
authored
fix: cut off overflow-menu in table cells (#106)
* chore: template simplification we obviously only need the condition around the table cell head element * feat: providing a table overflow-menu usage example * chore: be more sensible on the included components regarding setting overflow
1 parent 3401787 commit 6592e1e

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

.github/workflows/default.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- 'main'
8-
- 'dbux-3'
7+
- "main"
8+
- "dbux-3"
99

1010
jobs:
1111
init:
@@ -26,7 +26,7 @@ jobs:
2626
build:
2727
uses: ./.github/workflows/01-build.yml
2828
needs: [init]
29-
29+
3030
checks-done:
3131
runs-on: ubuntu-latest
3232
steps:

source/_patterns/02-components/overflow-menu/overflow-menu.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details class="{{ patternName }}{{ styleModifier }}"{{#if linkEntries }} role="navigation"{{/if }}{{#if oppositePosition}} data-horizontal-position="opposite"{{/if }}>
1+
<details class="{{#if patternName }}{{ patternName }}{{else}}cmp-overflow-menu{{/if }}{{ styleModifier }}"{{#if linkEntries }} role="navigation"{{/if }}{{#if oppositePosition}} data-horizontal-position="opposite"{{/if }}>
22
<summary>{{ summary }}</summary>
33
{{#if linkEntries }}<ul role="group">{{else}}<menu type="toolbar">{{/if }}
44
{{#if linkEntries }}

source/_patterns/02-components/overflow-menu/overflow-menu.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"patternName": "cmp-overflow-menu",
32
"id": "menu01",
43
"entry01": "Modify",
54
"entry02": "Delete",

source/_patterns/02-components/overflow-menu/overflow-menu~opposite-position.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"patternName": "cmp-overflow-menu",
32
"id": "menu04",
43
"entry01": "Modify",
54
"entry02": "Delete",

source/_patterns/02-components/table/table.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
{{#if ../rowtitle }}<th scope="row">table header</th>{{/if }}
2222
<td{{#if @first }}{{#if ../icon}} data-icon="{{ ../icon }}"{{/if }}{{/if }}>{{{ text01 }}}</td>
2323
<td>{{{ text02 }}}</td>
24+
{{#if ../overflowMenu }}<td>{{> components-overflow-menu entry01="Edit" entry02="Delete" }}</td>{{/if }}
2425
</tr>
2526
{{/each }}
2627
</tbody>

source/_patterns/02-components/table/table.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@
4343
vertical-align: inherit;
4444

4545
&:hover {
46-
overflow: auto;
4746
resize: horizontal;
47+
48+
&:not(:has(.cmp-overflow-menu)) {
49+
overflow: auto;
50+
}
4851
}
4952
}
5053

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"overflowMenu": true
3+
}

0 commit comments

Comments
 (0)