UX: Auto-select single Git account/branch in Provider settings and warn about unsaved changes

Aperta
#6,140 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
next.js, typescript
Ambito
frontend

Direzione di ricerca

Start with the Provider tab used when creating or editing an Application or Compose service, then trace how provider accounts and repository branches are populated for GitHub, GitLab, Bitbucket, and Gitea. Add account and branch preselection behavior and a visible dirty-state indicator near the Save button, covering both Application and Compose service forms. Done means single-account and single-branch choices are preselected, multiple accounts use the most recently added one, and unsaved provider changes are clearly indicated.

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

Descrizione

enhancement
What problem will this feature address?

When creating or editing an Application or Compose service, the Provider tab ("Select the source of your code": GitHub / GitLab / Bitbucket / Gitea / Git / Raw) needs extra clicks even when there is only one possible choice. It also gives no warning about unsaved changes:

  1. Git account is not preselected. GitHub is already the default provider tab, but the account select stays empty. I have exactly one GitHub account connected, and I still have to open the dropdown and pick it every time.
  2. Branch is not preselected. When the selected repository has only one branch, I still have to pick it by hand.
  3. No unsaved-changes indicator. If I change provider settings and don't click save, nothing tells me. The changes are easy to lose by switching tabs or navigating away.
Describe the solution you'd like
  1. Account auto-select
    • If only one account is configured for the selected provider, preselect it.
    • If several exist, preselect the most recently created/added one.
    • (Future, optional): let users mark one account as "default" per provider. This needs a schema change, so it may be out of scope for this issue.
  2. Branch auto-select
    • If the selected repository has exactly one branch, preselect it.
    • (Optional): otherwise preselect the repository's default branch (e.g. main), if the provider API returns it.
  3. Unsaved-changes indicator
    • Show a visible hint, e.g. a banner or badge near the Save button, when the provider form is dirty.
    • Optionally warn before leaving the tab or page while changes are unsaved.

This applies to all Git providers (GitHub, GitLab, Bitbucket, Gitea), for both Applications and Compose services.

Describe alternatives you've considered

Selecting everything by hand every time. It works, but it's repetitive, and it's easy to forget to save.

Additional context

Related (closed) issues about unsaved changes in other forms: #2538, #2064.

Will you send a PR to implement it?

Maybe, need help

Lingua principale
TypeScript
Stelle
38.8k
Fork
3.2k
Merge medio
1g 10h
PR unite (30g)
110

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 Dokploy/dokploy

Tutte le issue di Dokploy/dokploy

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.