Skip to content

fix(types): change types for SubMenu and ButtonProps#3723

Merged
rxri merged 1 commit intospicetify:mainfrom
sanoojes:main
Mar 7, 2026
Merged

fix(types): change types for SubMenu and ButtonProps#3723
rxri merged 1 commit intospicetify:mainfrom
sanoojes:main

Conversation

@sanoojes
Copy link
Contributor

@sanoojes sanoojes commented Mar 6, 2026

as per the title

Summary by CodeRabbit

  • Style
    • Updated type definitions for improved consistency and alignment with React's event handling standards. These changes enhance code quality and maintainability without altering functionality.

@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

TypeScript type definitions in globals.d.ts updated to align with React event types. SubMenu methods addItem and removeItem now explicitly declare void return types, and Button event handlers now use React-prefixed event types (React.MouseEvent and React.FocusEvent) instead of bare event types.

Changes

Cohort / File(s) Summary
TypeScript Type Definitions
globals.d.ts
SubMenu methods addItem and removeItem now explicitly return void. Button event handlers (onClick, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onFocus, onBlur) updated to use React-namespaced event types (React.MouseEvent<HTMLButtonElement> and React.FocusEvent<HTMLButtonElement>) instead of bare event types.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through types so fine,
MouseEvent becomes React's design,
Void returns now crystal clear,
Precision blooms when definitions appear! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: fixing type declarations for SubMenu and ButtonProps. It is specific, concise, and directly reflects the changeset modifications.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@rxri rxri changed the title fix(types): SubMenu and ButtonProps fix(types): change types for SubMenu and ButtonProps Mar 7, 2026
@rxri rxri merged commit 145ea33 into spicetify:main Mar 7, 2026
6 of 8 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.

2 participants