refactor: split SettingsDialog into per-panel sub-components

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
react, typescript
Ambito
desktop, frontend

Direzione di ricerca

Start with src/components/settings/SettingsDialog.tsx and trace how the tab navigation selects each panel and how settings are read and saved. Extract the panels into src/components/settings/panels/, keeping the parent responsible for routing and passing settings through props or the store hook. Done means each panel is under 200 lines, settings persist after an app reload, and TypeScript, tests, and the build pass.

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

Descrizione

good first issue help wanted refactor

src/components/settings/SettingsDialog.tsx is 1,321 lines. Each settings panel (General, Editor, Explorer, AI, Keymaps, Templates, Updates) is its own world but they all share one giant file.

What to extract

One PR per panel is fine. Order suggestion (lightest first):

  1. <AISettingsPanel> — the AI provider config (OpenAI / Anthropic / Google / Ollama selector, API key, endpoint, model).
  2. <KeymapsPanel> — preset selector + custom-action overrides.
  3. <TemplatesPanel> — live-template CRUD.
  4. <UpdatesPanel> — the in-app updater UI.
  5. <ExplorerSettingsPanel> — the show/hide toggles.
  6. <GeneralSettingsPanel> — everything else.

Suggested approach

  • Components live in src/components/settings/panels/.
  • The parent SettingsDialog keeps the tab nav + active-panel routing.
  • Each panel takes settings + setSetting (or its store hook) as props — no panel should useSettings() independently if the parent already has it.

Done criteria

  • SettingsDialog.tsx becomes a router; each panel < 200 lines.
  • All settings still persist correctly across app reloads (manual test).
  • TypeScript / tests / build green.

Out of scope

  • Redesigning the visual layout.
  • Adding new settings.

Audit reference

K4 in the pre-launch audit.

Lingua principale
TypeScript
Stelle
6
Fork
1
Merge medio
17m
PR unite (30g)
2

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 openidle-dev/queryden

Tutte le issue di openidle-dev/queryden

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.