Search: accept more type names, like is:colours, is:urls and is:photos

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

まだ誰も着手していません。

評価

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

調査の方向性

src/shared/search.ts の KIND_ALIASES と、tests/search.test.ts の parseQuery のテストを読む。対応する型に、指定された複数形と同義語の名前を追加し、各エイリアスが期待される型に対応することを確認する。pnpm test を実行する。指定されたすべての形式で正しく絞り込まれ、テストが通れば完了。

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

説明

enhancement good first issue

Search understands a few names for each type, but not always the plural or the obvious synonym:

Works Doesn't work yet
is:colour is:colours
is:url is:urls
is:picture is:pictures, is:photo, is:photos
is:screenshot is:screenshots
is:snippet is:snippets

A name it doesn't know is searched as plain text, so is:colours currently finds nothing at all.

Where to look
  • src/shared/search.ts: KIND_ALIASES. The same names work after type: and kind:
  • tests/search.test.ts: the parseQuery tests

#9 and #10 also change parseQuery. This one only adds to the alias table, so it shouldn't conflict with them.

Done when
  • Every name in the right-hand column filters to its type
  • A test checks each alias in KIND_ALIASES maps to the right type (looping over the table is fine), and pnpm test passes

Suggested pull request title: feat(search): accept more type names like is:colours and is:urls


New to OpenPaste? CONTRIBUTING.md covers setup, the code conventions and the checks to run before a pull request (pnpm typecheck, pnpm test, pnpm format, pnpm cleaner). Leave a comment if you're picking this up so nobody doubles up.


Generated by Claude Code

主要言語
TypeScript
スター
0
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

alexsilver8/openpaste のほかの issue

alexsilver8/openpaste の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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