feat(editor): add always-use-pointer-cursor toggle#539
feat(editor): add always-use-pointer-cursor toggle#539definitelynotchirag wants to merge 2 commits into
Conversation
Adds a toggle in the editor's Cursor settings panel that overrides every captured cursor type with the pointer (hand) cursor at playback and export time, eliminating cursor-shape flicker on text inputs and links. Closes webadderallorg#515
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an editor preference to always force the pointer cursor and threads it through preferences, project persistence, preview playback (cursor overlay), export pipelines (GIF/MP4/frame rendering/telemetry), and the localized SettingsPanel toggle. ChangesAlways use pointer cursor feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@src/components/video-editor/VideoEditor.tsx`:
- Line 4290: The handleExport useCallback is missing alwaysUsePointerCursor in
its dependency array which can cause stale values when building GIF/MP4 configs
inside handleExport; update the dependency array of the useCallback named
handleExport (the array near where effectiveShowCursor is listed) to include
alwaysUsePointerCursor so the GIF export branch (uses alwaysUsePointerCursor at
the GIF config) and the MP4 export branch (uses alwaysUsePointerCursor at the
MP4 config) always see the latest value when invoked.
- Line 1270: captureProjectThumbnail (the useCallback defined around lines
1338–1385) reads the alwaysUsePointerCursor variable but that identifier is
missing from the hook's dependency array, which can cause stale closures; update
the dependency array for captureProjectThumbnail to include
alwaysUsePointerCursor (alongside effectiveShowCursor) so the callback is
recreated when the setting changes, ensuring the thumbnail capture uses the
current value.
🪄 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 Plus
Run ID: 8e77bbd4-125a-453f-956f-65a18227df52
📒 Files selected for processing (22)
src/components/video-editor/SettingsPanel.tsxsrc/components/video-editor/VideoEditor.tsxsrc/components/video-editor/VideoPlayback.tsxsrc/components/video-editor/editorPreferences.tssrc/components/video-editor/projectPersistence.tssrc/components/video-editor/videoPlayback/cursorRenderer.tssrc/i18n/locales/en/settings.jsonsrc/i18n/locales/es/settings.jsonsrc/i18n/locales/fr/settings.jsonsrc/i18n/locales/it/settings.jsonsrc/i18n/locales/ko/settings.jsonsrc/i18n/locales/nl/settings.jsonsrc/i18n/locales/pt-BR/settings.jsonsrc/i18n/locales/ru/settings.jsonsrc/i18n/locales/zh-CN/settings.jsonsrc/i18n/locales/zh-TW/settings.jsonsrc/lib/exporter/frameRenderer.tssrc/lib/exporter/gifExporter.tssrc/lib/exporter/modernFrameRenderer.tssrc/lib/exporter/modernVideoExporter.tssrc/lib/exporter/nativeStaticLayoutTelemetry.tssrc/lib/exporter/videoExporter.ts
Adds the flag to captureProjectThumbnail and handleExport useCallback dependency arrays so thumbnail capture and export pick up the latest value after the user toggles the setting.
|
@webadderall @ExtraBinoss I have added an Always use pointer cursor toggle as referenced in #515. Please review when you have a moment. Thank you! |
Description
Adds an Always use pointer cursor toggle to the editor's Cursor settings panel. When enabled, every cursor sample is rendered as the pointer (hand) cursor, eliminating cursor-shape flicker over text inputs, links and other interactive elements.
Motivation
Resolves #515. Frequent cursor-type switches between pointer / I-beam / arrow create visual noise during animated playback. Applying the override at playback/export time (not capture) means it also works on existing recordings.
Type of Change
Related Issue(s)
Closes #515
Screenshots / Video
Recording:
alwaysusepointer.mov