Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enhance shortcut handling for OS compatibility #2576

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

kovsu
Copy link
Contributor

@kovsu kovsu commented Jan 15, 2025

Description

https://discord.com/channels/1243823539426033696/1319455653005230191/1328696880154022010

PR Type

  • Feature
  • Bugfix
  • Hotfix
  • Other (please describe):

Screenshots (if UI change)

Demo Video (if new feature)

Linked Issues

Additional context

Changelog

  • I have updated the changelog/next.md with my changes.

@follow-reviewer-bot
Copy link

Thank you for your contribution. We will review it promptly.

Copy link

vercel bot commented Jan 15, 2025

@kovsu is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

@follow-reviewer-bot
Copy link

Suggested PR Title:

fix: enhance shortcut handling for OS compatibility

Change Summary:
Refactored shortcut handling to improve OS compatibility by introducing a new utility function transfromShortcut. Updated context menu and shortcut definitions to utilize this function, ensuring consistent shortcut behavior across platforms. Reduced redundant code and improved maintainability by centralizing shortcut processing logic.

Code Review:

  • File: apps/renderer/src/constants/shortcuts.ts

    • Lines: Multiple (all transfromShortcut usages)
    • Issue: The function name transfromShortcut appears to be a typo and should likely be transformShortcut. This doesn't adhere to standard naming conventions and could lead to confusion.
    • Change Request: Rename the function transfromShortcut to transformShortcut and update all its usages accordingly.
  • File: packages/utils/src/utils.ts

    • Line: 250
    • Issue: The function name transfromShortcut appears to be a typo and should likely be transformShortcut. This doesn't adhere to standard naming conventions and could lead to confusion.
    • Change Request: Rename the function transfromShortcut to transformShortcut.

No other change requests necessary.

@kovsu kovsu changed the title feat: add transfromShortcut function fix: enhance shortcut handling for OS compatibility Jan 15, 2025
@kovsu kovsu marked this pull request as draft January 15, 2025 07:52
@kovsu kovsu marked this pull request as ready for review January 15, 2025 08:15
return result
}

export const shortcuts = transformShortcuts(shortcutConfigs)
Copy link
Member

Choose a reason for hiding this comment

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

This results in the loss of the original type. We need the type to be inferred with the key

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