Skip to content

Revert "fix(ios): make ordering question drag-and-drop work on iOS Safari"#46

Merged
OlaszPL merged 1 commit into
mainfrom
revert-45-hotfix-ios
Jun 16, 2026
Merged

Revert "fix(ios): make ordering question drag-and-drop work on iOS Safari"#46
OlaszPL merged 1 commit into
mainfrom
revert-45-hotfix-ios

Conversation

@OlaszPL

@OlaszPL OlaszPL commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Reverts #45

Summary by CodeRabbit

  • Refactor
    • Reorganized the ordering question interface implementation.
    • Removed drag-and-drop library dependencies to reduce bundle size.

@OlaszPL
OlaszPL requested a review from Ki3mONo June 16, 2026 16:12
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The Ordering quiz component replaces its @dnd-kit sortable drag-and-drop implementation with a custom HTML5 drag-and-drop approach using local ordered/dragging state and a moveItem helper. The three @dnd-kit packages are simultaneously removed from package.json.

Changes

Ordering Component: dnd-kit → HTML5 Drag-and-Drop

Layer / File(s) Summary
Remove dnd-kit contracts, add local state and moveItem helper
frontend/app/components/quiz/questions/Ordering.tsx, frontend/package.json
Removes @dnd-kit sortable imports, the OrderedItem interface, the SortableRow component, and sensor/drag-end handler logic. Adds ordered and dragging local state plus a moveItem(from, to) helper that reorders via splice. Removes @dnd-kit/core, @dnd-kit/sortable, and @dnd-kit/utilities from package.json.
Rewrite render tree with native draggable rows
frontend/app/components/quiz/questions/Ordering.tsx
Replaces DndContext/SortableContext/SortableRow with ordered.map over plain draggable <div> elements. onDragStart sets the dragging index, onDragOver calls moveItem, and onDragEnd clears the dragging state. Visual styling is driven by the dragging index.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop hop, away with the old kit so grand,
I dragged and I dropped with my own fuzzy hand!
splice and setState, no sensors to find,
Just native HTML5, leaving dnd-kit behind.
The items line up as I wiggle and sort,
A leaner component — my favorite sport! 🥕

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reverting a previous fix for iOS Safari drag-and-drop functionality, which aligns with the changeset that removes dnd-kit dependencies and reverts the Ordering component to custom HTML5 drag-and-drop.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-45-hotfix-ios

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MichalTheProgrammer MichalTheProgrammer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That hot fix was cold

@OlaszPL
OlaszPL merged commit d5b9d40 into main Jun 16, 2026
4 of 5 checks passed
@OlaszPL
OlaszPL deleted the revert-45-hotfix-ios branch June 16, 2026 16:13
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.

2 participants