Stop the JSON formatter's Find bar from typing into the JSON
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nextjs, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu từ effect ở dòng 34 đến 36 của app/(tools)/json-formatter/components/FindBar.tsx, effect này gọi onScrollTo mỗi khi danh sách kết quả khớp thay đổi. Sau đó đọc findScrollTo trong app/(tools)/json-formatter/JsonFormatterClient.tsx (dòng 309 đến 318), nơi textarea của trình soạn thảo nhận focus và vùng chọn được đặt với độ dài bằng không. Hoàn thành khi một truy vấn nhiều ký tự như email giữ focus trong ô Tìm, không làm thay đổi JSON, làm nổi bật kết quả khớp, và Enter, Shift+Enter, các nút mũi tên, Escape, bộ đếm và nút chuyển đổi hoa/thường vẫn hoạt động đúng theo tiêu chí chấp nhận. Kiểm tra bằng npm run lint, npm run test và npm run build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In the JSON formatter, typing in the Find bar jumps into the JSON editor after the first character, so the rest of your search ends up typed into the document.
Steps to reproduce
- Load the example JSON and press Cmd/Ctrl+F.
- Type
email. - After the
e, the caret moves into the editor andmailis inserted into the JSON.
Expected: focus stays in the Find box, the JSON doesn't change, and the match is highlighted. The match isn't highlighted today either, because the selection is set to zero length (pos to pos + 0).
The cause: FindBar calls onScrollTo in an effect every time the matches change, and findScrollTo calls el.focus() on the textarea.
Where to look
app/(tools)/json-formatter/components/FindBar.tsx(the effect at lines 34 to 36)app/(tools)/json-formatter/JsonFormatterClient.tsx(findScrollTo, lines 311 to 320)
Acceptance criteria
- Typing a multi-character query keeps focus in the Find box and leaves the JSON untouched
- Enter, Shift+Enter and the arrow buttons move between matches and select the whole match
- Escape closes the bar and puts focus back in the editor
- The match counter and the case toggle still work
-
npm run lint,npm run testandnpm run buildpass
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #121 in the description.
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 9
- Merge trung bình
- 10 giờ 24 phút
- Pull request đã merge (30 ngày)
- 93
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 codercops/toolbelt
-
bug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 94/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
JSON formatter: a duplicate key crashes the whole toolCó thể đã có người làm @lb1192176991-lab đã nhận hôm nay. Đang mởbug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
codercops/toolbelt#218 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
JSON to XML: keys like `@type`, `$ref` or `bad key` turn into `<item>`Có thể đã có người làm @AyanZahid-Code đã nhận 1 ngày trước. Đang mởbug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
codercops/toolbelt#214 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/toolbelt
Issue tương tự
-
[BUG] rag: sentence content can cross the reported sentence boundariesCó thể đã có người làm @LJK-ikun đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
platformatic/mcp#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
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
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nadaĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3164 ·
Maintainer thường phản hồi trong vòng 1 ngày