Skip to content

Fixed slider#51

Merged
niklabh merged 1 commit into
mainfrom
slider
Jun 11, 2026
Merged

Fixed slider#51
niklabh merged 1 commit into
mainfrom
slider

Conversation

@niklabh

@niklabh niklabh commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Sliders now support smooth dragging functionality with real-time value updates as you move across the range.
    • Slider values are properly constrained to valid minimum and maximum bounds during interaction.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7a081ab0-a223-4744-b85d-983966bc60c4

📥 Commits

Reviewing files that changed from the base of the PR and between 93336c3 and 69d60fb.

📒 Files selected for processing (1)
  • oxide-browser/src/ui.rs

📝 Walkthrough

Walkthrough

This PR implements interactive slider dragging for the oxide-browser UI. Previously, sliders updated only on click; now they track an in-progress drag state and continuously update as the user moves the mouse while holding the left button down.

Changes

Slider drag interaction

Layer / File(s) Summary
Slider drag state
oxide-browser/src/ui.rs
OxideBrowserView adds a slider_drag field storing the active slider's widget id, x-bounds, and value range; initialized to None in new().
Mouse drag event handlers
oxide-browser/src/ui.rs
On left mouse down, render_slider sets slider_drag and computes the initial slider value. During mouse move, canvas updates widget_states with a new float value clamped to the slider's stored min/max range. On mouse button release, slider_drag is cleared.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A slider that glides with each drag of the mouse,
No more lonely clicks—now the cursor has house!
From press unto release, the values flow free,
Interactive magic for you and for me!

✨ 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 slider

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.

@niklabh niklabh merged commit 29cd898 into main Jun 11, 2026
4 of 5 checks passed
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.

1 participant