Repository navigation
Open desktop folder picker immediately when adding projects in Electron #697
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
Changes from 1 commit
56023cc
0bc5934
70c4035
2b6e011
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { describe, expect, it } from "vitest"; | ||
| import { shouldOpenProjectFolderPickerImmediately } from "./Sidebar.logic"; | ||
|
|
||
| describe("shouldOpenProjectFolderPickerImmediately", () => { | ||
| it("opens the folder picker immediately in Electron on desktop", () => { | ||
| expect( | ||
| shouldOpenProjectFolderPickerImmediately({ | ||
| isElectron: true, | ||
| isMobile: false, | ||
| }), | ||
| ).toBe(true); | ||
| }); | ||
|
|
||
| it("keeps manual project entry on mobile Electron layouts", () => { | ||
| expect( | ||
| shouldOpenProjectFolderPickerImmediately({ | ||
| isElectron: true, | ||
| isMobile: true, | ||
| }), | ||
| ).toBe(false); | ||
| }); | ||
|
|
||
| it("keeps manual project entry outside Electron", () => { | ||
| expect( | ||
| shouldOpenProjectFolderPickerImmediately({ | ||
| isElectron: false, | ||
| isMobile: false, | ||
| }), | ||
| ).toBe(false); | ||
| }); | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| export function shouldOpenProjectFolderPickerImmediately(input: { | ||
| isElectron: boolean; | ||
| isMobile: boolean; | ||
| }): boolean { | ||
| return input.isElectron && !input.isMobile; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing
|
||


Uh oh!
There was an error while loading. Please reload this page.