Skip to content

Comments

265 Replace Long Press Edit Delete With Drag And Drop Edit Mode And Haptic Feedback#266

Open
ZanderCowboy wants to merge 4 commits intodevelopfrom
265-replace-long-press-editdelete-with-drag-and-drop-edit-mode-and-haptic-feedback
Open

265 Replace Long Press Edit Delete With Drag And Drop Edit Mode And Haptic Feedback#266
ZanderCowboy wants to merge 4 commits intodevelopfrom
265-replace-long-press-editdelete-with-drag-and-drop-edit-mode-and-haptic-feedback

Conversation

@ZanderCowboy
Copy link
Owner

@ZanderCowboy ZanderCowboy commented Feb 9, 2026

#265 Replace Long Press Edit Delete With Drag And Drop Edit Mode And Haptic Feedback

Summary

Replaced redundant long-press behaviors (delete for collections, menu for items) with a new long-press gesture that triggers drag-and-drop edit mode with haptic feedback. This improves UX by consolidating edit/delete actions in the DetailsPage while providing an intuitive way to enter edit mode.

Changes

  • Removed long-press delete behavior from collections (redundant with DetailsPage)
  • Removed long-press menu behavior from items (redundant with DetailsPage)
  • Implemented long-press gesture to trigger drag-and-drop edit mode for both collections and items
  • Added haptic feedback when entering edit mode via long-press
  • Added VIBRATE permission to AndroidManifest for haptic feedback support
  • Updated RefreshIndicator to use theme colors (ternary for indicator, background for background)
  • Increased drag handle icon sizes and adjusted padding for better visibility
  • Updated refresh snackbar text and icon sizes for improved readability

Testing

  • Verified long-press on collections enters edit mode with haptic feedback
  • Verified long-press on items enters edit mode with haptic feedback
  • Verified tap navigation to DetailsPage still works when not in edit mode
  • Verified tap is disabled when in edit mode (existing behavior)
  • Verified drag handles appear when edit mode is active
  • Verified no delete confirmation appears on long-press
  • Verified no menu appears on long-press for items
  • Verified haptic feedback only triggers when entering edit mode (not when already in edit mode)

Screenshots/Videos

Feature Screenshot/Video
Long-press to edit mode
draggable.long.press.webm
Haptic feedback
Drag handles in edit mode

@ZanderCowboy ZanderCowboy added the feature Create a new feature label Feb 9, 2026
@ZanderCowboy ZanderCowboy self-assigned this Feb 9, 2026
@ZanderCowboy ZanderCowboy requested a review from Copilot February 9, 2026 21:56
@ZanderCowboy ZanderCowboy marked this pull request as ready for review February 9, 2026 21:59
Copy link
Contributor

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

This PR updates the Home screen interaction model by replacing the previous long-press delete/menu behaviors on collections/items with a long-press gesture that enters drag-and-drop edit mode and triggers haptic feedback, aligning with the newer DetailsPage-based edit/delete flows.

Changes:

  • Replaced long-press behaviors on collections and entries with “enter edit mode” + haptic feedback.
  • Updated drag-handle sizing/padding for better visibility in edit mode.
  • Updated RefreshIndicator theming and refreshed snackbar styling; added Android VIBRATE permission.

Reviewed changes

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

Show a summary per file
File Description
apps/multichoice/lib/presentation/home/widgets/entry_card.dart Long-press now enters edit mode with haptics; drag-handle UI tweaks.
apps/multichoice/lib/presentation/home/widgets/collection_tab.dart Long-press delete removed; long-press now enters edit mode with haptics.
apps/multichoice/lib/presentation/home/home_page.dart Adds services import to support haptic feedback used by part files.
apps/multichoice/lib/layouts/home_layout/widgets/tab/vertical_tab.dart Drag-handle padding/size adjustments.
apps/multichoice/lib/layouts/home_layout/widgets/tab/horizontal_tab.dart Drag-handle padding/size adjustments; subtitle layout tweak.
apps/multichoice/lib/layouts/home_layout/widgets/home/vertical_home.dart RefreshIndicator updated to use theme colors.
apps/multichoice/lib/layouts/home_layout/widgets/home/horizontal_home.dart RefreshIndicator updated to use theme colors.
apps/multichoice/lib/layouts/home_layout/home_layout.dart Refresh snackbar text/icon styling updated.
apps/multichoice/android/app/src/main/AndroidManifest.xml Adds VIBRATE permission.
CHANGELOG.md Documents #265 changes.

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

Comment on lines +73 to +79
onLongPress: () async {
final bloc = context.read<HomeBloc>();
if (!bloc.state.isEditMode) {
await HapticFeedback.mediumImpact();
bloc.add(const HomeEvent.onToggleEditMode());
}
},
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

EntryCard still wraps its content in a MenuAnchor with menuChildren, but the menu is no longer opened anywhere now that the long-press handler was repurposed. This leaves an unreachable context menu (and an effectively unused MenuController), which is confusing and adds dead UI/code. Either remove the MenuAnchor/menu items entirely (if DetailsPage is the only edit/delete surface now) or add an explicit, discoverable affordance to open the menu (e.g., an overflow icon) so the actions remain accessible.

Copilot uses AI. Check for mistakes.
Comment on lines 40 to 48
GestureDetector(
onTap: () {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
},
child: Icon(
Icons.close,
color: context.theme.appColors.ternary,
size: 16,
size: 20,
),
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The SnackBar close control is implemented as a GestureDetector wrapping an Icon, which doesn’t provide button semantics by default for assistive technologies. Since this block is being updated, consider using an IconButton (or adding an explicit Semantics label/role) so the dismiss action is keyboard/screen-reader accessible.

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

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

Labels

feature Create a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant