feat(app): add Mod+W close-tab shortcut for desktop, simplify Android build scripts, and use universal DMG download
This commit is contained in:
@@ -141,12 +141,15 @@ From `packages/app`:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# development (debug)
|
# development (debug)
|
||||||
APP_VARIANT=development npx expo prebuild --platform android --clean --non-interactive
|
APP_VARIANT=development npx expo prebuild --platform android --non-interactive
|
||||||
APP_VARIANT=development npx expo run:android --variant=debug
|
APP_VARIANT=development npx expo run:android --variant=debug
|
||||||
|
|
||||||
# production (release)
|
# production (release)
|
||||||
APP_VARIANT=production npx expo prebuild --platform android --clean --non-interactive
|
APP_VARIANT=production npx expo prebuild --platform android --non-interactive
|
||||||
APP_VARIANT=production npx expo run:android --variant=release
|
APP_VARIANT=production npx expo run:android --variant=release
|
||||||
|
|
||||||
|
# clean native project (when needed)
|
||||||
|
npx expo prebuild --platform android --clean --non-interactive
|
||||||
```
|
```
|
||||||
|
|
||||||
From repo root:
|
From repo root:
|
||||||
@@ -154,9 +157,10 @@ From repo root:
|
|||||||
```bash
|
```bash
|
||||||
npm run android:development
|
npm run android:development
|
||||||
npm run android:production
|
npm run android:production
|
||||||
|
npm run android:clean
|
||||||
```
|
```
|
||||||
|
|
||||||
`npm run android:prod` and `npm run android:release` are aliases for `npm run android:production`.
|
`npm run android:release` is an alias for `npm run android:production`.
|
||||||
|
|
||||||
### Cloud build + submit (EAS Workflows)
|
### Cloud build + submit (EAS Workflows)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -26,9 +26,9 @@
|
|||||||
"start": "npm run start --workspace=@getpaseo/server",
|
"start": "npm run start --workspace=@getpaseo/server",
|
||||||
"android": "npm run android --workspace=@getpaseo/app",
|
"android": "npm run android --workspace=@getpaseo/app",
|
||||||
"android:development": "npm run android:development --workspace=@getpaseo/app",
|
"android:development": "npm run android:development --workspace=@getpaseo/app",
|
||||||
"android:prod": "npm run android:prod --workspace=@getpaseo/app",
|
|
||||||
"android:production": "npm run android:production --workspace=@getpaseo/app",
|
"android:production": "npm run android:production --workspace=@getpaseo/app",
|
||||||
"android:release": "npm run android:prod --workspace=@getpaseo/app",
|
"android:release": "npm run android:production --workspace=@getpaseo/app",
|
||||||
|
"android:clean": "npm run android:clean --workspace=@getpaseo/app",
|
||||||
"ios": "npm run ios --workspace=@getpaseo/app",
|
"ios": "npm run ios --workspace=@getpaseo/app",
|
||||||
"web": "npm run web --workspace=@getpaseo/app",
|
"web": "npm run web --workspace=@getpaseo/app",
|
||||||
"dev:desktop": "npm run dev --workspace=@getpaseo/desktop",
|
"dev:desktop": "npm run dev --workspace=@getpaseo/desktop",
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
"start": "expo start",
|
"start": "expo start",
|
||||||
"reset-project": "node ./scripts/reset-project.js",
|
"reset-project": "node ./scripts/reset-project.js",
|
||||||
"android": "npm run android:development",
|
"android": "npm run android:development",
|
||||||
"android:development": "APP_VARIANT=development expo prebuild --platform android --clean --non-interactive && APP_VARIANT=development expo run:android --variant=debug",
|
"android:development": "APP_VARIANT=development expo prebuild --platform android --non-interactive && APP_VARIANT=development expo run:android --variant=debug",
|
||||||
"android:production": "APP_VARIANT=production expo prebuild --platform android --clean --non-interactive && APP_VARIANT=production expo run:android --variant=release",
|
"android:production": "APP_VARIANT=production expo prebuild --platform android --non-interactive && APP_VARIANT=production expo run:android --variant=release",
|
||||||
"android:prod": "npm run android:production",
|
|
||||||
"android:release": "npm run android:production",
|
"android:release": "npm run android:production",
|
||||||
|
"android:clean": "expo prebuild --platform android --clean --non-interactive",
|
||||||
"ios": "expo run:ios",
|
"ios": "expo run:ios",
|
||||||
"ios:release": "expo run:ios --configuration Release",
|
"ios:release": "expo run:ios --configuration Release",
|
||||||
"web": "expo start --web",
|
"web": "expo start --web",
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ describe("keyboard-shortcuts", () => {
|
|||||||
expect(match?.action).toBe("workspace.tab.new");
|
expect(match?.action).toBe("workspace.tab.new");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("matches Alt+Shift+W to close current tab", () => {
|
it("matches Alt+Shift+W to close current tab on web", () => {
|
||||||
const match = resolveKeyboardShortcut({
|
const match = resolveKeyboardShortcut({
|
||||||
event: keyboardEvent({
|
event: keyboardEvent({
|
||||||
key: "W",
|
key: "W",
|
||||||
@@ -208,7 +208,20 @@ describe("keyboard-shortcuts", () => {
|
|||||||
altKey: true,
|
altKey: true,
|
||||||
shiftKey: true,
|
shiftKey: true,
|
||||||
}),
|
}),
|
||||||
context: shortcutContext(),
|
context: shortcutContext({ isTauri: false }),
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(match?.action).toBe("workspace.tab.close.current");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("matches Mod+W to close current tab on tauri", () => {
|
||||||
|
const match = resolveKeyboardShortcut({
|
||||||
|
event: keyboardEvent({
|
||||||
|
key: "w",
|
||||||
|
code: "KeyW",
|
||||||
|
metaKey: true,
|
||||||
|
}),
|
||||||
|
context: shortcutContext({ isMac: true, isTauri: true }),
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(match?.action).toBe("workspace.tab.close.current");
|
expect(match?.action).toBe("workspace.tab.close.current");
|
||||||
@@ -348,6 +361,11 @@ describe("keyboard-shortcut help sections", () => {
|
|||||||
"shift",
|
"shift",
|
||||||
"1-9",
|
"1-9",
|
||||||
]);
|
]);
|
||||||
|
expect(findRow(sections, "workspace-tab-close-current")?.keys).toEqual([
|
||||||
|
"alt",
|
||||||
|
"shift",
|
||||||
|
"W",
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("uses tauri defaults for workspace and tab jump", () => {
|
it("uses tauri defaults for workspace and tab jump", () => {
|
||||||
@@ -359,6 +377,10 @@ describe("keyboard-shortcut help sections", () => {
|
|||||||
expect(findRow(sections, "new-agent")?.keys).toEqual(["mod", "shift", "O"]);
|
expect(findRow(sections, "new-agent")?.keys).toEqual(["mod", "shift", "O"]);
|
||||||
expect(findRow(sections, "workspace-jump-index")?.keys).toEqual(["mod", "1-9"]);
|
expect(findRow(sections, "workspace-jump-index")?.keys).toEqual(["mod", "1-9"]);
|
||||||
expect(findRow(sections, "workspace-tab-jump-index")?.keys).toEqual(["alt", "1-9"]);
|
expect(findRow(sections, "workspace-tab-jump-index")?.keys).toEqual(["alt", "1-9"]);
|
||||||
|
expect(findRow(sections, "workspace-tab-close-current")?.keys).toEqual([
|
||||||
|
"mod",
|
||||||
|
"W",
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("uses mod+period as non-mac left sidebar shortcut", () => {
|
it("uses mod+period as non-mac left sidebar shortcut", () => {
|
||||||
|
|||||||
@@ -155,7 +155,24 @@ const SHORTCUT_BINDINGS: readonly KeyboardShortcutBinding[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "workspace-tab-close-current-alt-shift-w",
|
id: "workspace-tab-close-current-mod-w-tauri",
|
||||||
|
action: "workspace.tab.close.current",
|
||||||
|
matches: (event) =>
|
||||||
|
isMod(event) &&
|
||||||
|
!event.altKey &&
|
||||||
|
!event.shiftKey &&
|
||||||
|
(event.code === "KeyW" || event.key.toLowerCase() === "w"),
|
||||||
|
when: (context) => context.isTauri && !context.commandCenterOpen,
|
||||||
|
help: {
|
||||||
|
id: "workspace-tab-close-current",
|
||||||
|
section: "global",
|
||||||
|
label: "Close current tab",
|
||||||
|
keys: ["mod", "W"],
|
||||||
|
when: (context) => context.isTauri,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "workspace-tab-close-current-alt-shift-w-web",
|
||||||
action: "workspace.tab.close.current",
|
action: "workspace.tab.close.current",
|
||||||
matches: (event) =>
|
matches: (event) =>
|
||||||
!event.metaKey &&
|
!event.metaKey &&
|
||||||
@@ -163,12 +180,13 @@ const SHORTCUT_BINDINGS: readonly KeyboardShortcutBinding[] = [
|
|||||||
event.altKey &&
|
event.altKey &&
|
||||||
event.shiftKey &&
|
event.shiftKey &&
|
||||||
(event.code === "KeyW" || event.key.toLowerCase() === "w"),
|
(event.code === "KeyW" || event.key.toLowerCase() === "w"),
|
||||||
when: (context) => !context.commandCenterOpen,
|
when: (context) => !context.isTauri && !context.commandCenterOpen,
|
||||||
help: {
|
help: {
|
||||||
id: "workspace-tab-close-current",
|
id: "workspace-tab-close-current",
|
||||||
section: "global",
|
section: "global",
|
||||||
label: "Close current tab",
|
label: "Close current tab",
|
||||||
keys: ["alt", "shift", "W"],
|
keys: ["alt", "shift", "W"],
|
||||||
|
when: (context) => !context.isTauri,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import websitePackage from '../../package.json'
|
|||||||
import '~/styles.css'
|
import '~/styles.css'
|
||||||
|
|
||||||
const desktopVersion = websitePackage.version
|
const desktopVersion = websitePackage.version
|
||||||
const macDownloadHref = `https://github.com/getpaseo/paseo/releases/download/v${desktopVersion}/Paseo_${desktopVersion}_aarch64.dmg`
|
const macDownloadHref = `https://github.com/getpaseo/paseo/releases/download/v${desktopVersion}/Paseo_${desktopVersion}_universal.dmg`
|
||||||
|
|
||||||
export const Route = createFileRoute('/')({
|
export const Route = createFileRoute('/')({
|
||||||
head: () => ({
|
head: () => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user