Skip to content

Commit 95fbdc2

Browse files
committed
fix: finish some migration steps, update readme
1 parent c4f2909 commit 95fbdc2

File tree

49 files changed

+94
-177
lines changed

Some content is hidden

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

49 files changed

+94
-177
lines changed

MIGRATING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ This doc contains information that will help you migrate your code from an older
44

55
# SMUI 7 -> SMUI 8
66

7+
SMUI 8 has migrated to Svelte 5's new Runes mode. As such, it expects things like snippets and only some props are bindable.
8+
9+
Note to Devs: update `indexOf()` with `$state` arrays or items to `findIndex()` to avoid bugs.
10+
11+
Note to Devs: remove `x = x;` statements after `push()` and the like. They aren't needed anymore with Svelte 5's new $state rune.
12+
713
## Breaking Changes
814

915
- Svelte 5 is required! Svelte 4 will not work.

README.md

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -144,66 +144,6 @@ Click a component/package below to go to the documentation. (Note that this docu
144144

145145
- Labels and icons are named exports in the components that use them, or you can use the 'Label' and 'Icon' exports from '@smui/common'. (Except for chips labels and icons, textfield icons, and select icons, because they are special snowflakes.)
146146

147-
# Migration to Runes
148-
149-
Svelte 5 Runes mode is being migrated to slowly. This is the todo list of components as they are migrated.
150-
151-
- [x] Accordion
152-
- Action Buttons
153-
- [x] Button
154-
- [x] Floating Action Button
155-
- [x] Icon Button
156-
- App Bars
157-
- [x] Bottom App Bar
158-
- [x] Top App Bar
159-
- [x] Badge
160-
- [x] Banner
161-
- [x] Card
162-
- [x] Common
163-
- [x] Data Table
164-
- [x] Dialog
165-
- [x] Drawer
166-
- [x] Image List
167-
- Inputs and Controls
168-
- [x] Autocomplete
169-
- [x] Checkbox
170-
- [x] Chips
171-
- [x] Chip Input
172-
- [x] Floating Label
173-
- [x] Form Field
174-
- [x] Line Ripple
175-
- [x] Notched Outline
176-
- [x] Radio Button
177-
- [x] Segmented Button
178-
- [x] Select Menu
179-
- [x] Select Helper Text
180-
- [x] Select Icon
181-
- [x] Slider
182-
- [x] Switch
183-
- [x] Text Field
184-
- [x] Text Field Character Counter
185-
- [x] Text Field Helper Text
186-
- [x] Text Field Icon
187-
- [x] Layout Grid
188-
- [x] List
189-
- [x] Menu Surface
190-
- [x] Menu
191-
- [x] Paper
192-
- Progress Indicators
193-
- [x] Circular Progress
194-
- [x] Linear Progress
195-
- [x] Snackbar
196-
- [x] Kitchen
197-
- Tabs
198-
- [x] Tab
199-
- [x] Tab Bar
200-
- [x] Tooltip
201-
- [x] Touch Target
202-
203-
Note to Devs: update `indexOf()` on any `$state` array to `findIndex()`.
204-
205-
Note to Devs: remove `x = x;` statements after `push()` and the like. They aren't needed anymore with Svelte 5's new $state rune.
206-
207147
# License
208148

209149
Copyright 2019-2024 Hunter Perrin

packages/accordion/src/Header.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@
148148
if (internalStyles[name] != value) {
149149
if (value === '' || value == null) {
150150
delete internalStyles[name];
151-
internalStyles = internalStyles;
152151
} else {
153152
internalStyles[name] = value;
154153
}

packages/banner/src/Banner.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@
287287
if (internalStyles[name] != value) {
288288
if (value === '' || value == null) {
289289
delete internalStyles[name];
290-
internalStyles = internalStyles;
291290
} else {
292291
internalStyles[name] = value;
293292
}

packages/bottom-app-bar/src/AutoAdjust.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
if (internalStyles[name] != value) {
103103
if (value === '' || value == null) {
104104
delete internalStyles[name];
105-
internalStyles = internalStyles;
106105
} else {
107106
internalStyles[name] = value;
108107
}

packages/bottom-app-bar/src/BottomAppBar.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
if (internalStyles[name] != value) {
122122
if (value === '' || value == null) {
123123
delete internalStyles[name];
124-
internalStyles = internalStyles;
125124
} else {
126125
internalStyles[name] = value;
127126
}

packages/button/src/Button.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@
196196
if (internalStyles[name] != value) {
197197
if (value === '' || value == null) {
198198
delete internalStyles[name];
199-
internalStyles = internalStyles;
200199
} else {
201200
internalStyles[name] = value;
202201
}

packages/card/src/PrimaryAction.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
if (internalStyles[name] != value) {
101101
if (value === '' || value == null) {
102102
delete internalStyles[name];
103-
internalStyles = internalStyles;
104103
} else {
105104
internalStyles[name] = value;
106105
}

packages/checkbox/src/Checkbox.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,6 @@
390390
if (internalStyles[name] != value) {
391391
if (value === '' || value == null) {
392392
delete internalStyles[name];
393-
internalStyles = internalStyles;
394393
} else {
395394
internalStyles[name] = value;
396395
}

packages/chip-input/src/ChipInput.svelte

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@
340340
if (chips.findIndex((chip) => chip === event.detail) === -1) {
341341
chips.push(event.detail);
342342
}
343-
chips = chips;
344343
}
345344
}
346345
@@ -364,7 +363,6 @@
364363
if (chips.findIndex((chip) => chip === text) === -1) {
365364
chips.push(text);
366365
}
367-
chips = chips;
368366
text = '';
369367
}
370368
}
@@ -391,7 +389,6 @@
391389
if (chips.findIndex((chip) => chip === text) === -1) {
392390
chips.push(text);
393391
}
394-
chips = chips;
395392
text = '';
396393
floatingLabel?.float(false);
397394
}
@@ -409,7 +406,6 @@
409406
}
410407
411408
function handleChipRemoval(chip: any) {
412-
chips = chips;
413409
dispatch(getElement(), 'SMUIChipInputRemove', { chip });
414410
}
415411

0 commit comments

Comments
 (0)