Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: fix drag and drop in FlatList while in strict mode #2413

Merged
merged 31 commits into from
Oct 12, 2022
Merged

Conversation

Forfold
Copy link
Contributor

@Forfold Forfold commented May 25, 2022

This PR fixes part of #2412 the drag and drop functionality when in Strict Mode by replacing the current DND library we use (react-beautiful-dnd) with react-dnd, as react-beautiful-dnd is no longer being maintained.

Also does some cleaning up in FlatList, simplifying some function calls and organizing the functions to make a bit more sense overall.

out of scope:

  • removing drag and drop from PolicyStepsCard
  • removing react-beautiful-dnd and @types/react-beautiful-dnd packages afterwards

@Forfold Forfold changed the title ui/: fix drag and drop in FlatList while in strict mode ui: fix drag and drop in FlatList while in strict mode May 25, 2022
@Forfold Forfold marked this pull request as ready for review June 6, 2022 19:21
tony-tvu
tony-tvu previously approved these changes Jun 16, 2022
Copy link
Collaborator

@tony-tvu tony-tvu left a comment

Choose a reason for hiding this comment

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

Functionally tested ✅

tony-tvu
tony-tvu previously approved these changes Jun 29, 2022
@Forfold
Copy link
Contributor Author

Forfold commented Jul 26, 2022

group review: reverse the states as in always show edit controls, toggle button hides them, and then shows drag handles. move edit toggle to the left/in line with avatars

@stale stale bot added the stale This is inactive label Sep 20, 2022
@stale stale bot removed the stale This is inactive label Oct 5, 2022
@target target deleted a comment from stale bot Oct 5, 2022
@Forfold Forfold requested review from KatieMSB and tony-tvu October 5, 2022 21:30
@Forfold
Copy link
Contributor Author

Forfold commented Oct 5, 2022

merged latest from master and wrapped up flipping the state of the toggle from the outcome of the group review, so this should be good to go again! @KatieMSB @tony-tvu

Copy link
Collaborator

@tony-tvu tony-tvu left a comment

Choose a reason for hiding this comment

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

I know we decided to use drag handles during mob review, but it looks like we can't drag and drop using only keyboard anymore after commit 1c49f10. This tradeoff might be worth considering if we go with the current solution.

@Forfold
Copy link
Contributor Author

Forfold commented Oct 7, 2022

good catch @tony-tvu! i think that's a focus issue- once focused on the list item you should be able to tab again to focus on the drag handle. when i migrated it to FlatList i forgot about that

tony-tvu
tony-tvu previously approved these changes Oct 7, 2022
Copy link
Collaborator

@tony-tvu tony-tvu left a comment

Choose a reason for hiding this comment

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

lgtm!

@Forfold
Copy link
Contributor Author

Forfold commented Oct 7, 2022

whoops, needed to update the tests too @tony-tvu my bad! should be good to go now. running a full make check on my end to make sure the rest passes

@Forfold Forfold requested a review from tony-tvu October 7, 2022 21:02
Forfold and others added 2 commits October 12, 2022 09:07
@target target deleted a comment from github-actions bot Oct 12, 2022
@Forfold Forfold merged commit 3d7d51d into master Oct 12, 2022
@Forfold Forfold deleted the react-dnd branch October 12, 2022 21:03
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