Skip to content

Conversation

@pregnantboy
Copy link
Contributor

@pregnantboy pregnantboy commented Oct 26, 2025

Changes

  • Added visual indicators (green/red box shadows) to steps in approval branches
  • Connected the ApproveReject component to the MrfContext to track branch selection
  • Fixed step duplication to properly preserve approval branch configuration
  • Added helper function getMrfApprovalConfig to determine approval configuration for new steps
  • Enhanced useStepMetadata hook to detect and provide approval branch information
  • Added shadow styles to the theme foundations

How to test?

  1. Create a workflow with a FormSG MRF step that includes an approval field
  2. Add steps after the MRF step in both the "approve" and "reject" branches
  3. Verify that steps in the "approve" branch have a green shadow
  4. Verify that steps in the "reject" branch have a red shadow
  5. Test duplicating steps within approval branches to ensure they maintain the correct branch configuration
  6. Test adding new steps to approval branches to ensure they're properly assigned

Copy link
Contributor Author

pregnantboy commented Oct 26, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch from 14cac82 to 4239c86 Compare October 27, 2025 07:38
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch from 4239c86 to be36007 Compare October 27, 2025 10:34
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch from be36007 to 0b79932 Compare November 29, 2025 16:30
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-backend branch from 6da876b to 00955cc Compare November 30, 2025 08:19
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch 2 times, most recently from 653e5cc to f8949a9 Compare November 30, 2025 09:19
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-backend branch from 00955cc to daa7ee4 Compare November 30, 2025 09:19
@pregnantboy pregnantboy changed the title feat: css for step in approval/reject branch [MRF-12] PLU-520: (frontend) set approval config when creating step Nov 30, 2025
@linear
Copy link

linear bot commented Nov 30, 2025

PLU-520 MRF: Approvals

@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-backend branch from daa7ee4 to dd2c20b Compare November 30, 2025 09:36
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch 2 times, most recently from b7008d8 to 0b32162 Compare December 3, 2025 10:55
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-backend branch 2 times, most recently from 095fd40 to a5ab6a4 Compare December 3, 2025 15:42
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch from 0b32162 to 6596a49 Compare December 3, 2025 15:42
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-backend branch from a5ab6a4 to a707219 Compare December 3, 2025 15:45
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch from 6596a49 to 9cc1d84 Compare December 3, 2025 15:45
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-backend branch from a707219 to c9abe1b Compare December 3, 2025 16:09
@pregnantboy pregnantboy force-pushed the mrf/create-step-approval-config-frontend branch from 9cc1d84 to 642929c Compare December 3, 2025 16:09
@pregnantboy pregnantboy marked this pull request as ready for review December 3, 2025 16:24
@pregnantboy pregnantboy requested a review from a team as a code owner December 3, 2025 16:24
const onDuplicateStep = useCallback(async () => {
const duplicateConfig = {
...(step.config?.approval && {
approval: step.config?.approval,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
approval: step.config?.approval,
approval: {
branch: step.config.approval.branch,
stepId: step.config.approval.stepId,
},

current config throws error when attempting to duplicate step in the 'reject' branch. it complains about __typename being present in the input

Copy link
Contributor

@kevinkim-ogp kevinkim-ogp left a comment

Choose a reason for hiding this comment

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

  • Can create step in approval branch
  • Can create step in rejection branch
  • Can duplicate step in approval branch
  • Can duplicate step in rejection branch
  • Can duplicate branch
  • Can create step in if-then branch
  • Can reorder steps

clarification for the UI: is that the intended border ?
Screenshot 2025-12-09 at 3 20 20 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants