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

Đang mở
#6,140 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
next.js, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
38.8k
Fork
3.2k
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
110

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Dokploy/dokploy

Tất cả issue của Dokploy/dokploy

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.