-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(tooltip)!: sets default max width (VIV-1799) (#1798) feat(data-grid-cell)!: change default value of block-size and white-space (VIV-1797) (#1793) feat(audio-player)!: remove css-variable for min-inline-size and max-inline-size on host (VIV-1800) (#1803) feat(vue-wrappers)!: forward form values by DOM prop name (VIV-1798) (#1789) feat(vue-wrappers)!: forward form values by DOM prop name (VIV-1798) chore(docs): v4 migration page (VIV-1801) (#1796) fix(tabs)!: change gutters default to small (VIV-1796) (#1804) chore(docs)!: refine docs for v-4 (VIV-000) (#1813) feat(toggletip)!: add max-inline-size of 30ch & css-variable for custom size (VIV-1846) (#1814)
- Loading branch information
1 parent
41a4407
commit 06ee68a
Showing
66 changed files
with
501 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
# Vivid v4.0.0 Migration Guide | ||
|
||
Release date: 1st July 2024. | ||
This document provides descriptions of the breaking changes in this release and instructions on how to prepare for them. | ||
|
||
--- | ||
|
||
## Audio-player | ||
|
||
### The change | ||
|
||
The audio-player will now stretch to fill it's container's inline-size by default. Previously it was restricted to 350px. | ||
|
||
| | V-3 | V-4 | | ||
| --------------------------------------------- | -------- | --------- | | ||
| audio-player `max-inline-size` | `350px` | `100%` | | ||
| css-variable `--audio-player-min-inline-size` | `in-use` | `removed` | | ||
|
||
### How to get ready? | ||
|
||
set `max-inline-size` or `inline-size` directly on audio-player or on its parent. | ||
|
||
--- | ||
|
||
## Data-grid | ||
|
||
Data-grid-cells outside of the table header will no longer have a fixed block-size but will adjust to its content and its text will not be trimmed by default as before. | ||
|
||
### The change | ||
|
||
| | V-3 | V-4 | | ||
| ---------------------------- | -------- | -------- | | ||
| data-grid-cell `block-size` | `48px` | `100%` | | ||
| data-grid-cell `white-space` | `nowrap` | `normal` | | ||
|
||
### How to get ready? | ||
|
||
#### Keeping the tables the same as before: | ||
|
||
set the css-variable for the Data-grid: | ||
|
||
```js | ||
--data-grid-cell-block-size: 48px; | ||
--data-grid-cell-white-space: nowrap; | ||
``` | ||
|
||
#### Already using the css-variable | ||
|
||
If you set the css-variable - you can either remove them from your code or leave them as they are. | ||
|
||
--- | ||
|
||
## Tabs | ||
|
||
### The change | ||
|
||
Tab panel will now have a 16px padding by default, previously it had no padding at all. | ||
|
||
| | V-3 | V-4 | | ||
| ---------------------------------------------- | ------ | ------------------------ | | ||
| Tab panel [gutters](/components/tabs/#gutters) | `none` | `small (= 16px padding)` | | ||
|
||
### How to get ready? | ||
|
||
If you do not wish to have gutters, set `gutters="none"` on tabs: | ||
|
||
```js | ||
<vwc-tabs gutters="none">...</vwc-tabs> | ||
``` | ||
|
||
--- | ||
|
||
## Tooltip | ||
|
||
### The change | ||
|
||
The tooltip will now have a default max-inline-size of 30 characters. Previously it didn't have max-inline-size. | ||
|
||
| | V-3 default value | V-4 default value | | ||
| ------------------------- | ----------------- | ----------------- | | ||
| tooltip `max-inline-size` | `none` | `30ch` | | ||
|
||
### How to get ready? | ||
|
||
If you do not wish to have a set `max-inline-size` use the css-variable `--tooltip-max-inline-size`. | ||
|
||
```js | ||
vwc-tooltip { | ||
--tooltip-max-inline-size: none; | ||
} | ||
``` | ||
|
||
--- | ||
|
||
## Toggletip | ||
|
||
### The change | ||
|
||
The toggletip will now have a default max-inline-size of 30 characters. Previously it didn't have max-inline-size. | ||
|
||
| | V-3 default value | V-4 default value | | ||
| --------------------------- | ----------------- | ----------------- | | ||
| toggletip `max-inline-size` | `none` | `30ch` | | ||
|
||
### How to get ready? | ||
|
||
If you do not wish to have a set `max-inline-size` use the css-variable `--toggletip-max-inline-size`. | ||
|
||
```js | ||
vwc-toggletip { | ||
--toggletip-max-inline-size: none; | ||
} | ||
``` | ||
|
||
--- | ||
|
||
## Vue Wrappers | ||
|
||
Form elements like `VTextField` will now forward value props consistently as DOM properties. | ||
|
||
This change will affect the props `value` and `currentValue` on: | ||
|
||
- VTextField | ||
- VTextArea | ||
- VNumberField | ||
- VSelect | ||
- VCombobox | ||
- VSlider | ||
- VRangeSlider | ||
- VDatePicker | ||
- VDateRangePicker | ||
- VTimePicker | ||
- VFilePicker | ||
|
||
`checked` and `currentChecked` props on: | ||
|
||
- VCheckbox | ||
- VSwitch | ||
- VRadio | ||
|
||
`currentStart` / `currentEnd` on: | ||
|
||
- VDateRangePicker | ||
- VRangeSlider | ||
|
||
Usage of these props is discouraged. To set the current value, you should use the `v-model` instead: | ||
|
||
```html | ||
<VTextField v-model="value" /> | ||
<!-- Which is syntactic sugar for: --> | ||
<VTextField | ||
:model-value="value" | ||
@update:modelValue="$event => (value = $event)" | ||
/> | ||
``` | ||
|
||
Code using `v-model` or `modelValue` is not affected. | ||
|
||
### The change | ||
|
||
| | V-3 | V-4 | | ||
| ----------------------------------------------------------------- | ---------------------------------- | ---------------------- | | ||
| `currentValue` / `currentChecked` / `currentStart` / `currentEnd` | Controls current value | Removed | | ||
| `value`/`checked` | Inconsistent between Vue 2 / Vue 3 | Controls current value | | ||
| `initialValue` / `defaultChecked` | Doesn't exist | Controls initial value | | ||
|
||
### How to get ready? | ||
|
||
- First, make sure you're on the latest version of Vivid 3.x. | ||
Optionally, install the latest version of our new [ESLint plugin](/eslint-plugin), which can help with the migration. | ||
|
||
- Replace all usage of `currentValue` / `currentChecked` with `modelValue` and all usages `currentStart` / `currentEnd` with `start` / `end`. | ||
The `no-current-value-attribute` rule of our ESLint plugin can perform this migration automatically. | ||
|
||
- Replace all usages of `value` / `checked`: | ||
|
||
- **Vue 3:** | ||
`value`/`checked` sets the current value and can be replaced with `modelValue`. | ||
|
||
- **Vue 2:** | ||
`value` / `checked` sets the initial value and can be replaced with `initalValue` / `defaultChecked`. | ||
Keep in mind that the original code may be wrong and intended to set the current value instead. | ||
|
||
The `no-value-attribute` rule of our ESLint plugin will warn about any usages of `value` / `checked`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1.51 KB
(110%)
...o-player/ui.test.ts-snapshots/snapshots-audio-player-Desktop-Chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.24 KB
(110%)
...io-player/ui.test.ts-snapshots/snapshots-audio-player-Desktop-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.34 KB
(110%)
...dio-player/ui.test.ts-snapshots/snapshots-audio-player-Desktop-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.