Skip to content

Conversation

giemic8
Copy link
Collaborator

@giemic8 giemic8 commented Aug 11, 2025

Changes

  • Automatically opens parent folders when navigating to nested requests

  • Hotkeys are disabled when typing in input fields to prevent conflicts

  • Created useGlobalHotkeys hook with configurable callback props

  • Ensured hotkeys work globally across the application while respecting user input contexts

Closed #446

Testing

On Mac

Checklist

  • Issue has been linked to this PR
  • Code has been reviewed by person creating the PR
  • Automated tests have been written, if possible
  • Manual testing has been performed
  • Documentation has been updated, if necessary
  • Changes have been reviewed by second person

@SoulKa SoulKa self-requested a review August 11, 2025 06:33
Comment on lines 20 to 23
const selectedRequestId = useCollectionStore((state) => state.selectedRequestId);
const collection = useCollectionStore((state) => state.collection);
const currentRequest = useCollectionStore(selectRequest);
const folders = useCollectionStore((state) => state.folders);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this seems quite inefficient as it would trigger a rerender every time anything changes. However, we only need the information once a hotkey was triggered. You can instead use useCollectionStore.state I think. This is the getter that does not trigger a rerender.

if (child.type === 'request') {
result.push(child.id);
} else if (child.type === 'folder') {
result.push(...getAllRequestsInOrder(child.children || []));
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's with children of children? This for loop only goes one level deep

@SoulKa SoulKa marked this pull request as draft August 11, 2025 12:57
@giemic8 giemic8 force-pushed the feature/446-add-hotkey-actions branch from f6f3f37 to 9f6eec4 Compare October 8, 2025 20:38
@giemic8 giemic8 force-pushed the feature/446-add-hotkey-actions branch from 62c73f8 to 84d47dc Compare October 13, 2025 19:50
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.

Hotkeys for common actions

2 participants