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

feat: Make it possible to open Settings with specific tab selected #551

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

cristianoventura
Copy link
Collaborator

Description

This PR changes how the state of the Settings dialog is controlled, allowing it to open with a specific tab selected. This change improves usability in the Recording screen when a browser can't be found or when a browser fails to launch (#535)

How to Test

  • Mock this line to return false
    return browserPath !== ''
  • Open the Recorder and click "Settings"
  • Check that the Recorder tab is automatically selected

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (npm run lint) and all checks pass.
  • I have run tests locally (npm test) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Screenshots (if appropriate):

Screen.Recording.2025-03-11.at.5.14.25.PM.mov

Related PR(s)/Issue(s)

Resolves #525

@cristianoventura cristianoventura self-assigned this Mar 11, 2025
@cristianoventura cristianoventura requested a review from a team as a code owner March 11, 2025 21:18
Comment on lines +17 to +18
openSettingsDialog: (tab?: SettingsTabValue) => void
closeSettingsDialog: () => void
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I decomposed setIsSettingsDialogOpen into separate methods which makes open/close more explicit. It allows (optionally) passing a specific tab only when openSettingsDialog is called.

Copy link
Collaborator

@going-confetti going-confetti left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Member

@Llandy3d Llandy3d left a comment

Choose a reason for hiding this comment

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

🙌

@cristianoventura cristianoventura merged commit 9260004 into main Mar 12, 2025
3 checks passed
@cristianoventura cristianoventura deleted the feat/open-settings-specific-tab branch March 12, 2025 12:43
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.

Make it possible to open Settings with specific tab selected
3 participants