Commit fbaad76
authored
Star rating redesign (#15032)
* Rename existing starRating component to starRatingDeprecated so its easier to add a 0% switch for testing over festive period
* Add a StarRating component with updated sizing and colours
* Add a medium star rating size and update schemas
* Add variable padding to star ratings
* Move block component colours into their own style object so they can be controlled via test
* Conditionally render star rating in feature cards
* Conditionally render star rating in card
* Conditionally render star rating on cards in scrollables
* Conditionally render star rating on cards in flexibles
* Conditionally render star rating on cards in highlights
* don't test on older containers as they're being deprecated
* Conditionally render in articles
* Use dynamic sizing in card component
* Update padding in headline to reduce mobile bottom padding fro 28 to 20
* Use dynamic sizing on feature cards for stars
* Update star rating sizes for flexible containers
* Make sure to use abtest not switch!
* Conditionally render block component with background colours if user is not in variant
* Conditionally render rich link if user is in variant
* Conditionally render star rating on image block component if user is in variant
* fix linting
* Make variant optional
* Add missing variants
* Add star rating dark theme param for switching to a darker palette for accessibility requirments. These are needed for cards such as feature cards which have lighter / variable backgrounds
* Fix linting
* Use guardian space values where possible
* Remove logging
* Rename deprecated stories so it is easier to clean up post test
* Add modern suite of star rating stories.
This update uses a ratings map to reduce boiler plate code.
* Prefer `alternative` over `dark` when referring to the second theme for star ratings.
This is to prevent overloading the term dark which is more commonly used in the code base to refer to dark mode
* render the new star rating component or the deprecated component depending on if the user is in the test variant
* Update stories for star rating block component
* Use new variant on lightbox
* Remove padding bottom 1px from rich link title
* Add `none` to padding size tpe for controlling 0 top padding1 parent f4af771 commit fbaad76
File tree
48 files changed
+822
-198
lines changed- dotcom-rendering/src
- components
- Card
- Masthead
- StarRating
- frontend/schemas
- layouts
- lib
- model
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+822
-198
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
124 | | - | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
132 | | - | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| 163 | + | |
158 | 164 | | |
159 | 165 | | |
160 | 166 | | |
| |||
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
| 175 | + | |
169 | 176 | | |
170 | 177 | | |
171 | 178 | | |
| |||
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| 213 | + | |
206 | 214 | | |
207 | 215 | | |
208 | 216 | | |
| 217 | + | |
209 | 218 | | |
210 | 219 | | |
211 | 220 | | |
| 221 | + | |
212 | 222 | | |
213 | 223 | | |
214 | 224 | | |
| |||
242 | 252 | | |
243 | 253 | | |
244 | 254 | | |
| 255 | + | |
245 | 256 | | |
246 | 257 | | |
247 | 258 | | |
| 259 | + | |
248 | 260 | | |
249 | 261 | | |
250 | 262 | | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| |||
257 | 270 | | |
258 | 271 | | |
259 | 272 | | |
| 273 | + | |
260 | 274 | | |
261 | 275 | | |
262 | 276 | | |
| |||
352 | 366 | | |
353 | 367 | | |
354 | 368 | | |
| 369 | + | |
355 | 370 | | |
356 | 371 | | |
357 | 372 | | |
| |||
364 | 379 | | |
365 | 380 | | |
366 | 381 | | |
367 | | - | |
| 382 | + | |
| 383 | + | |
368 | 384 | | |
369 | 385 | | |
370 | 386 | | |
| |||
383 | 399 | | |
384 | 400 | | |
385 | 401 | | |
386 | | - | |
| 402 | + | |
| 403 | + | |
387 | 404 | | |
388 | 405 | | |
389 | 406 | | |
| |||
396 | 413 | | |
397 | 414 | | |
398 | 415 | | |
399 | | - | |
| 416 | + | |
400 | 417 | | |
401 | 418 | | |
402 | 419 | | |
| |||
413 | 430 | | |
414 | 431 | | |
415 | 432 | | |
| 433 | + | |
| 434 | + | |
416 | 435 | | |
417 | 436 | | |
418 | 437 | | |
| |||
496 | 515 | | |
497 | 516 | | |
498 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
499 | 526 | | |
500 | 527 | | |
501 | 528 | | |
| |||
572 | 599 | | |
573 | 600 | | |
574 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
575 | 610 | | |
576 | 611 | | |
577 | 612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
| |||
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
187 | | - | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| |||
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
| 427 | + | |
| 428 | + | |
424 | 429 | | |
425 | 430 | | |
426 | 431 | | |
| |||
908 | 913 | | |
909 | 914 | | |
910 | 915 | | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
917 | 928 | | |
918 | 929 | | |
919 | 930 | | |
| |||
1238 | 1249 | | |
1239 | 1250 | | |
1240 | 1251 | | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1247 | 1265 | | |
1248 | 1266 | | |
1249 | 1267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
| 468 | + | |
467 | 469 | | |
468 | 470 | | |
469 | 471 | | |
| |||
486 | 488 | | |
487 | 489 | | |
488 | 490 | | |
| 491 | + | |
489 | 492 | | |
490 | 493 | | |
491 | 494 | | |
| |||
533 | 536 | | |
534 | 537 | | |
535 | 538 | | |
| 539 | + | |
536 | 540 | | |
537 | 541 | | |
538 | 542 | | |
| |||
753 | 757 | | |
754 | 758 | | |
755 | 759 | | |
| 760 | + | |
756 | 761 | | |
757 | 762 | | |
758 | 763 | | |
| |||
990 | 995 | | |
991 | 996 | | |
992 | 997 | | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
993 | 1001 | | |
994 | 1002 | | |
995 | 1003 | | |
| |||
0 commit comments