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

Abierto
#6,140 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
next.js, typescript
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
38.8k
Forks
3.2k
Merge medio
1 d 10 h
PR fusionados (30 d)
110

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Dokploy/dokploy

Todos los issues de Dokploy/dokploy

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.