Skip to content

[RDE-90] fix(ios): drag and drop question#49

Merged
Ki3mONo merged 5 commits into
mainfrom
maciek/rde-90-ios-drag-and-drop-nie-dziala-przez-webkit
Jun 20, 2026
Merged

[RDE-90] fix(ios): drag and drop question#49
Ki3mONo merged 5 commits into
mainfrom
maciek/rde-90-ios-drag-and-drop-nie-dziala-przez-webkit

Conversation

@Ki3mONo

@Ki3mONo Ki3mONo commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Enhanced the reliability and responsiveness of drag-and-drop reordering for quiz questions to provide a smoother user experience.

@Ki3mONo
Ki3mONo requested a review from OlaszPL June 20, 2026 19:45
@linear-code

linear-code Bot commented Jun 20, 2026

Copy link
Copy Markdown

RDE-90

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Ki3mONo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 51 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a92fbbe2-5e99-417f-9065-30142574ed69

📥 Commits

Reviewing files that changed from the base of the PR and between 44e5d5d and 7d9db6d.

📒 Files selected for processing (1)
  • frontend/app/components/quiz/questions/Ordering.tsx

Walkthrough

The Ordering.tsx quiz component replaces its HTML5 drag-and-drop implementation with a pointer event-based approach. A list container ref (listRef) and a mutable dragged-index ref (draggingRef) are added, and new handlers (startDrag, onDragMove, endDrag) use pointer capture and row hit-testing to drive reordering. Row markup is updated to use pointer events instead of drag attributes.

Changes

Pointer-driven drag reorder in Ordering component

Layer / File(s) Summary
Pointer drag handlers and refs
frontend/app/components/quiz/questions/Ordering.tsx
Adds useRef import; introduces listRef (list container) and draggingRef (dragged index); updates moveItem to functional state updates; implements rowUnderPointer, startDrag, onDragMove, and endDrag using pointer capture for reliable drag tracking across devices.
Row markup: pointer events
frontend/app/components/quiz/questions/Ordering.tsx
Attaches ref={listRef} to the list container; removes draggable, onDragStart, onDragOver, onDragEnd; wires onPointerDown, onPointerMove, onPointerUp, onPointerCancel; adds touch/drag-friendly cursor and user-select classNames.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • rdest-devs/cogniro#45: Directly modifies the same Ordering.tsx file to replace HTML5 drag handlers with a pointer/touch-based approach, addressing the same iOS/touch reordering issue.
  • rdest-devs/cogniro#46: Also modifies Ordering.tsx drag-and-drop logic, changing the prior iOS Safari drag implementation in a way that connects directly to the drag handler evolution this PR continues.

Suggested reviewers

  • MichalTheProgrammer

Poem

🐇 No more dragging the HTML way,
Pointer events have come to play!
listRef watches, draggingRef knows,
Which row the fuzzy bunny goes.
Touch or mouse, it reorders with glee—
Hop hop hop, in perfect sequence! 🎉

🚥 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 accurately describes the main change: fixing drag-and-drop functionality for iOS by replacing HTML5 drag-and-drop with pointer-driven implementation.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch maciek/rde-90-ios-drag-and-drop-nie-dziala-przez-webkit

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/app/components/quiz/questions/Ordering.tsx`:
- Around line 103-110: The reordering rows in the Ordering component contain
only pointer event handlers (onPointerDown, onPointerMove, onPointerUp,
onPointerCancel) on a non-focusable div element, making the feature inaccessible
to keyboard-only users. Make the div element focusable by adding the appropriate
tabIndex attribute, then add keyboard event handlers (such as onKeyDown) to
support keyboard navigation and reordering using arrow keys. Ensure the keyboard
interaction follows standard accessibility patterns for reorderable list items
so that keyboard users can complete the question flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9b7c0534-c17f-4408-9ed8-466329e39b60

📥 Commits

Reviewing files that changed from the base of the PR and between 420d0f3 and 44e5d5d.

📒 Files selected for processing (1)
  • frontend/app/components/quiz/questions/Ordering.tsx

Comment thread frontend/app/components/quiz/questions/Ordering.tsx Outdated
@Ki3mONo

Ki3mONo commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

Remove comments. They only make the readability worse. LGTM, lets test on prod. Make sure that it works when the list is very long, so you need to scroll, it might trigger reordering.

@Ki3mONo

Ki3mONo commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Ki3mONo
Ki3mONo merged commit 6486742 into main Jun 20, 2026
5 checks passed
@Ki3mONo
Ki3mONo deleted the maciek/rde-90-ios-drag-and-drop-nie-dziala-przez-webkit branch June 20, 2026 20:38
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