Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Search: exclude results with a leading minus (-is:image, -app:slack, -word)

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
75/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend, search

Direzione di ricerca

Start in src/shared/search.ts with ParsedQuery, parseQuery and matchesQuery to see how filters and terms are split today. Check shelf-app.tsx, which highlights parseQuery(search).terms, so excluded words go into separate fields such as excludeTerms. Done when the three leading-minus forms work alone and mixed with normal filters, hyphenated words still match as before, tests/search.test.ts covers the new cases and pnpm test passes, and the README search bullet mentions the minus.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement good first issue

Search can narrow results down but can't leave things out. Today -is:image is searched as the literal text "-is:image". Most search boxes let you exclude with a leading -, and the shelf should too:

  • -is:image hides images
  • -app:slack hides everything copied from Slack
  • -draft hides items that contain "draft"
Where to look
  • src/shared/search.ts: ParsedQuery, parseQuery and matchesQuery
  • src/renderer/src/shelf/shelf-app/shelf-app.tsx highlights matches on cards with parseQuery(search).terms. Keep excluded words in their own fields (say excludeTerms, excludeKinds, excludeApps) rather than in terms, or the shelf would highlight words it's hiding
  • tests/search.test.ts
Done when
  • The three forms above work, on their own and mixed with normal filters (is:code -app:terminal)
  • Words with a hyphen inside (well-known, e-mail) are searched as before
  • Tests in tests/search.test.ts cover these, and pnpm test passes
  • The search bullet in README.md ("Finds things fast") mentions the minus

Suggested pull request title: feat(search): exclude results with a leading minus

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

Lingua principale
TypeScript
Stelle
0
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di alexsilver8/openpaste

Tutte le issue di alexsilver8/openpaste

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.