[PR #6150] Extract schedule edit form into separate reusable component #6354

Closed
opened 2026-02-28 21:27:09 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6150

State: closed
Merged: Yes


Summary

This PR extracts the schedule edit form from ScheduleEditModal into a separate reusable component ScheduleEditForm. This refactoring enables the form to be reused in other contexts, particularly for the mobile schedules page.

Changes

  • Created ScheduleEditForm.tsx: A new reusable component containing:

    • All form fields (name, payee, account, amount, date)
    • Transactions table with linked/matched mode switching
    • Footer buttons (Cancel/Save) with error display
    • NoTransactionsMessage component
  • Updated ScheduleEditModal.tsx:

    • Removed form UI code (moved to ScheduleEditForm)
    • Removed unused imports
    • Updated to use the new form component
    • Simplified onSave function signature

Benefits

  • Reusability: The form component can now be used in mobile views and other contexts
  • Separation of concerns: Modal handles state/logic, form handles UI
  • Maintainability: Form changes are isolated to a single component
  • Type safety: Shared types ensure consistency

Testing

  • All lint checks pass
  • Typecheck passes
  • No functionality changes - existing behavior preserved
**Original Pull Request:** https://github.com/actualbudget/actual/pull/6150 **State:** closed **Merged:** Yes --- ## Summary This PR extracts the schedule edit form from `ScheduleEditModal` into a separate reusable component `ScheduleEditForm`. This refactoring enables the form to be reused in other contexts, particularly for the mobile schedules page. ## Changes - **Created `ScheduleEditForm.tsx`**: A new reusable component containing: - All form fields (name, payee, account, amount, date) - Transactions table with linked/matched mode switching - Footer buttons (Cancel/Save) with error display - `NoTransactionsMessage` component - **Updated `ScheduleEditModal.tsx`**: - Removed form UI code (moved to `ScheduleEditForm`) - Removed unused imports - Updated to use the new form component - Simplified `onSave` function signature ## Benefits - **Reusability**: The form component can now be used in mobile views and other contexts - **Separation of concerns**: Modal handles state/logic, form handles UI - **Maintainability**: Form changes are isolated to a single component - **Type safety**: Shared types ensure consistency ## Testing - ✅ All lint checks pass - ✅ Typecheck passes - ✅ No functionality changes - existing behavior preserved
GiteaMirror added the pull-request label 2026-02-28 21:27:09 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6354