Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Stop the JSON formatter's Find bar from typing into the JSON

オープン 初心者向け
#121 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@kudala-bharani がすでに取り組んでいます。

2026年10月19日 から。

  • #209 @kudala-bharani による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
nextjs, typescript
領域
frontend

調査の方向性

まず app/(tools)/json-formatter/components/FindBar.tsx の34〜36行目にあるeffectから読み始めてください。このeffectは一致箇所が変わるたびに onScrollTo を呼び出します。次に app/(tools)/json-formatter/JsonFormatterClient.tsx の findScrollTo(309〜318行目)を読んでください。ここではエディタの textarea にフォーカスが移り、選択範囲の長さがゼロに設定されます。email のような複数文字の検索語を入力したときに、フォーカスが検索ボックスに残り、JSONが変更されず、一致箇所がハイライトされ、Enter、Shift+Enter、矢印ボタン、Escape、件数表示、大文字小文字の切り替えが受け入れ基準どおりに動作すれば完了です。npm run lint、npm run test、npm run build で確認してください。

索引モデルが issue の本文から書いたものです。

説明

bug hacktoberfest help wanted

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

  1. Load the example JSON and press Cmd/Ctrl+F.
  2. Type email.
  3. After the e, the caret moves into the editor and mail is 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 test and npm run build pass

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.

主要言語
TypeScript
スター
1
フォーク
9
平均マージ
10時間 24分
マージ済み PR(30日)
93

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codercops/toolbelt のほかの issue

codercops/toolbelt の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。