Skip to content

Commit

Permalink
fix: cut off overflow-menu in table cells (#106)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mfranzke authored Oct 20, 2022
1 parent 3401787 commit 6592e1e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
pull_request:
push:
branches:
- 'main'
- 'dbux-3'
- "main"
- "dbux-3"

jobs:
init:
Expand All @@ -26,7 +26,7 @@ jobs:
build:
uses: ./.github/workflows/01-build.yml
needs: [init]

checks-done:
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details class="{{ patternName }}{{ styleModifier }}"{{#if linkEntries }} role="navigation"{{/if }}{{#if oppositePosition}} data-horizontal-position="opposite"{{/if }}>
<details class="{{#if patternName }}{{ patternName }}{{else}}cmp-overflow-menu{{/if }}{{ styleModifier }}"{{#if linkEntries }} role="navigation"{{/if }}{{#if oppositePosition}} data-horizontal-position="opposite"{{/if }}>
<summary>{{ summary }}</summary>
{{#if linkEntries }}<ul role="group">{{else}}<menu type="toolbar">{{/if }}
{{#if linkEntries }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"patternName": "cmp-overflow-menu",
"id": "menu01",
"entry01": "Modify",
"entry02": "Delete",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"patternName": "cmp-overflow-menu",
"id": "menu04",
"entry01": "Modify",
"entry02": "Delete",
Expand Down
1 change: 1 addition & 0 deletions source/_patterns/02-components/table/table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
{{#if ../rowtitle }}<th scope="row">table header</th>{{/if }}
<td{{#if @first }}{{#if ../icon}} data-icon="{{ ../icon }}"{{/if }}{{/if }}>{{{ text01 }}}</td>
<td>{{{ text02 }}}</td>
{{#if ../overflowMenu }}<td>{{> components-overflow-menu entry01="Edit" entry02="Delete" }}</td>{{/if }}
</tr>
{{/each }}
</tbody>
Expand Down
5 changes: 4 additions & 1 deletion source/_patterns/02-components/table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@
vertical-align: inherit;

&:hover {
overflow: auto;
resize: horizontal;

&:not(:has(.cmp-overflow-menu)) {
overflow: auto;
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions source/_patterns/02-components/table/table~overflow-menu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"overflowMenu": true
}

0 comments on commit 6592e1e

Please sign in to comment.