Commit eff0fc8
authored
AI Launchpad: first-pass design-feedback fixes (DSGCOM-678) (#50088)
* AI Launchpad: drop redundant write_3_posts task from the tailoring menu
The model could pick both write_3_posts and first_post_published, which read
as duplicates in the same list (DSGCOM-678). Remove write_3_posts from the
prompt's TASK_MENU so it's no longer offered; the menu stays a subset of the
catalog (AI_Launchpad_Task_Menu_Test still passes).
* AI Launchpad: keep social task subtitles general, not network-specific
Design feedback (DSGCOM-678): "Connect your social media accounts" read too
specific (e.g. naming Instagram/Pinterest) when we do not know which platforms
the user uses. Add a prompt rule so connect_social_media / drive_traffic /
post_sharing_enabled subtitles stay about growing the audience and engaging
visitors, without naming specific networks.
* AI Launchpad: let wizard goal-card copy span the full width on mobile
Design feedback (DSGCOM-678): the Educate and Portfolio descriptions did not
extend across the container on mobile. `text-wrap: balance` evens line lengths,
which keeps the copy narrow on the full-width single-column mobile cards. Scope
balance to the two-column desktop grid and use `text-wrap: pretty` on mobile so
longer copy fills the width while still avoiding orphans.
* AI Launchpad: use WPDS state icons in the tailored list
Design feedback (DSGCOM-678): use WPDS icons for the task states. Replace the
inline hand-rolled SVGs with @wordpress/icons `border` (a dashed ring) for an
active/not-started task and `published` (a check-in-circle) for a done one.
Icons fill from currentColor so the existing grey toning still applies.
* AI Launchpad: make the tailored list an accordion (one card open at a time)
Design feedback (DSGCOM-678): only one task card should be open at a time, and
opening a different card should collapse the active one. Replace the cards
uncontrolled defaultOpen with parent-controlled open/onOpenChange: a single
openId state means opening any card closes the rest, and the user can still
collapse all. The first incomplete card auto-opens once (guarded by a ref so a
fully-collapsed list is never force-reopened). firstIncompleteIndex becomes
nextIncompleteId (id-based, null when all complete).
* AI Launchpad: auto-expand the next task when one is skipped or completed
Design feedback (DSGCOM-678): skipping a task should expand the next one.
handleSkip now advances the accordion to the next incomplete task (via a new
nextIncompleteId afterId overload that walks past the skipped id, falling back
to any remaining incomplete task). Apply the same advance to handleMarkComplete
so completing the open card does not leave the whole list collapsed.
* AI Launchpad: add a site appearance-editor quick link to the site preview
Design feedback (DSGCOM-678): keep the preview thumbnail as a quick link into
the site editor. The REST site payload returns edit_url and SitePreview renders
the thumbnail as a link with a hover "Edit site" overlay. Block themes point at
the Site Editor (site-editor.php); classic themes, which cannot use it, fall
back to the Customizer (customize.php) so the quick link is always available.
* AI Launchpad: trim verbose comments and drop ticket references
Comments-only cleanup across the feature: remove the internal ticket references
from code comments, collapse multi-paragraph docblocks and decision-narration to
terse one-line summaries, and delete inline comments that just restated the code.
Lint-required docblock tags (@param/@return/@Package) are preserved; no code,
logic, or behavior changes.1 parent d2d9747 commit eff0fc8
36 files changed
Lines changed: 493 additions & 713 deletions
File tree
- projects/packages/jetpack-mu-wpcom
- changelog
- src/features/ai-launchpad
- js
- lib
- tailored-list
- wizard
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 9 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
| |||
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 31 | + | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
| |||
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 68 | + | |
80 | 69 | | |
81 | 70 | | |
82 | 71 | | |
83 | 72 | | |
84 | 73 | | |
85 | 74 | | |
86 | 75 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 76 | + | |
91 | 77 | | |
92 | 78 | | |
93 | 79 | | |
| |||
139 | 125 | | |
140 | 126 | | |
141 | 127 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 128 | + | |
145 | 129 | | |
146 | 130 | | |
147 | 131 | | |
| |||
205 | 189 | | |
206 | 190 | | |
207 | 191 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
212 | 195 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 196 | + | |
217 | 197 | | |
218 | 198 | | |
219 | 199 | | |
| |||
227 | 207 | | |
228 | 208 | | |
229 | 209 | | |
230 | | - | |
231 | 210 | | |
232 | 211 | | |
233 | 212 | | |
| |||
242 | 221 | | |
243 | 222 | | |
244 | 223 | | |
245 | | - | |
246 | 224 | | |
247 | 225 | | |
248 | 226 | | |
| |||
Lines changed: 9 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 12 | + | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
| |||
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
| |||
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 55 | + | |
| 56 | + | |
62 | 57 | | |
63 | 58 | | |
64 | 59 | | |
| |||
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
83 | | - | |
84 | 78 | | |
85 | 79 | | |
86 | 80 | | |
87 | 81 | | |
88 | | - | |
89 | 82 | | |
90 | 83 | | |
91 | 84 | | |
| |||
Lines changed: 19 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 5 | + | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | | - | |
17 | | - | |
| 10 | + | |
18 | 11 | | |
19 | | - | |
20 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
21 | 15 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
36 | 19 | | |
37 | 20 | | |
38 | 21 | | |
| |||
48 | 31 | | |
49 | 32 | | |
50 | 33 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
54 | 37 | | |
55 | 38 | | |
56 | 39 | | |
| |||
60 | 43 | | |
61 | 44 | | |
62 | 45 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 46 | + | |
66 | 47 | | |
67 | 48 | | |
68 | 49 | | |
| |||
78 | 59 | | |
79 | 60 | | |
80 | 61 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
85 | 65 | | |
86 | 66 | | |
87 | 67 | | |
| |||
101 | 81 | | |
102 | 82 | | |
103 | 83 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
109 | 87 | | |
110 | 88 | | |
111 | 89 | | |
| |||
142 | 120 | | |
143 | 121 | | |
144 | 122 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 123 | + | |
150 | 124 | | |
151 | 125 | | |
152 | 126 | | |
| |||
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
| |||
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
14 | 12 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 13 | + | |
| 14 | + | |
23 | 15 | | |
24 | 16 | | |
25 | 17 | | |
| |||
59 | 51 | | |
60 | 52 | | |
61 | 53 | | |
62 | | - | |
63 | | - | |
| 54 | + | |
64 | 55 | | |
65 | 56 | | |
66 | 57 | | |
| |||
0 commit comments