Skip to content

feat: Ctrl+Click on a slider in the inspector resets value to default - #73

Open
PlkMarudny wants to merge 1 commit into
ronak-create:mainfrom
PlkMarudny:slider-reset
Open

feat: Ctrl+Click on a slider in the inspector resets value to default#73
PlkMarudny wants to merge 1 commit into
ronak-create:mainfrom
PlkMarudny:slider-reset

Conversation

@PlkMarudny

@PlkMarudny PlkMarudny commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

In the inspector, Ctrl+Click resets a slider's value to default.

Type of change

  • Bug fix
  • New feature (transition / preset / text anim / effect / API)
  • Docs
  • Refactor / internal

How was it verified?

  • npm test passes (CI runs it on Node 18 / 20 / 22)
  • Added or updated a test in test/ if this touches the MCP surface, the REST API, or the SVG library
  • Opened the editor and confirmed the change in preview
  • Confirmed the change in an export (fast or realtime), if it affects rendering
  • Updated CLAUDE.md / README.md if the schema, props, or API changed

Checklist

  • No new runtime dependencies added
  • Preview and export render identically (single compositor)
  • Commits are focused and messages are descriptive

Summary by CodeRabbit

  • New Features

    • Ctrl/Cmd-clicking an inspector slider now resets the property to its default and clears its keyframes, matching label behavior.
    • Reset support is available for properties such as scale, opacity, and brightness.
  • Documentation

    • Updated the README and keyboard shortcut help to document resetting properties via inspector labels or sliders.
    • Added tooltips describing the Ctrl/Cmd-click reset action.
  • Tests

    • Added coverage verifying slider reset behavior and its related UI guidance.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 541b3b9c-c7c0-4a5e-bad2-9b119836bc1b

📥 Commits

Reviewing files that changed from the base of the PR and between b45951c and e24c2e0.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • app.js
  • index.html
  • test/assets.test.js

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Ctrl/Cmd-clicking an inspector slider now resets its property to the default and clears its keyframes. Shared reset logic handles label and slider interactions. Documentation and asset tests describe and verify the updated shortcut.

Changes

Inspector reset interaction

Layer / File(s) Summary
Shared property reset logic
app.js
Adds applyInspectorReset for undo, channel-wide or playhead-local resets, refusal feedback, saving, and inspector rendering. Label resets and slider tooltips use the shared behavior.
Slider gesture and reset documentation
app.js, index.html, README.md, CHANGELOG.md, test/assets.test.js
Ctrl/Cmd-click on range inputs triggers a channel-wide reset through a capture-phase listener. The context menu is suppressed, and documentation and tests describe the interaction.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: ronak-create

Sequence Diagram(s)

sequenceDiagram
  participant Inspector
  participant applyInspectorReset
  participant SelectedClip
  participant InspectorView
  Inspector->>Inspector: Capture Ctrl/Cmd pointerdown on range input
  Inspector->>applyInspectorReset: Reset slider property
  applyInspectorReset->>SelectedClip: resetPropChannel
  applyInspectorReset->>SelectedClip: Save updated clip state
  applyInspectorReset->>InspectorView: Re-render inspector
Loading

Merge Risk: ⚪ Minimal · up to e24c2

Ctrl/Cmd-clicking an inspector slider now resets the property to its default and clears keyframes. The change is ready to merge with no known production-impacting risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 and concisely describes the main change: Ctrl-clicking an inspector slider resets its value to the default.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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