Skip to content

Commit 24ced41

Browse files
CopilotShreckYe
andauthored
Update README.md with missing modifiers, components, and other APIs (#137)
* Update README.md with missing modifiers, components, and other APIs - Modifiers: add rotate, clickable, wrapContentWidth/Height/Size, intrinsic size modifiers, scope modifiers; mark onClick and scroll modifiers as deprecated - Ext modifiers: add fillMaxWidthStretch/HeightStretch/SizeStretch, roundedCornerOuterBorder, hidden/reserveSpace/invisible, matchPositionRelativeParentJsDom - Foundation: add ext scroll layouts and containers - Material 3: add Scaffold, Badge (moved from ext), TopAppBar (moved from ext), Snackbar composable, scrollable tab rows; move Dialog to ext; add missing dropdown menu variants (DropdownMenuBox, outlined variants) - Other APIs: add Color, BorderStroke, IntrinsicSize, ScrollState, AnnotatedString/SpanStyle, text style types, font types Agent-Logs-Url: https://github.com/huanshankeji/compose-multiplatform-html-unified/sessions/e5bb5ef7-314b-4018-b0c0-7dfc28932027 Co-authored-by: ShreckYe <27768951+ShreckYe@users.noreply.github.com> * Address review: add Badge deprecation reason and specific scroll replacements Agent-Logs-Url: https://github.com/huanshankeji/compose-multiplatform-html-unified/sessions/e5bb5ef7-314b-4018-b0c0-7dfc28932027 Co-authored-by: ShreckYe <27768951+ShreckYe@users.noreply.github.com> * Update from review --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ShreckYe <27768951+ShreckYe@users.noreply.github.com> Co-authored-by: Yongshun Ye <shreckye@gmail.com>
1 parent 4bffe14 commit 24ced41

1 file changed

Lines changed: 36 additions & 9 deletions

File tree

README.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ com.huanshankeji:compose-multiplatform-html-unified-common:$version
4646
##### `ext` components
4747

4848
- `TaglessBasicText`
49+
- `VerticalScrollContainer`, `HorizontalScrollContainer`
4950

5051
##### Layouts
5152

@@ -57,6 +58,8 @@ com.huanshankeji:compose-multiplatform-html-unified-common:$version
5758
###### `ext` layouts
5859

5960
- `BoxWithConstraints`
61+
- `VerticalScrollBox`, `HorizontalScrollBox`
62+
- `VerticalScrollColumn`, `HorizontalScrollRow`
6063

6164
##### Lazy
6265

@@ -105,10 +108,10 @@ Maven coordinate:
105108
com.huanshankeji:compose-multiplatform-html-unified-material3:$version
106109
```
107110

111+
- Badge: `Badge` (deprecated, not displayed correctly on JS DOM)
108112
- Button: `Button` (`FilledButton`), `ElevatedButton`, `FilledTonalButton`, `OutlinedButton`, `TextButton`
109113
- Card: `Card` (`FilledCard`), `ElevatedCard`, `OutlinedCard`
110114
- Checkbox: `Checkbox`
111-
- Dialog: `AlertDialog`, `SimpleDialog`
112115
- Divider: `HorizontalDivider`
113116
- Floating action button: `FloatingActionButton`, `SmallFloatingActionButton`, `LargeFloatingActionButton`,
114117
`ExtendedFloatingActionButton`
@@ -118,22 +121,27 @@ com.huanshankeji:compose-multiplatform-html-unified-material3:$version
118121
- Navigation drawer: `ModalNavigationDrawer` (deprecated, may be replaced with navigation rails in the future)
119122
- Progress indicator: `LinearProgressIndicator`, `CircularProgressIndicator`
120123
- Radio button: `RadioButton`
124+
- Scaffold: `Scaffold`
121125
- Segmented button: `SingleChoiceSegmentedButtonRow`, `MultiChoiceSegmentedButtonRow`
122126
- Slider: `Slider`, `RangeSlider`
123-
- Snackbar: `SnackbarHost`, `SnackbarHostState`
127+
- Snackbar: `Snackbar`, `SnackbarHost`, `SnackbarHostState`
124128
- Switch: `Switch`
125-
- Tab: `PrimaryTabRow`, `SecondaryTabRow` (tabs are in `ext`)
129+
- Tab: `PrimaryTabRow`, `SecondaryTabRow`, `PrimaryScrollableTabRow`, `SecondaryScrollableTabRow` (tabs are in `ext`)
126130
- Text: `Text`
131+
- Top app bar: `TopAppBar`, `CenterAlignedTopAppBar`, `MediumTopAppBar`, `LargeTopAppBar`
127132

128133
##### `ext` components
129134

130-
- Badge: `Badge` (deprecated)
131135
- Button: `Button` (`FilledButton`), `ElevatedButton`, `FilledTonalButton`, `OutlinedButton`, `TextButton`
132136
- Card: `Card` (`FilledCard`), `ElevatedCard`, `OutlinedCard`
133137
- Chip: `AssistChip`, `ElevatedAssistChip`, `FilterChip`, `ElevatedFilterChip`, `InputChip`, `SuggestionChip`,
134138
`ElevatedSuggestionChip`
135-
- Dropdown menu: `DropdownMenu`, `DropdownMenuItem`
136-
- `ExposedDropdownMenuBox`, `ExposedDropdownMenuBoxScope.ExposedDropdownMenuBoxTextField`, `ExposedDropdownMenuBoxScope.ExposedDropdownMenu`, `ExposedDropdownMenuBoxWithTextField`
139+
- Dialog: `AlertDialog`, `SimpleDialog`
140+
- Dropdown menu: `DropdownMenu` (deprecated), `DropdownMenuItem`, `DropdownMenuBox`, `DropdownMenuBoxScope.DropdownMenu`
141+
- `ExposedDropdownMenuBox`, `ExposedDropdownMenuBoxScope.ExposedDropdownMenuBoxTextField`,
142+
`ExposedDropdownMenuBoxScope.ExposedDropdownMenuBoxOutlinedTextField`,
143+
`ExposedDropdownMenuBoxScope.ExposedDropdownMenu`, `ExposedDropdownMenuBoxWithTextField`,
144+
`ExposedDropdownMenuBoxWithOutlinedTextField`
137145
- Floating action button: `FloatingActionButton`, `SmallFloatingActionButton`, `LargeFloatingActionButton`,
138146
`ExtendedFloatingActionButton`
139147
- Icon button: `IconButton`, `IconToggleButton`, `FilledIconButton`, `FilledIconToggleButton`, `FilledTonalIconButton`,
@@ -146,7 +154,6 @@ com.huanshankeji:compose-multiplatform-html-unified-material3:$version
146154
- Tab: `PrimaryTab`, `SecondaryTab`
147155
- Text: `MaterialText`, `TaglessText`
148156
- Text field: `TextField`, `OutlinedTextField`
149-
- Top app bar: `TopAppBar`, `CenterAlignedTopAppBar`, `MediumTopAppBar`, `LargeTopAppBar`
150157

151158
##### `lazy.ext` components
152159

@@ -178,29 +185,49 @@ See [the corresponding section in Compose HTML Material](https://github.com/huan
178185
### Modifiers
179186

180187
- `alpha`
188+
- `rotate`
181189
- size modifiers
182190
- `size`, `sizeIn`, `fillMaxSize`
183191
- `width`, `widthIn`, `fillMaxWidth`
184192
- `height`, `heightIn`, `fillMaxHeight`
193+
- `wrapContentWidth`, `wrapContentHeight`, `wrapContentSize`
194+
- intrinsic size modifiers: `width(IntrinsicSize)`, `height(IntrinsicSize)`
185195
- `padding`
186196
- `background`
187197
- `border` (visually inconsistent)
188-
- `onClick`
189-
- `verticalScroll`, `horizontalScroll` (`ScrollState` not supported on JS yet)
198+
- `clickable`
199+
- `onClick` (deprecated, use `clickable`)
200+
- `verticalScroll`, `horizontalScroll` (deprecated, use `VerticalScrollContainer`/`VerticalScrollBox`/`VerticalScrollColumn` or `HorizontalScrollContainer`/`HorizontalScrollBox`/`HorizontalScrollRow` in `ext` instead)
201+
- scope modifiers
202+
- `BoxScope`: `align`
203+
- `RowScope`: `weight`, `align`
204+
- `ColumnScope`: `weight`, `align`
205+
- `LazyItemScope`: `fillParentMaxSize`, `fillParentMaxWidth`, `fillParentMaxHeight`
190206

191207
#### `ext` modifiers
192208

209+
- `fillMaxWidthStretch`, `fillMaxHeightStretch`, `fillMaxSizeStretch`
193210
- `outerBorder`
211+
- `roundedCornerOuterBorder`
194212
- `roundedCornerBackgroundAndOuterBorder`
195213
- `outerPadding`, `innerPadding`
214+
- `hidden` (`reserveSpace`, `invisible`)
215+
- `matchPositionRelativeParentJsDom`
196216

197217
### Other APIs
198218

199219
- `Alignment`
200220
- `Arrangement`
221+
- `BorderStroke`
222+
- `Color`
223+
- `IntrinsicSize`
201224
- `KeyboardOptions`
202225
- `KeyboardActions`
203226
- `PaddingValues`
227+
- `ScrollState`, `rememberScrollState` (not fully supported yet and delegates to empty state on JS DOM)
228+
- text: `AnnotatedString`, `SpanStyle`, `buildAnnotatedString`
229+
- text style: `TextAlign`, `TextDecoration`, `TextOverflow`
230+
- font: `FontWeight`, `FontStyle`
204231

205232
### ViewModel
206233

0 commit comments

Comments
 (0)