Skip to content

Commit 8d93abf

Browse files
authored
Merge pull request #340 from otto-de/beta
Beta
2 parents acf38bd + ce4bab2 commit 8d93abf

File tree

90 files changed

+2274
-205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2274
-205
lines changed

ADRs/007_Table_component.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 007. Table component
22

3-
Last update: 19.09.2022
3+
Last update: 29.11.2023
44

55
## Background
66

@@ -36,6 +36,7 @@ Advantages
3636
- Passing other components as children is straight forward using slots
3737

3838
Challenges
39+
- We cannot make use of native table features such as col- or rowspans
3940
- We could not use html semantic table elements as the host web component breaks the
4041
semantic structure:
4142

@@ -46,18 +47,31 @@ Challenges
4647
<header>
4748
...
4849
```
50+
#### 3. Using components that semantically resemble the html table structure but use flexbox
51+
52+
Advantages
53+
- Most table features to date can be displayed using flexbox
54+
- Gives the freedom to add colspans for headers and cells
55+
56+
Challenges
57+
- Having a table that expands columns to fit the largest content of all cells in that column is not possible
58+
- Only fixed width or equal width can be achieved
59+
- Text truncation and overflow are harder to handle
4960

5061
### Decision
5162

5263
We decided for option two as the ability to pass children components is a must-have. Hopefully if that can be solved
5364
in the future we may be able to have a table-data component that encapsulates better the table.
5465

66+
The flexbox model is only adapted for tables that require the colspan feature as not all existing features (text truncation and expansion on hover, expanding column sizes) can be realized while applying flexbox. This also saves performance as dynamic
67+
calculation of cell width via JavaScript could be a performance issue in larger tables.
68+
5569
### Note
5670
We implemented the table using shadow dom for consistency and to support slots, but most of the classes are
5771
declared in the host elements meaning they live still in the light-dom and can be overwritten.
5872

5973
This was necessary because of how the elements are structured, where all children are passed in slots but are still
60-
part of the light-dom. For any `dysplay` styles to work it needs to be declared in the light-dom as well.
74+
part of the light-dom. For any `display` styles to work it needs to be declared in the light-dom as well.
6175

6276
### Links
6377
Examples of table-data implementations (option1)

CHANGELOG.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
## [1.8.2](https://github.com/otto-de/b2b-design-system/compare/v1.8.1...v1.8.2) (2023-12-01)
1+
# [1.9.0-beta.2](https://github.com/otto-de/b2b-design-system/compare/v1.9.0-beta.1...v1.9.0-beta.2) (2023-11-28)
2+
3+
### Bug Fixes
24

5+
* **Icon:** added inheritable color for warning hint icon ([dfebdfc](https://github.com/otto-de/b2b-design-system/commit/dfebdfcbecc4f453b2cd4a83f93b9cfacfb81139))
6+
7+
# [1.9.0-beta.1](https://github.com/otto-de/b2b-design-system/compare/v1.8.1...v1.9.0-beta.1) (2023-11-27)
8+
9+
10+
### Features
11+
12+
* **Icon:** added warning-hint icon ([a1823b5](https://github.com/otto-de/b2b-design-system/commit/a1823b5a7f7fa7399bb6f3f46f5e17aaf8292431))
13+
14+
## [1.8.2](https://github.com/otto-de/b2b-design-system/compare/v1.8.1...v1.8.2) (2023-12-01)
315

416
### Bug Fixes
517

618
* **Anchor:** [B2BDS-237] added forced stacking context to avoid host element hiding anchor ([35d235c](https://github.com/otto-de/b2b-design-system/commit/35d235cce239afbac761db403669a77dcea289ba))
719

20+
821
## [1.8.1](https://github.com/otto-de/b2b-design-system/compare/v1.8.0...v1.8.1) (2023-11-22)
922

1023

package-lock.json

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core-components/.storybook/manager.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ document.head.appendChild(link);
99

1010
addons.setConfig({
1111
theme: customTheme,
12+
enableShortcuts: false,
1213
});

packages/core-components/.storybook/storybook.scss

+9
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@
1111
margin-bottom: 8px !important;
1212
}
1313
}
14+
15+
.docs-button-obc-overwrite {
16+
appearance: none;
17+
-webkit-appearance: none !important;
18+
button, a, [type=button] {
19+
appearance: none;
20+
-webkit-appearance: none !important;
21+
}
22+
}

packages/core-components/.storybook/test-runner.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ const ignoredStories = [
99
'components-interaction-tooltip--story-010-hover',
1010
'components-interaction-tooltip--story-020-focus',
1111
'components-interaction-tooltip--story-030-custom',
12-
'designtokens-color--story-010-color-tokens',
13-
'designtokens-font--story-010-font-tokens',
14-
'designtokens-size--story-010-size-tokens',
12+
'design-tokens-color--story-010-color-tokens',
13+
'design-tokens-font--story-010-font-tokens',
14+
'design-tokens-size--story-010-size-tokens',
1515
];
1616

1717
module.exports = {
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

packages/core-components/dist/loader/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
"es2015": "./index.es2017.js",
99
"es2017": "./index.es2017.js",
1010
"unpkg": "./cdn.js"
11-
}
11+
}

packages/core-components/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@otto-de/b2b-core-components",
3-
"version": "1.8.2",
3+
"version": "1.9.0-beta.2",
44
"description": "Core components defined with Stencil",
55
"author": "Otto GmbH",
66
"license": "Apache-2.0",
@@ -39,7 +39,7 @@
3939
"build:storybook": "npm run copy-md-files && storybook build -o docs-build/design-system"
4040
},
4141
"dependencies": {
42-
"@otto-de/b2b-tokens": "1.8.2",
42+
"@otto-de/b2b-tokens": "1.9.0-beta.2",
4343
"@stencil-community/eslint-plugin": "^0.5.0",
4444
"@stencil/core": "^4.7.0"
4545
},

0 commit comments

Comments
 (0)