Web UI: DRY the modals — adopt useModalA11y in 5 hand-rolled modals; route remaining raw fetches through the API client
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python, react, typescript
Hướng nghiên cứu
Read utils/useModalA11y.ts, then compare its use in ConfirmDialog and the five named modal files: LoadConfigModal.tsx, DirectoryPickerModal.tsx, LogViewerModal.tsx, FilePropertiesModal.tsx, and SingleMatchPromptModal.tsx. Also inspect client.ts around browseDirectory() and apiError, plus App.tsx around confirmDeleteFile. Done means the five modals use the shared hook, ShortcutsModal and TimerModal close on backdrop clicks, and both directory browsing and file deletion use the API client while preserving useful error details.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Two consistency gaps across the component layer:
1. Five modals hand-roll the focus trap/Escape instead of the shared hook. LoadConfigModal.tsx:76-98, DirectoryPickerModal.tsx:84-106, LogViewerModal.tsx:133-155, FilePropertiesModal.tsx:92-136, SingleMatchPromptModal.tsx:20-35 each reimplement the Tab trap + Escape + focus restore that utils/useModalA11y.ts already provides (used by ConfirmDialog, TimerModal, SaveAsDialog, ShortcutsModal, BarcodeModal, CameraBarcodeModal, ConfigEditorModal). The drift is real: SingleMatchPromptModal has no Tab trap at all, and the hand-rolled variants lack the hook's "focus drifted out — pull it back" behavior. Two more inconsistencies ride along: ShortcutsModal (:43) and TimerModal (:58) lack the backdrop onClick={onClose} that every other dialog has.
2. Raw fetches bypass the API client and discard error detail.
DirectoryPickerModal.tsx:59-74does a barefetch("/api/fs/browse?…")with a generic "Failed to browse directory" message, plus localBrowseEntry/BrowseResultinterfaces duplicatingapi/typesBrowseResult(which SaveAsDialog imports).client.tsalready exposesbrowseDirectory()(client.ts:320).App.tsx:940-945(confirmDeleteFile) is the lone raw action call:fetch("/api/actions/delete")with a generic "Failed to delete file" — the server's reason (permission denied vs not found) is swallowed.client.tshas nodeleteFileexport.
Suggested fix
- Adopt
useModalA11yin all five (SingleMatchPromptModal keeps its Enter/Escape window listener layered on top); add backdrop-click to Shortcuts/Timer for consistency. - Call
browseDirectory(path)+ import the shared type; adddeleteFile(filePath)toclient.tsfollowing the existingapiErrorpattern and use it inconfirmDeleteFile.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 1
- Merge trung bình
- 4 giờ 46 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của falbany/ProFiles
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
falbany/ProFiles#187 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Web UI: config handoff from a second launch leaves the open YAML editor showing stale contentĐang mởbug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của falbany/ProFiles
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ip-tools/patzilla#219 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesĐang mởpriority:p3 technical-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jimmy058910/jmo-security-repo#1673 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
integration: frontier_silicon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
home-assistant/core#193176 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task create and task update take --body-file and --stdinCó thể đã có người làm @JuanBarriosS đã nhận hôm nay. Đang mởcli enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
pyrite-wiki/pyrite#1687 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày