This repository was archived by the owner on Feb 23, 2024. It is now read-only.
Commit a992c64
Experiment: Replace style hooks coming from
* Replace all style hooks with useStyleProps hook
* Remove border/color/spacing hooks
* Style Props Hook
* Make use of `change-case` package
* Tidy up block wrappers
* Attribute filter does not use frontend.ts nor styles within block
* Remove frontend from filter blocks and unused styleprops usage
* Tidy up variable names so its clearer attributes are not required specifically from blocks
* Update assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-title-label-block/block.tsx
Co-authored-by: Albert Juhé Lluveras <[email protected]>
* Update assets/js/blocks/attribute-filter/block-wrapper.tsx
Co-authored-by: Albert Juhé Lluveras <[email protected]>
* Update assets/js/blocks/active-filters/block-wrapper.tsx
Co-authored-by: Albert Juhé Lluveras <[email protected]>
* Update assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-checkout-button-block/block.tsx
Co-authored-by: Tom Cafferkey <[email protected]>
* Update assets/js/blocks/rating-filter/block-wrapper.tsx
Co-authored-by: Tom Cafferkey <[email protected]>
* Update assets/js/blocks/stock-filter/block-wrapper.tsx
Co-authored-by: Tom Cafferkey <[email protected]>
* Update assets/js/blocks/price-filter/block-wrapper.tsx
Co-authored-by: Tom Cafferkey <[email protected]>
* Update assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/block.tsx
Co-authored-by: Tom Cafferkey <[email protected]>
* Simplify styleprop
* Styleprops simplify
* Fix withFeaturedItem styles
* Like the original hook, flatten props and combine with parsed styles
---------
Co-authored-by: Albert Juhé Lluveras <[email protected]>
Co-authored-by: Tom Cafferkey <[email protected]>@wordpress/block-editor (#9251)1 parent b9148b4 commit a992c64
File tree
42 files changed
+471
-501
lines changed- assets/js
- atomic/blocks/product-elements
- button
- image
- test
- price
- rating
- sale-badge
- sku
- stock-indicator
- summary
- title
- base
- components/product-price
- hooks
- utils
- blocks
- active-filters
- attribute-filter
- featured-items
- mini-cart/mini-cart-contents/inner-blocks
- mini-cart-cart-button-block
- mini-cart-checkout-button-block
- mini-cart-title-items-counter-block
- mini-cart-title-label-block
- price-filter
- rating-filter
- stock-filter
- src/BlockTypes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+471
-501
lines changedLines changed: 24 additions & 56 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 10 | + | |
16 | 11 | | |
17 | 12 | | |
18 | 13 | | |
| |||
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
45 | 38 | | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 43 | + | |
| 44 | + | |
54 | 45 | | |
55 | 46 | | |
56 | 47 | | |
| |||
114 | 105 | | |
115 | 106 | | |
116 | 107 | | |
| 108 | + | |
117 | 109 | | |
| 110 | + | |
118 | 111 | | |
| 112 | + | |
119 | 113 | | |
120 | 114 | | |
121 | 115 | | |
122 | 116 | | |
123 | | - | |
124 | | - | |
125 | 117 | | |
126 | 118 | | |
127 | 119 | | |
| |||
130 | 122 | | |
131 | 123 | | |
132 | 124 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 125 | + | |
141 | 126 | | |
142 | 127 | | |
143 | 128 | | |
| |||
147 | 132 | | |
148 | 133 | | |
149 | 134 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
155 | 138 | | |
156 | 139 | | |
157 | 140 | | |
158 | 141 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 142 | + | |
| 143 | + | |
163 | 144 | | |
164 | 145 | | |
165 | 146 | | |
| |||
169 | 150 | | |
170 | 151 | | |
171 | 152 | | |
172 | | - | |
173 | | - | |
| 153 | + | |
174 | 154 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 155 | + | |
181 | 156 | | |
182 | 157 | | |
183 | 158 | | |
| |||
193 | 168 | | |
194 | 169 | | |
195 | 170 | | |
| 171 | + | |
196 | 172 | | |
197 | 173 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 174 | | |
203 | 175 | | |
204 | 176 | | |
| |||
218 | 190 | | |
219 | 191 | | |
220 | 192 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 193 | + | |
| 194 | + | |
225 | 195 | | |
226 | 196 | | |
227 | 197 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 198 | + | |
| 199 | + | |
232 | 200 | | |
233 | 201 | | |
234 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
| 86 | + | |
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
| |||
104 | 98 | | |
105 | 99 | | |
106 | 100 | | |
107 | | - | |
| 101 | + | |
108 | 102 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 103 | + | |
114 | 104 | | |
115 | 105 | | |
116 | 106 | | |
| |||
142 | 132 | | |
143 | 133 | | |
144 | 134 | | |
145 | | - | |
| 135 | + | |
146 | 136 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 137 | + | |
152 | 138 | | |
153 | 139 | | |
154 | 140 | | |
| |||
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 20 | | |
27 | 21 | | |
28 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| 40 | + | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
48 | 45 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 46 | | |
53 | 47 | | |
54 | 48 | | |
55 | 49 | | |
56 | | - | |
| 50 | + | |
57 | 51 | | |
58 | 52 | | |
59 | | - | |
60 | | - | |
| 53 | + | |
61 | 54 | | |
62 | 55 | | |
63 | 56 | | |
| |||
74 | 67 | | |
75 | 68 | | |
76 | 69 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 70 | | |
85 | 71 | | |
86 | 72 | | |
| |||
97 | 83 | | |
98 | 84 | | |
99 | 85 | | |
100 | | - | |
101 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
102 | 89 | | |
103 | 90 | | |
104 | 91 | | |
| |||
119 | 106 | | |
120 | 107 | | |
121 | 108 | | |
122 | | - | |
123 | 109 | | |
124 | 110 | | |
125 | 111 | | |
| |||
Lines changed: 4 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 10 | + | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
| |||
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
| 135 | + | |
139 | 136 | | |
140 | 137 | | |
141 | 138 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
149 | | - | |
| 143 | + | |
150 | 144 | | |
151 | 145 | | |
152 | 146 | | |
| |||
165 | 159 | | |
166 | 160 | | |
167 | 161 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 162 | + | |
176 | 163 | | |
177 | 164 | | |
178 | 165 | | |
| |||
0 commit comments