Closed sweep-ai[bot] closed 11 months ago
src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
pnpm i
1/4 ✓Lockfile is up to date, resolution step is skipped Progress: resolved 1, reused 0, downloaded 0, added 0 Packages: +695 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ╭──────────────────────────────────────────────────────────────────╮ │ │ │ Update available! 8.9.2 → 8.10.1. │ │ Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.10.1 │ │ Run "pnpm add -g pnpm" to update. │ │ │ │ Follow @pnpmjs for updates: https://twitter.com/pnpmjs │ │ │ ╰──────────────────────────────────────────────────────────────────╯ Progress: resolved 695, reused 0, downloaded 93, added 91 Progress: resolved 695, reused 0, downloaded 236, added 229 Progress: resolved 695, reused 0, downloaded 478, added 476 Progress: resolved 695, reused 0, downloaded 690, added 685 Progress: resolved 695, reused 0, downloaded 694, added 695, done .../esbuild@0.18.12/node_modules/esbuild postinstall$ node install.js .../esbuild@0.18.12/node_modules/esbuild postinstall: Done dependencies: + @chakra-ui/icons 2.0.19 + @chakra-ui/react 2.8.1 + @codemirror/commands 6.3.0 + @codemirror/lang-markdown 6.2.0 + @codemirror/language 6.8.0 + @codemirror/language-data 6.3.1 + @codemirror/state 6.2.1 + @codemirror/view 6.14.1 + @emotion/react 11.11.1 + @emotion/styled 11.11.0 + @lezer/highlight 1.1.6 + @tauri-apps/api 1.4.0 + @types/react-resizable 3.0.4 + codemirror 6.0.1 + framer-motion 10.12.21 + react 18.2.0 + react-dom 18.2.0 + react-resizable 3.0.5 + thememirror 2.0.1 + use-local-storage-state 18.3.3 devDependencies: + @playwright/test 1.36.0 + @tauri-apps/cli 1.4.0 + @testing-library/react 14.0.0 + @testing-library/user-event 14.4.3 + @types/node 18.16.19 + @types/react 18.2.15 + @types/react-dom 18.2.7 + @typescript-eslint/eslint-plugin 5.62.0 + @vitejs/plugin-react 3.1.0 + @vitest/coverage-c8 0.31.4 + eslint 8.45.0 + eslint-config-prettier 8.8.0 + eslint-config-standard-with-typescript 34.0.1 + eslint-plugin-import 2.27.5 + eslint-plugin-n 15.7.0 + eslint-plugin-prettier 4.2.1 + eslint-plugin-promise 6.1.1 + eslint-plugin-react 7.32.2 + husky 8.0.3 + jsdom 22.1.0 + lint-staged 13.2.3 + prettier 2.8.8 + typescript 5.1.6 + vite 4.4.4 + vitest 0.31.4 > noter@0.0.0 prepare /repo > husky install husky - Git hooks installed Done in 5.7s
trunk init
2/4 ✓⡿ Downloading Trunk 1.17.1... ⡿ Downloading Trunk 1.17.1... ⢿ Downloading Trunk 1.17.1... ⣻ Downloading Trunk 1.17.1... ⣽ Downloading Trunk 1.17.1... ⣾ Downloading Trunk 1.17.1... ⣷ Downloading Trunk 1.17.1... ✔ Downloading Trunk 1.17.1... done ⡿ Verifying Trunk sha256... ✔ Verifying Trunk sha256... done ⡿ Unpacking Trunk... ✔ Unpacking Trunk... done ✔ 17 linters were enabled (.trunk/trunk.yaml) actionlint 1.6.26 (5 github-workflow files) checkov 3.0.15 (5 json, 7 yaml files) clippy 1.65.0 (1 rust file) eslint 8.52.0 (2 javascript, 34 typescript files) git-diff-check (80 files) markdownlint 0.37.0 (2 markdown files) (created .markdownlint.yaml) osv-scanner 1.4.2 (2 lockfile files) oxipng 9.0.0 (14 png files) prettier 3.0.3 (2 css, 1 html, 2 javascript, 5 json, 2 markdown, 34 typescript, 6 yaml files) rustfmt 1.65.0 (2 rust files) (created .rustfmt.toml) shellcheck 0.9.0 (1 shell file) (created .shellcheckrc) shfmt 3.6.0 (1 shell file) svgo 3.0.2 (3 svg files) (created svgo.config.js) taplo 0.8.1 (1 toml file) trivy 0.46.1 (7 yaml files) trufflehog 3.62.1 (82 files) yamllint 1.32.0 (6 yaml files) (created .yamllint.yaml) Next Steps 1. Read documentation Our documentation can be found at https://docs.trunk.io 2. Get help and give feedback Join the Trunk community at https://slack.trunk.io
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
3/4 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
4/4 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
[X] Check src/components/Sidebar/RenameModal.tsx
✗
Run src/components/Sidebar/RenameModal.tsx through the sandbox.
[X] Check src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/RenameModal.tsx
✗
Sandbox logs for
pnpm i
1/4 ✓Lockfile is up to date, resolution step is skipped Progress: resolved 1, reused 0, downloaded 0, added 0 Packages: +695 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ╭──────────────────────────────────────────────────────────────────╮ │ │ │ Update available! 8.9.2 → 8.10.1. │ │ Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.10.1 │ │ Run "pnpm add -g pnpm" to update. │ │ │ │ Follow @pnpmjs for updates: https://twitter.com/pnpmjs │ │ │ ╰──────────────────────────────────────────────────────────────────╯ Progress: resolved 695, reused 0, downloaded 93, added 91 Progress: resolved 695, reused 0, downloaded 236, added 229 Progress: resolved 695, reused 0, downloaded 478, added 476 Progress: resolved 695, reused 0, downloaded 690, added 685 Progress: resolved 695, reused 0, downloaded 694, added 695, done .../esbuild@0.18.12/node_modules/esbuild postinstall$ node install.js .../esbuild@0.18.12/node_modules/esbuild postinstall: Done dependencies: + @chakra-ui/icons 2.0.19 + @chakra-ui/react 2.8.1 + @codemirror/commands 6.3.0 + @codemirror/lang-markdown 6.2.0 + @codemirror/language 6.8.0 + @codemirror/language-data 6.3.1 + @codemirror/state 6.2.1 + @codemirror/view 6.14.1 + @emotion/react 11.11.1 + @emotion/styled 11.11.0 + @lezer/highlight 1.1.6 + @tauri-apps/api 1.4.0 + @types/react-resizable 3.0.4 + codemirror 6.0.1 + framer-motion 10.12.21 + react 18.2.0 + react-dom 18.2.0 + react-resizable 3.0.5 + thememirror 2.0.1 + use-local-storage-state 18.3.3 devDependencies: + @playwright/test 1.36.0 + @tauri-apps/cli 1.4.0 + @testing-library/react 14.0.0 + @testing-library/user-event 14.4.3 + @types/node 18.16.19 + @types/react 18.2.15 + @types/react-dom 18.2.7 + @typescript-eslint/eslint-plugin 5.62.0 + @vitejs/plugin-react 3.1.0 + @vitest/coverage-c8 0.31.4 + eslint 8.45.0 + eslint-config-prettier 8.8.0 + eslint-config-standard-with-typescript 34.0.1 + eslint-plugin-import 2.27.5 + eslint-plugin-n 15.7.0 + eslint-plugin-prettier 4.2.1 + eslint-plugin-promise 6.1.1 + eslint-plugin-react 7.32.2 + husky 8.0.3 + jsdom 22.1.0 + lint-staged 13.2.3 + prettier 2.8.8 + typescript 5.1.6 + vite 4.4.4 + vitest 0.31.4 > noter@0.0.0 prepare /repo > husky install husky - Git hooks installed Done in 5.7s
trunk init
2/4 ✓⡿ Downloading Trunk 1.17.1... ⡿ Downloading Trunk 1.17.1... ⢿ Downloading Trunk 1.17.1... ⣻ Downloading Trunk 1.17.1... ⣽ Downloading Trunk 1.17.1... ⣾ Downloading Trunk 1.17.1... ⣷ Downloading Trunk 1.17.1... ✔ Downloading Trunk 1.17.1... done ⡿ Verifying Trunk sha256... ✔ Verifying Trunk sha256... done ⡿ Unpacking Trunk... ✔ Unpacking Trunk... done ✔ 17 linters were enabled (.trunk/trunk.yaml) actionlint 1.6.26 (5 github-workflow files) checkov 3.0.15 (5 json, 7 yaml files) clippy 1.65.0 (1 rust file) eslint 8.52.0 (2 javascript, 34 typescript files) git-diff-check (80 files) markdownlint 0.37.0 (2 markdown files) (created .markdownlint.yaml) osv-scanner 1.4.2 (2 lockfile files) oxipng 9.0.0 (14 png files) prettier 3.0.3 (2 css, 1 html, 2 javascript, 5 json, 2 markdown, 34 typescript, 6 yaml files) rustfmt 1.65.0 (2 rust files) (created .rustfmt.toml) shellcheck 0.9.0 (1 shell file) (created .shellcheckrc) shfmt 3.6.0 (1 shell file) svgo 3.0.2 (3 svg files) (created svgo.config.js) taplo 0.8.1 (1 toml file) trivy 0.46.1 (7 yaml files) trufflehog 3.62.1 (82 files) yamllint 1.32.0 (6 yaml files) (created .yamllint.yaml) Next Steps 1. Read documentation Our documentation can be found at https://docs.trunk.io 2. Get help and give feedback Join the Trunk community at https://slack.trunk.io
trunk fmt src/components/Sidebar/RenameModal.tsx || exit 0
3/4 ✓✔ Formatted src/components/Sidebar/RenameModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/RenameModal.tsx
4/4 ❌ (`1`)ISSUES src/components/Sidebar/RenameModal.tsx:87:17 87:17 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/DeleteModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/DeleteModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/DeleteModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/DeleteModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/DeleteModal.tsx:46:11 46:11 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/DeleteModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/DeleteModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/DeleteModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/DeleteModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/DeleteModal.tsx:50:11 50:11 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/DeleteModal.tsx
✗
Sandbox logs for
trunk fmt src/components/Sidebar/DeleteModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/DeleteModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/DeleteModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/DeleteModal.tsx:50:11 50:11 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
[X] Check src/components/Sidebar/DeleteModal.tsx
▶
Run src/components/Sidebar/DeleteModal.tsx through the sandbox.
[X] Check src/components/Sidebar/DeleteModal.tsx
▶
Sandbox logs for
trunk fmt src/components/Sidebar/DeleteModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/DeleteModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/DeleteModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/DeleteModal.tsx:50:11 50:11 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/DeleteModal.tsx
▶
Sandbox logs for
trunk fmt src/components/Sidebar/DeleteModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/DeleteModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/DeleteModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/DeleteModal.tsx:50:11 50:11 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
src/components/Sidebar/DeleteModal.tsx
▶
Sandbox logs for
trunk fmt src/components/Sidebar/DeleteModal.tsx || exit 0
1/2 ✓✔ Formatted src/components/Sidebar/DeleteModal.tsx Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures src/components/Sidebar/DeleteModal.tsx
2/2 ❌ (`1`)ISSUES src/components/Sidebar/DeleteModal.tsx:46:11 46:11 high Promises must be awaited, end with a call to .catch, end eslint/@typescript-eslint/no-floating-promises with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator. Checked 1 file ✖ 1 new issue
The command:
Run tauri-apps/tauri-action@v0
yielded the following error:
`##[error]src/components/Sidebar/DeleteModal.tsx(44,57): error TS2322: Type '{ children: Element[]; isOpen: boolean; onClose: () => void; isCentered: true; onKeyPress: (e: any) => void; }' is not assignable to type 'IntrinsicAttributes & ModalProps'.
Property 'onKeyPress' does not exist on type 'IntrinsicAttributes & ModalProps'.
ELIFECYCLE Command failed with exit code 2.
Error beforeBuildCommand pnpm build
failed with exit code 1
ELIFECYCLE Command failed with exit code 1.
with: releaseDraft: false prerelease: false projectPath: . includeDebug: false includeRelease: true includeUpdaterJson: true updaterJsonKeepUniversal: false env: PNPM_HOME: /Users/runner/setup-pnpm/node_modules/.bin CARGO_INCREMENTAL: 0 CARGO_TERM_COLOR: always GITHUB_TOKEN: ***
running pnpm [ 'tauri', 'build' ]
noter@0.0.0 tauri /Users/runner/work/noter/noter tauri "build"
Running beforeBuildCommand `pnpm build`
noter@0.0.0 build /Users/runner/work/noter/noter tsc && vite build
Property 'onKeyPress' does not exist on type 'IntrinsicAttributes & ModalProps'.
ELIFECYCLE Command failed with exit code 2.
Error beforeBuildCommand pnpm build
failed with exit code 1
ELIFECYCLE Command failed with exit code 1.
with: releaseDraft: false prerelease: false projectPath: . includeDebug: false includeRelease: true includeUpdaterJson: true updaterJsonKeepUniversal: false env: PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin CARGO_INCREMENTAL: 0 CARGO_TERM_COLOR: always GITHUB_TOKEN: ***
running pnpm [ 'tauri', 'build' ]
noter@0.0.0 tauri /home/runner/work/noter/noter tauri "build"
Running beforeBuildCommand `pnpm build`
noter@0.0.0 build /home/runner/work/noter/noter tsc && vite build
Property 'onKeyPress' does not exist on type 'IntrinsicAttributes & ModalProps'.
ELIFECYCLE Command failed with exit code 2.
Error beforeBuildCommand pnpm build
failed with exit code 1
ELIFECYCLE Command failed with exit code 1.
Here are the logs:
running pnpm [ 'tauri', 'build' ]
> noter@0.0.0 tauri D:\a\noter\noter
> tauri "build"
Running beforeBuildCommand `pnpm build`
> noter@0.0.0 build D:\a\noter\noter
> tsc && vite build
Done.
Just follow the solution mentioned in this PR - #49. Only do it for the rename modal. For the delete modal, you can just adjust the tabindex to default to delete button
Done.
PR Feedback: 👎
Description
This PR implements the functionality to submit the Rename and Delete modals by pressing the Enter key.
Summary of Changes
src/components/Sidebar/RenameModal.tsx
to add a key press event listener to theInput
component. TheonRename
function is called when the Enter key is pressed, but only if thenewFileName
state variable is not empty.src/components/Sidebar/DeleteModal.tsx
to add a key press event listener to theModal
component. TheonDelete
function is called when the Enter key is pressed.This change enhances the user experience by providing an alternative way to submit the modals without relying solely on the mouse or touch input.
Fixes #50.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: