Skip to content

Conversation

@jjoonleo
Copy link
Contributor

@jjoonleo jjoonleo commented Dec 31, 2025

Describe your changes

준비과정 form에서 non-dismissible 옵션을 삭제하였습니다.

Issue ticket number and link

#334

Checklist before requesting a review

Screenshots (if appropriate):


Note

Unifies the preparation step list implementation and streamlines deletion behavior.

  • Removes enableDismissible option from PreparationFormCreateList and deletes preparation_form_reorderable_list_dissmissible.dart; always uses PreparationFormReorderableList
  • Switches item deletion to SwipeActionCell with a trailing delete action (blocked when only one item remains); retains reorder, name, and time change events
  • Updates usages (e.g., PreparationSpareTimeEditScreen) to drop the removed prop
  • Router: /preparationEdit now defaults to PreparationEntity(preparationStepList: []) when state.extra is null
  • Minor formatting tidy in ScheduleSpareAndPreparingTimeForm

Written by Cursor Bugbot for commit ec26d8a. This will update automatically on new commits. Configure here.

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit ec26d8a):

https://ontime-c63f1--pr335-334-remove-option-fo-vf2sj1be.web.app

(expires Wed, 07 Jan 2026 08:34:09 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7d60a2eae4c4a5839220ed6a57552a3b61cce5a3

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

trailingActions: [
SwipeAction(
onTap: (controller) {
if (preparationStepList.length <= 1) return;
Copy link

Choose a reason for hiding this comment

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

Swipe action cell stays open when delete is prevented

When preparationStepList.length <= 1, the onTap handler returns early without using the controller to close the SwipeActionCell. This leaves the swipe action in its open state (red delete button visible) after the user taps it, but the deletion is prevented. The original Dismissible implementation properly handled this case by returning false from confirmDismiss, which would animate the item back to closed. The controller parameter should be used to close the cell when the delete action is not performed.

Fix in Cursor Fix in Web

builder: (context, state) => PreparationEditForm(
preparationEntity: state.extra as PreparationEntity)),
preparationEntity: (state.extra as PreparationEntity?) ??
const PreparationEntity(preparationStepList: []))),
Copy link

Choose a reason for hiding this comment

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

Silent fallback masks missing navigation data errors

The change from state.extra as PreparationEntity to (state.extra as PreparationEntity?) ?? const PreparationEntity(preparationStepList: []) silently provides an empty entity when navigation occurs without proper data. The calling code in ScheduleSpareAndPreparingTimeForm passes state.preparation which can be null. Previously this would crash (making the bug obvious); now users may see an unexpectedly empty form. This change doesn't appear related to the PR's stated purpose of removing the non-dismissible option, and could mask navigation bugs.

Fix in Cursor Fix in Web

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit ec26d8a):

https://on-time-front-widgetbook--pr335-334-remove-option-fo-xvdtitq9.web.app

(expires Wed, 07 Jan 2026 08:34:59 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e53128a376fed0209d449279de9c0d94c83cdd8b

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.

Remove option for non-dismissible Preparation Form Create List

2 participants