Skip to content

refactor(vara-eth-idea/frontend): use same sails payload form component for all program actions #2311

Merged
nikitayutanov merged 7 commits intomainfrom
ny-payload-form-styles
Jan 30, 2026
Merged

refactor(vara-eth-idea/frontend): use same sails payload form component for all program actions #2311
nikitayutanov merged 7 commits intomainfrom
ny-payload-form-styles

Conversation

@nikitayutanov
Copy link
Member

No description provided.

@nikitayutanov nikitayutanov changed the base branch from main to ny-payload-form-lib January 22, 2026 23:28
@nikitayutanov nikitayutanov force-pushed the ny-payload-form-styles branch from ef0a8c7 to e941bcb Compare January 22, 2026 23:31
@nikitayutanov nikitayutanov marked this pull request as ready for review January 23, 2026 17:00
@nikitayutanov nikitayutanov added C2-refactoring Refactoring proposal D6-vara-eth-idea Vara.Eth Idea labels Jan 23, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the program interaction UI to use a single Sails payload form component across constructors, queries, and functions, replacing the older “ServiceList / InitForm / MessageForm” flow.

Changes:

  • Replaces ServiceList with a new SailsProgramActions UI that groups services and actions and drives all submissions through the same payload form.
  • Introduces SailsPayloadForm and supporting Sails UI components (SailsActionGroup, SailsAction) to standardize payload rendering/encoding/submission.
  • Updates program hooks (useInitProgram, useSendProgramMessage, useSendInjectedTransaction) to accept a pre-parsed Sails instance instead of building it internally, and updates supporting UI components/styles.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
idea/vara-eth/frontend/src/pages/program/program.tsx Switches program action rendering from ServiceList to SailsProgramActions.
idea/vara-eth/frontend/src/features/sails/lib.ts Adds shared SailsAction type alongside useSails.
idea/vara-eth/frontend/src/features/sails/index.ts Re-exports SailsProgramActions from the Sails feature entrypoint.
idea/vara-eth/frontend/src/features/sails/components/sails-program-actions/sails-program-actions.tsx New top-level program-actions UI built on Sails actions/groups.
idea/vara-eth/frontend/src/features/sails/components/sails-program-actions/sails-program-actions.module.scss Styles for the program actions tabs/list.
idea/vara-eth/frontend/src/features/sails/components/sails-program-actions/index.ts Barrel export for SailsProgramActions.
idea/vara-eth/frontend/src/features/sails/components/sails-payload-form/sails-payload-form.tsx New unified payload form component using @gear-js/sails-payload-form + RHF/Zod.
idea/vara-eth/frontend/src/features/sails/components/sails-payload-form/sails-payload-form.module.scss Grid layout styles for the unified payload form.
idea/vara-eth/frontend/src/features/sails/components/sails-payload-form/index.ts Barrel export for SailsPayloadForm.
idea/vara-eth/frontend/src/features/sails/components/sails-action/sails-action.tsx New action row UI (expand/collapse + submit) built around SailsPayloadForm.
idea/vara-eth/frontend/src/features/sails/components/sails-action/sails-action.module.scss Styles for the action row container/header/body.
idea/vara-eth/frontend/src/features/sails/components/sails-action/index.ts Barrel export for SailsAction.
idea/vara-eth/frontend/src/features/sails/components/sails-action-group/sails-action-group.tsx New grouping UI for actions per service/constructor section.
idea/vara-eth/frontend/src/features/sails/components/sails-action-group/sails-action-group.module.scss Styles for the action group header/body.
idea/vara-eth/frontend/src/features/sails/components/sails-action-group/index.ts Barrel export for SailsActionGroup.
idea/vara-eth/frontend/src/features/sails/components/index.ts Updates Sails components barrel export to SailsProgramActions.
idea/vara-eth/frontend/src/features/sails/components/fieldset/fieldset.module.scss Adjusts fieldset styling to match the new grid-based payload form layout.
idea/vara-eth/frontend/src/features/sails/components/sails-payload-fields/sails-payload-fields.tsx Removes old payload-fields-only component in favor of SailsPayloadForm.
idea/vara-eth/frontend/src/features/sails/components/sails-payload-fields/index.ts Removes barrel export for deleted payload-fields component.
idea/vara-eth/frontend/src/features/programs/ui/service-list/service-list.tsx Deletes the old program service list UI.
idea/vara-eth/frontend/src/features/programs/ui/service-list/service-list.module.scss Deletes styles for removed ServiceList.
idea/vara-eth/frontend/src/features/programs/ui/service-list/index.ts Deletes barrel export for removed ServiceList.
idea/vara-eth/frontend/src/features/programs/ui/message-form/message-form.tsx Deletes old per-message form implementation (replaced by Sails UI).
idea/vara-eth/frontend/src/features/programs/ui/message-form/message-form.module.scss Deletes styles for removed MessageForm.
idea/vara-eth/frontend/src/features/programs/ui/message-form/index.ts Deletes barrel export for removed MessageForm.
idea/vara-eth/frontend/src/features/programs/ui/init-form/init-form.tsx Deletes old init form implementation (replaced by Sails UI).
idea/vara-eth/frontend/src/features/programs/ui/init-form/index.ts Deletes barrel export for removed InitForm.
idea/vara-eth/frontend/src/features/programs/ui/index.ts Removes ServiceList export from programs UI barrel.
idea/vara-eth/frontend/src/features/programs/lib/index.ts Stops exporting useSails from programs hooks barrel.
idea/vara-eth/frontend/src/features/programs/lib/hooks/use-send-program-message.ts Refactors hook to accept Sails instance rather than constructing it from IDL.
idea/vara-eth/frontend/src/features/programs/lib/hooks/use-send-injected-transaction.ts Refactors hook to accept Sails instance rather than constructing it from IDL.
idea/vara-eth/frontend/src/features/programs/lib/hooks/use-init-program.ts Refactors hook to accept Sails instance; returns mutation result directly.
idea/vara-eth/frontend/src/features/programs/lib/hooks/index.ts Removes useSails export from hooks barrel.
idea/vara-eth/frontend/src/features/programs/index.ts Removes ServiceList from programs feature exports.
idea/vara-eth/frontend/src/components/ui/expandable-item/expandable-item.tsx Simplifies ExpandableItem API by removing nesting support.
idea/vara-eth/frontend/src/components/ui/expandable-item/expandable-item.module.scss Removes nested styling for ExpandableItem.
idea/vara-eth/frontend/src/components/ui/button/button.tsx Adjusts prop handling to forward standard button attributes via ...props.
idea/vara-eth/frontend/src/components/form/checkbox/checkbox.tsx Adds className support to style checkbox container.
idea/vara-eth/frontend/src/app/app.css Adds global button reset styles and heading font inheritance adjustments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nikitayutanov nikitayutanov force-pushed the ny-payload-form-styles branch from 31c185e to ad8bfab Compare January 23, 2026 17:11
@nikitayutanov nikitayutanov force-pushed the ny-payload-form-lib branch 2 times, most recently from 045e49a to 33a6f2a Compare January 28, 2026 20:41
@nikitayutanov nikitayutanov force-pushed the ny-payload-form-styles branch from ad8bfab to fe816bd Compare January 28, 2026 20:47
Base automatically changed from ny-payload-form-lib to main January 29, 2026 16:23
@nikitayutanov nikitayutanov force-pushed the ny-payload-form-styles branch from fe816bd to a5577bb Compare January 29, 2026 16:40
@nikitayutanov nikitayutanov merged commit a25ada8 into main Jan 30, 2026
13 of 14 checks passed
@nikitayutanov nikitayutanov deleted the ny-payload-form-styles branch January 30, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C2-refactoring Refactoring proposal D6-vara-eth-idea Vara.Eth Idea

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants