Commit 5dac57c
authored
Rework toolbar classnames (tldraw#6526)
For workflow builder, we want a vertical toolbar. I'm backporting it to
the SDK because it's a common enough request (tldraw#6532), but in the process
i got super confused by two things:
* We have a `tlui-toolbar` classname and a `TldrawUiToolbar` component.
These are completely unrelated.
* We have some `tlui-buttons` classnames that are _almost always_ used
with `TldrawUiToolbar`, and sometimes contain buttons as the name would
suggest.
So this diff tweaks those. `tlui-toolbar` (used for the main actual
toolbar at the bottom of the screen) and co are now `tlui-main-toolbar`.
`tlui-buttons` has been replaced with some components that have the same
effect: `TldrawUiRow` and `TldrawUiGrid`. These are now used by
`TldrawUiToolbar` depending on the `orientation` prop it gets passed. I
wanted to use components instead of classnames for these because if
you're customizing our UI by copy-pasting chunks of it, random CSS
classnames are even less well documented than components like these. I
also wanted names that reflected the way these were used a bit better
(ie often not with buttons).
### Change type
- [x] `api`
### Release notes
### API Changes
- Added `TldrawUiRow` and `TldrawUiGrid` layout classes.
- The `tlui-buttons__horizontal` and `tlui-buttons__grid` class names
have been replaced by `tlui-row` and `tlui-grid`
- The `tlui-toolbar` classnames have been renamed to `tlui-main-toolbar`1 parent a03de71 commit 5dac57c
24 files changed
Lines changed: 244 additions & 203 deletions
File tree
- apps
- docs/utils
- examples/src/examples/rich-text-font-extensions
- packages/tldraw
- src
- lib
- ui/components
- ActionsMenu
- PageMenu
- StylePanel
- Toolbar
- primitives
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
134 | 149 | | |
135 | 150 | | |
136 | 151 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
3027 | 3030 | | |
3028 | 3031 | | |
3029 | 3032 | | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
3030 | 3036 | | |
3031 | 3037 | | |
3032 | 3038 | | |
| |||
3061 | 3067 | | |
3062 | 3068 | | |
3063 | 3069 | | |
3064 | | - | |
| 3070 | + | |
3065 | 3071 | | |
3066 | 3072 | | |
3067 | 3073 | | |
| |||
3078 | 3084 | | |
3079 | 3085 | | |
3080 | 3086 | | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
3081 | 3090 | | |
3082 | 3091 | | |
3083 | 3092 | | |
| |||
3970 | 3979 | | |
3971 | 3980 | | |
3972 | 3981 | | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
3973 | 3990 | | |
3974 | 3991 | | |
3975 | 3992 | | |
| |||
4113 | 4130 | | |
4114 | 4131 | | |
4115 | 4132 | | |
| 4133 | + | |
| 4134 | + | |
4116 | 4135 | | |
4117 | 4136 | | |
4118 | 4137 | | |
| |||
4256 | 4275 | | |
4257 | 4276 | | |
4258 | 4277 | | |
| 4278 | + | |
| 4279 | + | |
4259 | 4280 | | |
4260 | 4281 | | |
4261 | 4282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 164 | | |
171 | 165 | | |
172 | 166 | | |
| |||
207 | 201 | | |
208 | 202 | | |
209 | 203 | | |
210 | | - | |
| 204 | + | |
211 | 205 | | |
212 | 206 | | |
213 | 207 | | |
| |||
218 | 212 | | |
219 | 213 | | |
220 | 214 | | |
221 | | - | |
| 215 | + | |
222 | 216 | | |
223 | 217 | | |
224 | 218 | | |
| |||
230 | 224 | | |
231 | 225 | | |
232 | 226 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | 227 | | |
244 | 228 | | |
245 | 229 | | |
| |||
270 | 254 | | |
271 | 255 | | |
272 | 256 | | |
273 | | - | |
| 257 | + | |
274 | 258 | | |
275 | | - | |
| 259 | + | |
276 | 260 | | |
277 | 261 | | |
| 262 | + | |
278 | 263 | | |
279 | | - | |
| 264 | + | |
280 | 265 | | |
281 | 266 | | |
282 | 267 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 268 | | |
290 | | - | |
| 269 | + | |
291 | 270 | | |
292 | | - | |
| 271 | + | |
293 | 272 | | |
294 | | - | |
| 273 | + | |
295 | 274 | | |
296 | 275 | | |
| 276 | + | |
297 | 277 | | |
298 | | - | |
| 278 | + | |
299 | 279 | | |
300 | 280 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | 281 | | |
315 | 282 | | |
316 | 283 | | |
| |||
1033 | 1000 | | |
1034 | 1001 | | |
1035 | 1002 | | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1003 | + | |
| 1004 | + | |
1042 | 1005 | | |
1043 | 1006 | | |
1044 | 1007 | | |
| |||
1154 | 1117 | | |
1155 | 1118 | | |
1156 | 1119 | | |
1157 | | - | |
| 1120 | + | |
1158 | 1121 | | |
1159 | 1122 | | |
1160 | 1123 | | |
| |||
1165 | 1128 | | |
1166 | 1129 | | |
1167 | 1130 | | |
1168 | | - | |
| 1131 | + | |
1169 | 1132 | | |
1170 | 1133 | | |
1171 | 1134 | | |
1172 | 1135 | | |
1173 | 1136 | | |
1174 | 1137 | | |
1175 | 1138 | | |
1176 | | - | |
| 1139 | + | |
1177 | 1140 | | |
1178 | 1141 | | |
1179 | 1142 | | |
1180 | 1143 | | |
1181 | | - | |
| 1144 | + | |
1182 | 1145 | | |
1183 | 1146 | | |
1184 | 1147 | | |
| |||
1187 | 1150 | | |
1188 | 1151 | | |
1189 | 1152 | | |
1190 | | - | |
| 1153 | + | |
1191 | 1154 | | |
1192 | 1155 | | |
1193 | 1156 | | |
1194 | | - | |
| 1157 | + | |
1195 | 1158 | | |
1196 | 1159 | | |
1197 | 1160 | | |
| |||
1206 | 1169 | | |
1207 | 1170 | | |
1208 | 1171 | | |
1209 | | - | |
| 1172 | + | |
1210 | 1173 | | |
1211 | 1174 | | |
1212 | 1175 | | |
| |||
1217 | 1180 | | |
1218 | 1181 | | |
1219 | 1182 | | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | 1183 | | |
1226 | | - | |
| 1184 | + | |
1227 | 1185 | | |
| 1186 | + | |
1228 | 1187 | | |
1229 | 1188 | | |
1230 | | - | |
| 1189 | + | |
1231 | 1190 | | |
1232 | 1191 | | |
1233 | 1192 | | |
1234 | 1193 | | |
1235 | | - | |
| 1194 | + | |
1236 | 1195 | | |
1237 | 1196 | | |
1238 | 1197 | | |
1239 | 1198 | | |
1240 | 1199 | | |
1241 | | - | |
| 1200 | + | |
1242 | 1201 | | |
1243 | 1202 | | |
1244 | 1203 | | |
1245 | 1204 | | |
1246 | 1205 | | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | 1206 | | |
1252 | 1207 | | |
1253 | 1208 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
0 commit comments