Commit 9481570
fix(vtex): render userSegment options and give birthday its own icon
userSegment `Props` was a union of interfaces whose only discriminant
(`segment`) was `@hide true`. deco wraps every block config as
`{ allOf: [PropsRef], properties: { __resolveType } }`, so admins that treat
`allOf` as an intersection flatten the union — the hidden discriminant
collapses and only a stray field (`months`) renders, giving no way to pick a
segment. Flatten `Props` to a single object with a visible `segment` enum so it
renders as an options dropdown; the handler already reads `props.segment` /
`props.months`, so behavior is unchanged.
Also give the birthday matcher `@icon gift` (was `calendar-event`, identical to
the generic Date matcher) so it has its own identity in the picker.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent a0a57a1 commit 9481570
2 files changed
Lines changed: 12 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
50 | 16 | | |
51 | 17 | | |
52 | | - | |
| 18 | + | |
53 | 19 | | |
54 | 20 | | |
55 | 21 | | |
56 | 22 | | |
57 | 23 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 24 | | |
67 | 25 | | |
68 | 26 | | |
| |||
0 commit comments