Pause Ecosystem action points in Superfluid campaign widget - #235
Conversation
…inition.disabled Extends the runtime contract so a pool can carry an optional notice banner and an action card can be flagged disabled, for temporarily-paused activities. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…definition Adds the on-hold notice to the ecosystem-funding-actions pool, disables its three action cards (drops href, sets ctaLabel to On Hold), and adds 3 FAQ entries explaining the hold and its effect on existing SUP reward streams. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…eractive When action.disabled is set, the card and its CTA button lose their press/keyboard handlers and link, and appear visually disabled via opacity and cursor, matching the disabled-state pattern used elsewhere in the package. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
There was a problem hiding this comment.
🟡 Changes recommended
The runtime-contract documentation currently states href is required for external-link, but the PR intentionally omits it for disabled external-link actions, making the contract misleading for integrators.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the Superfluid campaign widget to support a temporary pause of “Ecosystem actions” via config-driven runtime-contract fields, ensuring the UI communicates the hold and prevents interaction while keeping the section visible.
Changes:
- Extended the widget runtime contract with
CampaignPoolDefinition.noticeandCampaignActionDefinition.disabled. - Rendered an optional warning
Alertabove a reward pool section whenpool.noticeis present. - Implemented a disabled/non-interactive treatment for action cards and updated the default campaign definition (including new FAQ entries) to reflect the hold.
File summaries
| File | Description |
|---|---|
| packages/superfluid-campaign-widget/src/widgetRuntimeContract.ts | Adds disabled on actions and notice on pools to support hold-state UI behavior. |
| packages/superfluid-campaign-widget/src/components/RewardPoolSection.tsx | Renders a warning Alert banner above the pool header when notice is configured. |
| packages/superfluid-campaign-widget/src/components/ActionCard.tsx | Applies disabled styling and removes keyboard/mouse activation when an action is marked disabled. |
| packages/superfluid-campaign-widget/src/campaignDefinition.ts | Configures the Ecosystem actions hold notice, disables the three Ecosystem action cards, and adds the new FAQ entries. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| /** Required when ctaKind is 'external-link'. */ | ||
| href?: string |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
Closes #234
Implements the confirmed patch spec for the Superfluid campaign widget:
The change is config-driven:
CampaignPoolDefinition.noticeandCampaignActionDefinition.disabledare new fields on the widget's runtime contract, following the existing pattern where all campaign copy/behavior lives incampaignDefinition.ts. The disabled-card treatment (opacity, cursor, conditional handlers, aria-disabled) matches the convention already used elsewhere in the package (e.g.WidgetTabs.tsx).Verification
pnpm --filter @goodwidget/superfluid-campaign-widget lint— passedpnpm --filter @goodwidget/superfluid-campaign-widget... build— passed (ESM/CJS/DTS)tests/widgets/superfluid-campaign-widget/states.spec.ts) against Storybook — 60 passed, 2 pre-existing failures unrelated to this change (wallet-chip disconnect menu test, reproduces identically onmain)Co-Authored-By: Claude noreply@anthropic.com