PTAL.
I don't love that a lot of these styles exist in two places (inline CTA and sidebar CTA) but that would require a chunky refactor + styling work to make it possible to have one button in two places that I don't see another solution just now.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Looks good to me, Jack! One small suggestion
?data-has-widgets=${!input.isLoading && hasWidgets}
?data-no-widgets=${!hasWidgets}>Could we rename or at least add a comment as to why we have both? Otherwise it seems like we are passing 2 vars, which intuitively should be `var1 = !var2`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
?data-has-widgets=${!input.isLoading && hasWidgets}
?data-no-widgets=${!hasWidgets}>Could we rename or at least add a comment as to why we have both? Otherwise it seems like we are passing 2 vars, which intuitively should be `var1 = !var2`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: front_end/panels/ai_assistance/components/WalkthroughView.ts
Insertions: 6, Deletions: 0.
@@ -87,6 +87,12 @@
const hasWidgets = steps.some(s => s.widgets?.length);
+ // Note: we apply data-*-widgets attributes because we need to alter styling
+ // based on if widgets are present. It's clearer to style each state rather
+ // than only apply one data-* and then override existing styles. The styling
+ // here is more complex because we have to make the summary element look just
+ // like a DevTools Button, so as the user resizes the view from wide > small
+ // or vice-versa, the CTA does not change.
// clang-format off
return html`
<details class="walkthrough-inline" ?open=${input.isExpanded} @toggle=${onToggle}>
```
AI: improve the walkthrough UI
1. Change the backgrounds & styles of the CTAs depending on if the
walkthrough has widgets.
2. Add the chevron to the CTAs.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |