The repo head drops its … menu: the watch level is a pill beside Star and Fork (its eye alone on a phone), and watching and forks are counted in the line under the title
Browse files at this commitc71bf40008db7a1ca220e6d565cd5922ec6e8502Parent: 409776fAll checks have passed
Show checks
ci/buildSucceededDetails
- style
- the repo head drops its … menu: the watch level is a pill beside Star and Fork (its eye alone on a phone), and watching and forks are counted in the line under the title
- a topic's own action standing under its heading (Rename repository, Transfer repository) is a small soft pill like Star, red-worded when dangerous, while tools on a line of facts stay words
- branch protection is two groups of toggles, Pushes and Pull requests, with short labels and no hints beside them, the Pull requests group showing while Only through pull requests is on or a pull request setting is saved
- each rule is one line with Edit beside its summary, the default branch reads protected by default · Add rule, and Save changes, Cancel and Remove rule share one row ✅ test: the audit seeds a branch rule so its form is shot
11 changed files +307 -292
- crates/forge-e2e/tests/e2e/repo_settings_e2e.rs +5 -5
- crates/forge-web-base/src/i18n/merge_queue.rs +2 -2
- crates/forge-web-base/src/i18n/repo_admin.rs +30 -78
- crates/forge-web/src/pages/repo.rs +5 -13
- crates/forge-web/src/pages/repo_settings.rs +99 -107
- docs/ui-language.md +4 -1
- scripts/audit/seed.py +6 -0
- style/_min_menus.scss +0 -16
- style/_one.scss +40 -0
- style/_one_admin.scss +91 -0
- style/_one_shell.scss +25 -70
crates/forge-e2e/tests/e2e/repo_settings_e2e.rsmodified+5 -5
| @@ -379,7 +379,7 @@ async fn repo_settings_deletes_rows_when_repo_dir_is_missing() { | ||
| 379 | 379 | /// of its summary pills. The built-in default-branch row has no rule behind it, so it is skipped. |
| 380 | 380 | fn branch_rows(body: &str) -> Vec<Vec<String>> { |
| 381 | 381 | let doc = scraper::Html::parse_document(body); |
| 382 | - // Every rule row is a `details` with the pattern in its summary's name; the "+ New rule" row | |
| 382 | + // Every rule row is a `details` with the pattern in its summary's name; the "Add rule" row | |
| 383 | 383 | // has no pattern there, so it drops out. |
| 384 | 384 | let cards = scraper::Selector::parse("details.row-open").expect("selector"); |
| 385 | 385 | let pattern = scraper::Selector::parse("summary .name code").expect("selector"); |
| @@ -464,7 +464,7 @@ async fn branch_protection_end_to_end() { | ||
| 464 | 464 | assert_eq!(page.status, 200, "owner settings page"); |
| 465 | 465 | assert!(page.body.contains("Branch protection"), "section missing"); |
| 466 | 466 | assert!( |
| 467 | - page.body.contains("(default branch): protected by default"), | |
| 467 | + page.body.contains("protected by default"), | |
| 468 | 468 | "built-in row missing" |
| 469 | 469 | ); |
| 470 | 470 | let danger_page = http |
| @@ -515,7 +515,7 @@ async fn branch_protection_end_to_end() { | ||
| 515 | 515 | "main card after add" |
| 516 | 516 | ); |
| 517 | 517 | assert!( |
| 518 | - !page.body.contains("(default branch): protected by default"), | |
| 518 | + !page.body.contains("protected by default"), | |
| 519 | 519 | "built-in row must disappear once a rule matches" |
| 520 | 520 | ); |
| 521 | 521 | |
| @@ -626,7 +626,7 @@ async fn branch_protection_end_to_end() { | ||
| 626 | 626 | .await; |
| 627 | 627 | assert!(rule_row(&page.body, "main").is_none(), "main removed"); |
| 628 | 628 | assert!( |
| 629 | - page.body.contains("(default branch): protected by default"), | |
| 629 | + page.body.contains("protected by default"), | |
| 630 | 630 | "built-in row back after remove" |
| 631 | 631 | ); |
| 632 | 632 | |
| @@ -648,7 +648,7 @@ async fn branch_protection_end_to_end() { | ||
| 648 | 648 | http.get("/bob/app/settings?section=branches", Some(&bob)) |
| 649 | 649 | .await |
| 650 | 650 | .body |
| 651 | - .contains("(default branch): protected by default"), | |
| 651 | + .contains("protected by default"), | |
| 652 | 652 | "write collaborator must not change rules" |
| 653 | 653 | ); |
| 654 | 654 |
crates/forge-web-base/src/i18n/merge_queue.rsmodified+2 -2
| @@ -92,8 +92,8 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 92 | 92 | use K::*; |
| 93 | 93 | use Lang::{En, Tr}; |
| 94 | 94 | match (key, lang) { |
| 95 | - (RequireMergeQueue, En) => "Require merge queue", | |
| 96 | - (RequireMergeQueue, Tr) => "Birleştirme sırası iste", | |
| 95 | + (RequireMergeQueue, En) => "Merge queue", | |
| 96 | + (RequireMergeQueue, Tr) => "Birleştirme sırası", | |
| 97 | 97 | (RequireMergeQueueHint, En) => { |
| 98 | 98 | "Merges go through the merge queue. Each pull request is tested on top of the current branch tip, and the branch moves only to a tested commit." |
| 99 | 99 | } |
crates/forge-web-base/src/i18n/repo_admin.rsmodified+30 -78
| @@ -13,7 +13,6 @@ pub enum K { | ||
| 13 | 13 | AllowDeletion, |
| 14 | 14 | AllowForcePush, |
| 15 | 15 | AlreadyOwner, |
| 16 | - ApprovalsHelp, | |
| 17 | 16 | ApprovalsRange, |
| 18 | 17 | ArchiveHeading, |
| 19 | 18 | ArchiveHelp, |
| @@ -49,7 +48,6 @@ pub enum K { | ||
| 49 | 48 | DeleteRepoHelp, |
| 50 | 49 | DeleteTrashHelp, |
| 51 | 50 | DeletionAllowed, |
| 52 | - DeletionDesc, | |
| 53 | 51 | Description, |
| 54 | 52 | DescriptionHelp, |
| 55 | 53 | DescriptionLong, |
| @@ -57,7 +55,6 @@ pub enum K { | ||
| 57 | 55 | EnterUsername, |
| 58 | 56 | EnterValue, |
| 59 | 57 | ForcePushAllowed, |
| 60 | - ForcePushDesc, | |
| 61 | 58 | General, |
| 62 | 59 | GeneralSaved, |
| 63 | 60 | MakePublic, |
| @@ -69,17 +66,14 @@ pub enum K { | ||
| 69 | 66 | NameRule, |
| 70 | 67 | NewName, |
| 71 | 68 | NewOwnerLabel, |
| 72 | - NewRule, | |
| 69 | + AddRule, | |
| 73 | 70 | NoBranchesYet, |
| 74 | 71 | NoCollaborators, |
| 75 | 72 | NoPendingTransfer, |
| 76 | 73 | NoSecrets, |
| 77 | 74 | NotCollaborator, |
| 78 | 75 | OwnerIsMember, |
| 79 | - PatternHelpA, | |
| 80 | - PatternHelpB, | |
| 81 | - PatternHelpC, | |
| 82 | - PatternHelpD, | |
| 76 | + PatternHelp, | |
| 83 | 77 | PendingTransfers, |
| 84 | 78 | PrivateOption, |
| 85 | 79 | PublicOption, |
| @@ -96,7 +90,6 @@ pub enum K { | ||
| 96 | 90 | RepoUnarchived, |
| 97 | 91 | RequireUpToDate, |
| 98 | 92 | RequiredApprovals, |
| 99 | - RestrictPushDesc, | |
| 100 | 93 | RestrictPushTitle, |
| 101 | 94 | Role, |
| 102 | 95 | RoleAdminDesc, |
| @@ -107,7 +100,6 @@ pub enum K { | ||
| 107 | 100 | RoleUpdated, |
| 108 | 101 | RoleWriteDesc, |
| 109 | 102 | RequiredChecks, |
| 110 | - RequiredChecksHelp, | |
| 111 | 103 | RecentContexts, |
| 112 | 104 | RuleChangesShort, |
| 113 | 105 | RuleNoExtra, |
| @@ -124,7 +116,7 @@ pub enum K { | ||
| 124 | 116 | Secrets, |
| 125 | 117 | SecretsHelp, |
| 126 | 118 | SectionChecks, |
| 127 | - SectionMerging, | |
| 119 | + SectionPullRequests, | |
| 128 | 120 | SectionPattern, |
| 129 | 121 | SectionPushes, |
| 130 | 122 | SettingsNavLabel, |
| @@ -167,18 +159,12 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 167 | 159 | } |
| 168 | 160 | (AddOrUpdate, En) => "Add or update a secret", |
| 169 | 161 | (AddOrUpdate, Tr) => "Gizli anahtar ekle veya güncelle", |
| 170 | - (AllowDeletion, En) => "Allow deletion", | |
| 171 | - (AllowDeletion, Tr) => "Silmeye izin verilir", | |
| 172 | - (AllowForcePush, En) => "Allow force pushes", | |
| 173 | - (AllowForcePush, Tr) => "Zorla göndermeye izin verilir", | |
| 162 | + (AllowDeletion, En) => "Deleting the branch", | |
| 163 | + (AllowDeletion, Tr) => "Dalın silinmesi", | |
| 164 | + (AllowForcePush, En) => "Force pushes", | |
| 165 | + (AllowForcePush, Tr) => "Zorla gönderim", | |
| 174 | 166 | (AlreadyOwner, En) => "The repository already belongs to that user.", |
| 175 | 167 | (AlreadyOwner, Tr) => "Depo zaten bu kullanıcıya ait.", |
| 176 | - (ApprovalsHelp, En) => { | |
| 177 | - "How many a pull needs, 0 to 20. They count only from reviewers with Write access or higher, using each reviewer's latest review." | |
| 178 | - } | |
| 179 | - (ApprovalsHelp, Tr) => { | |
| 180 | - "Bir çekme isteğinin gereken onay sayısı, 0 ile 20 arası. Onaylar yalnızca yazma veya daha yüksek erişimi olan inceleyicilerden, her inceleyicinin en son incelemesine göre sayılır." | |
| 181 | - } | |
| 182 | 168 | (ApprovalsRange, En) => "required approvals must be a whole number from 0 to 20", |
| 183 | 169 | (ApprovalsRange, Tr) => "Gerekli onay sayısı 0 ile 20 arasında bir tam sayı olmalıdır.", |
| 184 | 170 | (ArchiveHeading, En) => "Archive", |
| @@ -205,30 +191,26 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 205 | 191 | (ArchivedSecrets, Tr) => "Bu depo arşivlenmiş. Gizli anahtarlar salt okunurdur.", |
| 206 | 192 | (BadForm, En) => "The form was not understood. Nothing was changed.", |
| 207 | 193 | (BadForm, Tr) => "Form anlaşılamadı. Hiçbir şey değiştirilmedi.", |
| 208 | - (BlockWhileChanges, En) => "Block merges while changes are requested", | |
| 209 | - (BlockWhileChanges, Tr) => "Değişiklik istenirken birleştirmeler engellenir", | |
| 194 | + (BlockWhileChanges, En) => "Block while changes are requested", | |
| 195 | + (BlockWhileChanges, Tr) => "Değişiklik istenirken engelle", | |
| 210 | 196 | (BranchMissing, En) => "That branch does not exist. Nothing was saved.", |
| 211 | 197 | (BranchMissing, Tr) => "Bu dal mevcut değil. Hiçbir şey kaydedilmedi.", |
| 212 | - (BranchPattern, En) => "Branch pattern", | |
| 213 | - (BranchPattern, Tr) => "Dal deseni", | |
| 198 | + (BranchPattern, En) => "Branch", | |
| 199 | + (BranchPattern, Tr) => "Dal", | |
| 214 | 200 | (BranchProtection, En) => "Branch protection", |
| 215 | 201 | (BranchProtection, Tr) => "Dal koruması", |
| 216 | 202 | (BranchProtectionHelp, En) => { |
| 217 | - "Pushes to a protected branch are checked before they are accepted. Force pushes and deletions are blocked on the default branch unless a rule allows them. Tags are not covered." | |
| 203 | + "A push to a protected branch is checked against its rule before it is accepted." | |
| 218 | 204 | } |
| 219 | 205 | (BranchProtectionHelp, Tr) => { |
| 220 | - "Korumalı bir dala yapılan gönderimler kabul edilmeden önce denetlenir. Bir kural izin vermedikçe varsayılan dalda zorla gönderimler ve silmeler engellenir. Etiketler kapsam dışındadır." | |
| 206 | + "Korumalı bir dala yapılan gönderim, kabul edilmeden önce kuralına göre denetlenir." | |
| 221 | 207 | } |
| 222 | 208 | (BranchRuleRemoved, En) => "Branch rule removed.", |
| 223 | 209 | (BranchRuleRemoved, Tr) => "Dal kuralı kaldırıldı.", |
| 224 | 210 | (BranchRuleSaved, En) => "Branch rule saved.", |
| 225 | 211 | (BranchRuleSaved, Tr) => "Dal kuralı kaydedildi.", |
| 226 | - (BuiltinRowText, En) => { | |
| 227 | - " (default branch): protected by default; add a rule for it to change this." | |
| 228 | - } | |
| 229 | - (BuiltinRowText, Tr) => { | |
| 230 | - " (varsayılan dal): varsayılan olarak korunur; bunu değiştirmek için bir kural ekleyin." | |
| 231 | - } | |
| 212 | + (BuiltinRowText, En) => "protected by default", | |
| 213 | + (BuiltinRowText, Tr) => "varsayılan olarak korunur", | |
| 232 | 214 | (CancelRule, En) => "Cancel", |
| 233 | 215 | (CancelRule, Tr) => "Vazgeç", |
| 234 | 216 | (CancelTransfer, En) => "Cancel transfer", |
| @@ -277,9 +259,7 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 277 | 259 | } |
| 278 | 260 | (DeletionAllowed, En) => "Deletion allowed", |
| 279 | 261 | (DeletionAllowed, Tr) => "Silmeye izin var", |
| 280 | - (DeletionDesc, En) => "The branch can be deleted.", | |
| 281 | 262 | (Description, En) => "Description", |
| 282 | - (DeletionDesc, Tr) => "Dal silinebilir.", | |
| 283 | 263 | (Description, Tr) => "Açıklama", |
| 284 | 264 | (DescriptionHelp, En) => { |
| 285 | 265 | "Up to 350 characters, on one line. It is shown under the repository name." |
| @@ -301,9 +281,7 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 301 | 281 | (EnterValue, Tr) => "Bir değer girin.", |
| 302 | 282 | (ForcePushAllowed, En) => "Force push allowed", |
| 303 | 283 | (ForcePushAllowed, Tr) => "Zorla gönderime izin var", |
| 304 | - (ForcePushDesc, En) => "Rewriting history with git push --force is allowed.", | |
| 305 | 284 | (General, En) => "General", |
| 306 | - (ForcePushDesc, Tr) => "git push --force ile geçmişin yeniden yazılmasına izin verilir.", | |
| 307 | 285 | (General, Tr) => "Genel", |
| 308 | 286 | (GeneralSaved, En) => "General settings saved.", |
| 309 | 287 | (GeneralSaved, Tr) => "Genel ayarlar kaydedildi.", |
| @@ -333,11 +311,11 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 333 | 311 | (NewName, Tr) => "Yeni ad", |
| 334 | 312 | (NewOwnerLabel, En) => "New owner (username)", |
| 335 | 313 | (NewOwnerLabel, Tr) => "Yeni sahip (kullanıcı adı)", |
| 336 | - (NewRule, En) => "New rule", | |
| 314 | + (AddRule, En) => "Add rule", | |
| 315 | + (AddRule, Tr) => "Kural ekle", | |
| 337 | 316 | (NoBranchesYet, En) => { |
| 338 | 317 | "No branches yet. The default branch can be chosen after the first push." |
| 339 | 318 | } |
| 340 | - (NewRule, Tr) => "Yeni kural", | |
| 341 | 319 | (NoBranchesYet, Tr) => "Henüz dal yok. Varsayılan dal, ilk gönderimden sonra seçilebilir.", |
| 342 | 320 | (NoCollaborators, En) => "No collaborators yet.", |
| 343 | 321 | (NoCollaborators, Tr) => "Henüz ortak çalışan yok.", |
| @@ -353,16 +331,8 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 353 | 331 | (OwnerIsMember, Tr) => { |
| 354 | 332 | "Depo sahibi zaten tam erişimli bir üyedir ve ortak çalışan olarak eklenemez." |
| 355 | 333 | } |
| 356 | - (PatternHelpA, En) => "A branch name, or a pattern: ", | |
| 357 | - (PatternHelpA, Tr) => "Bir dal adı veya desen: ", | |
| 358 | - (PatternHelpB, En) => " matches within one path segment and ", | |
| 359 | - (PatternHelpB, Tr) => " tek yol parçası içinde eşleşir, ", | |
| 360 | - (PatternHelpC, En) => " matches across ", | |
| 361 | - (PatternHelpC, Tr) => " ise ", | |
| 362 | - (PatternHelpD, En) => ".", | |
| 363 | - (PatternHelpD, Tr) => { | |
| 364 | - " işaretini de aşarak eşleşir." | |
| 365 | - } | |
| 334 | + (PatternHelp, En) => "A name, or * and ** patterns.", | |
| 335 | + (PatternHelp, Tr) => "Bir ad veya * ve ** desenleri.", | |
| 366 | 336 | (PendingTransfers, En) => "Pending transfers", |
| 367 | 337 | (PendingTransfers, Tr) => "Bekleyen devirler", |
| 368 | 338 | (PrivateOption, En) => { |
| @@ -399,17 +369,13 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 399 | 369 | (RepoTransfers, Tr) => "Depo devirleri", |
| 400 | 370 | (RepoUnarchived, En) => "Repository unarchived.", |
| 401 | 371 | (RepoUnarchived, Tr) => "Depo arşivden çıkarıldı.", |
| 402 | - (RequireUpToDate, En) => "Require the pull request head to contain the latest base branch", | |
| 403 | - (RequireUpToDate, Tr) => { | |
| 404 | - "Çekme isteğinin kaynak dalı, hedef dalın en son hâlini içermelidir" | |
| 405 | - } | |
| 372 | + (RequireUpToDate, En) => "Up to date with the base branch", | |
| 373 | + (RequireUpToDate, Tr) => "Hedef dalla güncel", | |
| 406 | 374 | (RequiredApprovals, En) => "Approvals", |
| 407 | 375 | (RequiredApprovals, Tr) => "Onaylar", |
| 408 | - (RestrictPushDesc, En) => "Direct pushes are limited to repo admins.", | |
| 409 | - (RestrictPushTitle, En) => "Only accept changes through pull requests", | |
| 376 | + (RestrictPushTitle, En) => "Only through pull requests", | |
| 410 | 377 | (Role, En) => "Role", |
| 411 | - (RestrictPushDesc, Tr) => "Doğrudan gönderimler depo yöneticileriyle sınırlıdır.", | |
| 412 | - (RestrictPushTitle, Tr) => "Değişiklikler yalnızca çekme istekleri üzerinden kabul edilir", | |
| 378 | + (RestrictPushTitle, Tr) => "Yalnızca çekme istekleri üzerinden", | |
| 413 | 379 | (Role, Tr) => "Rol", |
| 414 | 380 | (RoleAdminDesc, En) => "full repo settings except delete and transfer", |
| 415 | 381 | (RoleAdminDesc, Tr) => "silme ve devir dışında tüm depo ayarları", |
| @@ -427,12 +393,6 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 427 | 393 | (RoleWriteDesc, Tr) => "gönderme (push)", |
| 428 | 394 | (RequiredChecks, En) => "Required status checks", |
| 429 | 395 | (RequiredChecks, Tr) => "Gerekli durum denetimleri", |
| 430 | - (RequiredChecksHelp, En) => { | |
| 431 | - "Contexts that must be successful on the pull request head before it can merge, separated by commas. CI jobs report as ci/<job name>." | |
| 432 | - } | |
| 433 | - (RequiredChecksHelp, Tr) => { | |
| 434 | - "Birleştirmeden önce çekme isteğinin son commit'inde başarılı olması gereken bağlamlar, virgülle ayrılır. CI işleri ci/<iş adı> olarak bildirilir." | |
| 435 | - } | |
| 436 | 396 | (RecentContexts, En) => "Recently seen:", |
| 437 | 397 | (RecentContexts, Tr) => "Son görülenler:", |
| 438 | 398 | (RuleChangesShort, En) => "Blocks on changes requested", |
| @@ -467,13 +427,13 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 467 | 427 | (SecretsHelp, Tr) => { |
| 468 | 428 | "Gizli anahtarlar, bu deponun CI işlerine ortam değişkeni olarak aktarılır. Değerler yalnızca yazılabilir: kaydedildikten sonra geri okunamazlar ve bir gizli anahtarı güncellemek değerini değiştirir." |
| 469 | 429 | } |
| 470 | - (SectionChecks, En) => "Status checks", | |
| 471 | - (SectionMerging, En) => "Merging", | |
| 430 | + (SectionChecks, En) => "Checks", | |
| 431 | + (SectionPullRequests, En) => "Pull requests", | |
| 472 | 432 | (SectionPattern, En) => "Pattern", |
| 473 | 433 | (SectionPushes, En) => "Pushes", |
| 474 | 434 | (SettingsNavLabel, En) => "Settings", |
| 475 | - (SectionChecks, Tr) => "Durum denetimleri", | |
| 476 | - (SectionMerging, Tr) => "Birleştirme", | |
| 435 | + (SectionChecks, Tr) => "Denetimler", | |
| 436 | + (SectionPullRequests, Tr) => "Çekme istekleri", | |
| 477 | 437 | (SectionPattern, Tr) => "Desen", |
| 478 | 438 | (SectionPushes, Tr) => "Gönderimler", |
| 479 | 439 | (SettingsNavLabel, Tr) => "Ayarlar", |
| @@ -679,7 +639,6 @@ mod tests { | ||
| 679 | 639 | K::AllowDeletion, |
| 680 | 640 | K::AllowForcePush, |
| 681 | 641 | K::AlreadyOwner, |
| 682 | - K::ApprovalsHelp, | |
| 683 | 642 | K::ApprovalsRange, |
| 684 | 643 | K::ArchiveHeading, |
| 685 | 644 | K::ArchiveHelp, |
| @@ -715,7 +674,6 @@ mod tests { | ||
| 715 | 674 | K::DeleteRepoHelp, |
| 716 | 675 | K::DeleteTrashHelp, |
| 717 | 676 | K::DeletionAllowed, |
| 718 | - K::DeletionDesc, | |
| 719 | 677 | K::Description, |
| 720 | 678 | K::DescriptionHelp, |
| 721 | 679 | K::DescriptionLong, |
| @@ -723,7 +681,6 @@ mod tests { | ||
| 723 | 681 | K::EnterUsername, |
| 724 | 682 | K::EnterValue, |
| 725 | 683 | K::ForcePushAllowed, |
| 726 | - K::ForcePushDesc, | |
| 727 | 684 | K::General, |
| 728 | 685 | K::GeneralSaved, |
| 729 | 686 | K::MakePublic, |
| @@ -735,17 +692,14 @@ mod tests { | ||
| 735 | 692 | K::NameRule, |
| 736 | 693 | K::NewName, |
| 737 | 694 | K::NewOwnerLabel, |
| 738 | - K::NewRule, | |
| 695 | + K::AddRule, | |
| 739 | 696 | K::NoBranchesYet, |
| 740 | 697 | K::NoCollaborators, |
| 741 | 698 | K::NoPendingTransfer, |
| 742 | 699 | K::NoSecrets, |
| 743 | 700 | K::NotCollaborator, |
| 744 | 701 | K::OwnerIsMember, |
| 745 | - K::PatternHelpA, | |
| 746 | - K::PatternHelpB, | |
| 747 | - K::PatternHelpC, | |
| 748 | - K::PatternHelpD, | |
| 702 | + K::PatternHelp, | |
| 749 | 703 | K::PendingTransfers, |
| 750 | 704 | K::PrivateOption, |
| 751 | 705 | K::PublicOption, |
| @@ -762,7 +716,6 @@ mod tests { | ||
| 762 | 716 | K::RepoUnarchived, |
| 763 | 717 | K::RequireUpToDate, |
| 764 | 718 | K::RequiredApprovals, |
| 765 | - K::RestrictPushDesc, | |
| 766 | 719 | K::RestrictPushTitle, |
| 767 | 720 | K::Role, |
| 768 | 721 | K::RoleAdminDesc, |
| @@ -773,7 +726,6 @@ mod tests { | ||
| 773 | 726 | K::RoleUpdated, |
| 774 | 727 | K::RoleWriteDesc, |
| 775 | 728 | K::RequiredChecks, |
| 776 | - K::RequiredChecksHelp, | |
| 777 | 729 | K::RecentContexts, |
| 778 | 730 | K::RuleChangesShort, |
| 779 | 731 | K::RuleNoExtra, |
| @@ -790,7 +742,7 @@ mod tests { | ||
| 790 | 742 | K::Secrets, |
| 791 | 743 | K::SecretsHelp, |
| 792 | 744 | K::SectionChecks, |
| 793 | - K::SectionMerging, | |
| 745 | + K::SectionPullRequests, | |
| 794 | 746 | K::SectionPattern, |
| 795 | 747 | K::SectionPushes, |
| 796 | 748 | K::SettingsNavLabel, |
crates/forge-web/src/pages/repo.rsmodified+5 -13
| @@ -160,6 +160,8 @@ pub async fn repo_head( | ||
| 160 | 160 | parts.push(SubPart::text(description.as_str())); |
| 161 | 161 | } |
| 162 | 162 | parts.push(SubPart::text(vis)); |
| 163 | + parts.push(SubPart::text(watch_count)); | |
| 164 | + parts.push(SubPart::text(fork_count)); | |
| 163 | 165 | if let Some((source_owner, source_name)) = forked_from { |
| 164 | 166 | parts.push(SubPart::link( |
| 165 | 167 | format!("{} {source_owner}/{source_name}", g::t(lang, K::ForkedFrom)), |
| @@ -202,19 +204,9 @@ pub async fn repo_head( | ||
| 202 | 204 | <button type="submit">(g::t(lang, K::ForkButton))</button> |
| 203 | 205 | </form> |
| 204 | 206 | } |
| 205 | - <details class="menu head-more"> | |
| 206 | - <summary class="button" aria-label=(s(lang, "Repository actions", "Depo işlemleri"))> | |
| 207 | - <span aria-hidden="true">"…"</span> | |
| 208 | - </summary> | |
| 209 | - <div class="menu-list head-more-list"> | |
| 210 | - if let Some((action, csrf, level)) = watch_control { | |
| 211 | - watch_form(lang: lang, action: action, csrf: csrf, level: level, watchers: watchers) | |
| 212 | - } else { | |
| 213 | - <span class="hint">(watch_count.as_str())</span> | |
| 214 | - } | |
| 215 | - <span class="hint">(fork_count.as_str())</span> | |
| 216 | - </div> | |
| 217 | - </details> | |
| 207 | + if let Some((action, csrf, level)) = watch_control { | |
| 208 | + watch_form(lang: lang, action: action, csrf: csrf, level: level, watchers: watchers) | |
| 209 | + } | |
| 218 | 210 | } else if private { |
| 219 | 211 | <span class=(badge)>(vis)</span> |
| 220 | 212 | } |
crates/forge-web/src/pages/repo_settings.rsmodified+99 -107
| @@ -532,10 +532,11 @@ struct RuleCard { | ||
| 532 | 532 | draft: RuleDraft, |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | -/// The rule list: a line per rule, then a muted line for the default branch when no rule covers it, | |
| 536 | -/// then the New rule line last. A rule opens in place with its rule's values, and the rule whose | |
| 537 | -/// draft has an error opens with the draft instead. The New rule line opens with the draft when no | |
| 538 | -/// rule takes it. The rows share one `name`, so opening one closes the rest. | |
| 535 | +/// The rule list: a line per rule with its summary and an Edit word. The last line is the add line: | |
| 536 | +/// when no rule covers the default branch it also names that branch as protected by default, and | |
| 537 | +/// the add line opens the add form, prefilled with the default branch. A rule opens in place with its | |
| 538 | +/// rule's values, and the rule whose draft has an error opens with the draft instead. The add line | |
| 539 | +/// opens with the draft when no rule takes it. The rows share one `name`, so opening one closes the rest. | |
| 539 | 540 | #[component] |
| 540 | 541 | async fn branch_rule_cards( |
| 541 | 542 | lang: Lang, |
| @@ -560,6 +561,7 @@ async fn branch_rule_cards( | ||
| 560 | 561 | <span class=(pill.class)>(pill.text.as_str())</span> |
| 561 | 562 | } |
| 562 | 563 | </span> |
| 564 | + <span class="act">(g::t(lang, K::EditRule))</span> | |
| 563 | 565 | </summary> |
| 564 | 566 | <div class="opened"> |
| 565 | 567 | branch_rule_form(lang: lang, csrf: csrf.clone(), save_action: save_action.clone(), |
| @@ -568,15 +570,13 @@ async fn branch_rule_cards( | ||
| 568 | 570 | </div> |
| 569 | 571 | </details> |
| 570 | 572 | } |
| 571 | - if builtin_row { | |
| 572 | - <div class="line"> | |
| 573 | - <span class="name"><code>(default_branch.as_str())</code></span> | |
| 574 | - <span class="val">(g::t(lang, K::BuiltinRowText))</span> | |
| 575 | - </div> | |
| 576 | - } | |
| 577 | 573 | <details class="row-open" name="branch-rule" open=(new_open)> |
| 578 | 574 | <summary class="line"> |
| 579 | - <span class="name">"+ "(g::t(lang, K::NewRule))</span> | |
| 575 | + if builtin_row { | |
| 576 | + <span class="val"><code>(default_branch.as_str())</code>" "(g::t(lang, K::BuiltinRowText))" · "<span class="act">(g::t(lang, K::AddRule))</span></span> | |
| 577 | + } else { | |
| 578 | + <span class="val"><span class="act">(g::t(lang, K::AddRule))</span></span> | |
| 579 | + } | |
| 580 | 580 | </summary> |
| 581 | 581 | <div class="opened"> |
| 582 | 582 | branch_rule_form(lang: lang, csrf: csrf.clone(), save_action: save_action.clone(), |
| @@ -584,14 +584,15 @@ async fn branch_rule_cards( | ||
| 584 | 584 | draft: new_draft, contexts: contexts.clone()) |
| 585 | 585 | </div> |
| 586 | 586 | </details> |
| 587 | - <p class="hint">(passkeys::s(lang, "Pick a rule to edit it.", "Düzenlemek için bir kural seç."))</p> | |
| 588 | 587 | </div> |
| 589 | 588 | }) |
| 590 | 589 | } |
| 591 | 590 | |
| 592 | -/// The rule form: the pattern, the pushes and merging switches, and the checks, with the save action | |
| 593 | -/// under them. Saving an existing pattern updates its rule. An existing rule also gets a Remove | |
| 594 | -/// action, a confirm_act sibling of the rule form, because forms cannot nest. | |
| 591 | +/// The rule form: the pattern (a new rule only), two groups of toggles, and the approvals and checks, | |
| 592 | +/// with the actions in one row under the form. The Pull requests group hides while Only through | |
| 593 | +/// pull requests is off, unless the rule already keeps a pull request setting, so a saved setting is | |
| 594 | +/// never hidden. The actions sit outside the form and submit it by its id, because forms cannot nest; | |
| 595 | +/// an existing rule's Remove action is a confirm_act beside them, on the same row. | |
| 595 | 596 | #[component] |
| 596 | 597 | async fn branch_rule_form( |
| 597 | 598 | lang: Lang, |
| @@ -615,118 +616,109 @@ async fn branch_rule_form( | ||
| 615 | 616 | error, |
| 616 | 617 | is_new: _, |
| 617 | 618 | } = draft; |
| 619 | + // A pull request setting that is not the default keeps its group in view while the switch is off. | |
| 620 | + let pr_saved = !matches!(required_approvals.trim(), "" | "0") | |
| 621 | + || block_on_changes_requested | |
| 622 | + || require_up_to_date | |
| 623 | + || require_merge_queue | |
| 624 | + || !required_checks.trim().is_empty(); | |
| 625 | + let pr_class = if pr_saved { "rule-pr rule-pr-set" } else { "rule-pr" }; | |
| 618 | 626 | // Field ids are per rule, so two open rule forms never share an id. |
| 619 | 627 | let prefix = match &rule_id { |
| 620 | 628 | Some(id) => format!("rule-{id}"), |
| 621 | 629 | None => "rule-new".to_owned(), |
| 622 | 630 | }; |
| 631 | + let form_id = format!("{prefix}-form"); | |
| 623 | 632 | let pattern_id = format!("{prefix}-pattern"); |
| 624 | 633 | let approvals_id = format!("{prefix}-approvals"); |
| 625 | 634 | let checks_id = format!("{prefix}-checks"); |
| 626 | 635 | Ok(view! { |
| 627 | - <form method="post" action=(save_action.as_str()) class="fields"> | |
| 628 | - if let Some(message) = error { | |
| 629 | - alert(message: message.as_str()) | |
| 630 | - } | |
| 631 | - <input type="hidden" name="csrf" value=(csrf.as_str())> | |
| 632 | - // An existing rule's pattern is fixed: this form only changes what the rule does. A | |
| 633 | - // different pattern is a new rule, added from the New rule line. | |
| 634 | - if rule_id.is_some() { | |
| 635 | - <input type="hidden" name="pattern" value=(pattern.as_str())> | |
| 636 | - <input type="hidden" name="existing" value="1"> | |
| 637 | - <div class="field"> | |
| 638 | - <span class="field-label">(g::t(lang, K::BranchPattern))</span> | |
| 639 | - <span class="field-value"><code>(pattern.as_str())</code></span> | |
| 640 | - <p class="hint">(passkeys::s(lang, "For another branch, add a new rule.", "Başka bir dal için yeni bir kural ekle."))</p> | |
| 641 | - </div> | |
| 642 | - } else { | |
| 643 | - <div class="field"> | |
| 644 | - <label for=(pattern_id.as_str())>(g::t(lang, K::BranchPattern))</label> | |
| 645 | - <input id=(pattern_id.as_str()) type="text" name="pattern" value=(pattern.as_str()) autocomplete="off" spellcheck="false" required=(true)> | |
| 646 | - <p class="hint">(g::t(lang, K::PatternHelpA))<code>"*"</code>(g::t(lang, K::PatternHelpB))<code>"**"</code>(g::t(lang, K::PatternHelpC))<code>"/"</code>(g::t(lang, K::PatternHelpD))</p> | |
| 647 | - </div> | |
| 648 | - } | |
| 649 | - // Each group is a field: its name in the label column, its boxes in the control column, each | |
| 650 | - // box with its note beside it. | |
| 651 | - <div class="field"> | |
| 652 | - <span class="field-label">(g::t(lang, K::SectionPushes))</span> | |
| 653 | - <div class="checks"> | |
| 654 | - <div class="check-row"> | |
| 655 | - <label class="switch"> | |
| 656 | - <input type="checkbox" name="allow_force_push" value="on" checked=(allow_force_push)> | |
| 657 | - <span>(g::t(lang, K::AllowForcePush))</span> | |
| 658 | - </label> | |
| 659 | - <span class="hint">(g::t(lang, K::ForcePushDesc))</span> | |
| 660 | - </div> | |
| 661 | - <div class="check-row"> | |
| 662 | - <label class="switch"> | |
| 663 | - <input type="checkbox" name="allow_deletion" value="on" checked=(allow_deletion)> | |
| 664 | - <span>(g::t(lang, K::AllowDeletion))</span> | |
| 665 | - </label> | |
| 666 | - <span class="hint">(g::t(lang, K::DeletionDesc))</span> | |
| 636 | + <div class="rule-edit"> | |
| 637 | + <form id=(form_id.as_str()) method="post" action=(save_action.as_str()) class="fields branch-rule-form"> | |
| 638 | + if let Some(message) = error { | |
| 639 | + alert(message: message.as_str()) | |
| 640 | + } | |
| 641 | + <input type="hidden" name="csrf" value=(csrf.as_str())> | |
| 642 | + // An existing rule's pattern is fixed: this form only changes what the rule does. A | |
| 643 | + // different pattern is a new rule, added from the Add rule line. | |
| 644 | + if rule_id.is_some() { | |
| 645 | + <input type="hidden" name="pattern" value=(pattern.as_str())> | |
| 646 | + <input type="hidden" name="existing" value="1"> | |
| 647 | + } else { | |
| 648 | + <div class="field"> | |
| 649 | + <label for=(pattern_id.as_str())>(g::t(lang, K::BranchPattern))</label> | |
| 650 | + <input id=(pattern_id.as_str()) type="text" name="pattern" value=(pattern.as_str()) autocomplete="off" spellcheck="false" required=(true)> | |
| 651 | + <p class="hint">(g::t(lang, K::PatternHelp))</p> | |
| 667 | 652 | </div> |
| 668 | - <div class="check-row"> | |
| 669 | - <label class="switch"> | |
| 670 | - <input type="checkbox" name="restrict_push" value="on" checked=(restrict_push)> | |
| 671 | - <span>(g::t(lang, K::RestrictPushTitle))</span> | |
| 672 | - </label> | |
| 673 | - <span class="hint">(g::t(lang, K::RestrictPushDesc))</span> | |
| 653 | + } | |
| 654 | + <div class="rule-section"> | |
| 655 | + <h3 class="rule-head">(g::t(lang, K::SectionPushes))</h3> | |
| 656 | + <div class="field"> | |
| 657 | + <div class="checks"> | |
| 658 | + <label class="switch"> | |
| 659 | + <input type="checkbox" name="allow_force_push" value="on" checked=(allow_force_push)> | |
| 660 | + <span>(g::t(lang, K::AllowForcePush))</span> | |
| 661 | + </label> | |
| 662 | + <label class="switch"> | |
| 663 | + <input type="checkbox" name="allow_deletion" value="on" checked=(allow_deletion)> | |
| 664 | + <span>(g::t(lang, K::AllowDeletion))</span> | |
| 665 | + </label> | |
| 666 | + <label class="switch"> | |
| 667 | + <input type="checkbox" name="restrict_push" value="on" checked=(restrict_push)> | |
| 668 | + <span>(g::t(lang, K::RestrictPushTitle))</span> | |
| 669 | + </label> | |
| 670 | + </div> | |
| 674 | 671 | </div> |
| 675 | 672 | </div> |
| 676 | - </div> | |
| 677 | - <div class="field"> | |
| 678 | - <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label> | |
| 679 | - <input id=(approvals_id.as_str()) type="number" name="required_approvals" min="0" max="20" step="1" inputmode="numeric" value=(required_approvals.as_str())> | |
| 680 | - <p class="hint">(g::t(lang, K::ApprovalsHelp))</p> | |
| 681 | - </div> | |
| 682 | - <div class="field"> | |
| 683 | - <span class="field-label">(g::t(lang, K::SectionMerging))</span> | |
| 684 | - <div class="checks"> | |
| 685 | - <label class="switch"> | |
| 686 | - <input type="checkbox" name="block_on_changes_requested" value="on" checked=(block_on_changes_requested)> | |
| 687 | - <span>(g::t(lang, K::BlockWhileChanges))</span> | |
| 688 | - </label> | |
| 689 | - <label class="switch"> | |
| 690 | - <input type="checkbox" name="require_up_to_date" value="on" checked=(require_up_to_date)> | |
| 691 | - <span>(g::t(lang, K::RequireUpToDate))</span> | |
| 692 | - </label> | |
| 693 | - <div class="check-row"> | |
| 694 | - <label class="switch"> | |
| 695 | - <input type="checkbox" name="require_merge_queue" value="on" checked=(require_merge_queue)> | |
| 696 | - <span>(mq::t(lang, mq::K::RequireMergeQueue))</span> | |
| 697 | - </label> | |
| 698 | - <span class="hint">(mq::t(lang, mq::K::RequireMergeQueueHint))</span> | |
| 673 | + <div class=(pr_class)> | |
| 674 | + <h3 class="rule-head">(g::t(lang, K::SectionPullRequests))</h3> | |
| 675 | + <div class="field"> | |
| 676 | + <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label> | |
| 677 | + <input id=(approvals_id.as_str()) type="number" name="required_approvals" min="0" max="20" step="1" inputmode="numeric" value=(required_approvals.as_str())> | |
| 699 | 678 | </div> |
| 700 | - </div> | |
| 701 | - </div> | |
| 702 | - <div class="field"> | |
| 703 | - <label for=(checks_id.as_str())>(g::t(lang, K::SectionChecks))</label> | |
| 704 | - <input id=(checks_id.as_str()) type="text" name="required_checks" value=(required_checks.as_str()) autocomplete="off" spellcheck="false" placeholder="ci/test, ci/lint" aria-label=(g::t(lang, K::RequiredChecks))> | |
| 705 | - <p class="hint">(g::t(lang, K::RequiredChecksHelp))</p> | |
| 706 | - if !contexts.is_empty() { | |
| 707 | - <div class="acts"> | |
| 708 | - <span class="hint">(g::t(lang, K::RecentContexts))</span> | |
| 709 | - for context in contexts.iter() { | |
| 710 | - <button type="button" class="act" data-check-add=(context.as_str())>(context.as_str())</button> | |
| 679 | + <div class="field"> | |
| 680 | + <div class="checks"> | |
| 681 | + <label class="switch"> | |
| 682 | + <input type="checkbox" name="block_on_changes_requested" value="on" checked=(block_on_changes_requested)> | |
| 683 | + <span>(g::t(lang, K::BlockWhileChanges))</span> | |
| 684 | + </label> | |
| 685 | + <label class="switch"> | |
| 686 | + <input type="checkbox" name="require_up_to_date" value="on" checked=(require_up_to_date)> | |
| 687 | + <span>(g::t(lang, K::RequireUpToDate))</span> | |
| 688 | + </label> | |
| 689 | + <label class="switch"> | |
| 690 | + <input type="checkbox" name="require_merge_queue" value="on" checked=(require_merge_queue)> | |
| 691 | + <span>(mq::t(lang, mq::K::RequireMergeQueue))</span> | |
| 692 | + </label> | |
| 693 | + </div> | |
| 694 | + </div> | |
| 695 | + <div class="field"> | |
| 696 | + <label for=(checks_id.as_str())>(g::t(lang, K::SectionChecks))</label> | |
| 697 | + <input id=(checks_id.as_str()) type="text" name="required_checks" value=(required_checks.as_str()) autocomplete="off" spellcheck="false" placeholder="ci/test, ci/lint" aria-label=(g::t(lang, K::RequiredChecks))> | |
| 698 | + if !contexts.is_empty() { | |
| 699 | + <div class="acts recent-checks"> | |
| 700 | + <span class="hint">(g::t(lang, K::RecentContexts))</span> | |
| 701 | + for context in contexts.iter() { | |
| 702 | + <button type="button" class="act" data-check-add=(context.as_str())>(context.as_str())</button> | |
| 703 | + } | |
| 704 | + </div> | |
| 711 | 705 | } |
| 712 | 706 | </div> |
| 713 | - } | |
| 714 | - </div> | |
| 715 | - <div class="acts"> | |
| 707 | + </div> | |
| 708 | + </form> | |
| 709 | + <div class="acts rule-acts"> | |
| 716 | 710 | if rule_id.is_some() { |
| 717 | - <button type="submit" class="primary">(passkeys::s(lang, "Save changes", "Değişiklikleri kaydet"))</button> | |
| 711 | + <button type="submit" form=(form_id.as_str()) class="primary">(passkeys::s(lang, "Save changes", "Değişiklikleri kaydet"))</button> | |
| 718 | 712 | } else { |
| 719 | - <button type="submit" class="primary">(passkeys::s(lang, "Add rule", "Kuralı ekle"))</button> | |
| 713 | + <button type="submit" form=(form_id.as_str()) class="primary">(g::t(lang, K::AddRule))</button> | |
| 720 | 714 | } |
| 721 | 715 | <button type="button" class="act quiet" data-close-details="">(g::t(lang, K::CancelRule))</button> |
| 716 | + if let Some(id) = &rule_id { | |
| 717 | + confirm_act(lang: lang, label: g::t(lang, K::RemoveRule), action: delete_action.as_str(), csrf: csrf.as_str(), | |
| 718 | + fields: vec![("rule_id".to_owned(), id.clone())]) | |
| 719 | + } | |
| 722 | 720 | </div> |
| 723 | - </form> | |
| 724 | - if let Some(id) = &rule_id { | |
| 725 | - <div class="acts"> | |
| 726 | - confirm_act(lang: lang, label: g::t(lang, K::RemoveRule), action: delete_action.as_str(), csrf: csrf.as_str(), | |
| 727 | - fields: vec![("rule_id".to_owned(), id.clone())]) | |
| 728 | - </div> | |
| 729 | - } | |
| 721 | + </div> | |
| 730 | 722 | }) |
| 731 | 723 | } |
| 732 | 724 |
docs/ui-language.mdmodified+4 -1
| @@ -80,7 +80,10 @@ no `margin-left:auto`, no `justify-content:space-between`, no second column at t | ||
| 80 | 80 | - **Time range**: every log has a When filter (Any time, Last hour, Last 24 hours, Last 7 days, Last |
| 81 | 81 | 30 days, Today, Dates…). Dates… shows From and To day fields in the viewer's timezone, and the tools |
| 82 | 82 | row starts with the count of entries that match, so "how many sign-ins last week" is one glance. |
| 83 | -- **Tool**: `.act`, a word in the accent's ink (14px, 600, radius 12), never the dim colour of a hint. `.act.danger` for destructive. This is what goes in | |
| 83 | +- **Tool**: `.act`, a word in the accent's ink (14px, 600, radius 12), never the dim colour of a hint. | |
| 84 | + A topic's own action, standing alone under its heading in `.sec > .acts` or right in the `.sec` | |
| 85 | + (Rename repository, Transfer repository), takes the small soft pill (32px, like Star) instead, | |
| 86 | + red-worded when dangerous. On a line of facts a tool stays a word. `.act.danger` for destructive. This is what goes in | |
| 84 | 87 | tools rows, in rows and in `.acts`. |
| 85 | 88 | - `reveal(label, id, open)`: a tool that opens its form in place. `open` when a form came back with an error. |
| 86 | 89 | In a `.fields` form its word starts on the controls' edge. What should not be one click away |
scripts/audit/seed.pymodified+6 -0
| @@ -515,6 +515,12 @@ def _(): | ||
| 515 | 515 | seed["hook_id"] = m.group(1) if m and m.group(1) != "new" else None |
| 516 | 516 | |
| 517 | 517 | |
| 518 | +@step("branch rule") | |
| 519 | +def _(): | |
| 520 | + admin.post(f"{R}/settings/branches", {"pattern": "release/*", "restrict_push": "on", | |
| 521 | + "required_approvals": "2", "required_checks": "ci/test"}) | |
| 522 | + | |
| 523 | + | |
| 518 | 524 | @step("secret") |
| 519 | 525 | def _(): |
| 520 | 526 | admin.post(f"{R}/settings/secrets", {"name": "DEPLOY_KEY", "value": "hunter2"}) |
style/_min_menus.scssmodified+0 -16
| @@ -72,7 +72,6 @@ | ||
| 72 | 72 | |
| 73 | 73 | // Actions moved left, so their menus open rightward from them and stay in the window. |
| 74 | 74 | .watch-menu > .menu-list, |
| 75 | -.head-more-list, | |
| 76 | 75 | .pins-menu > .pop-panel, |
| 77 | 76 | .pins-menu > .menu-list, |
| 78 | 77 | .clone > .menu-list, |
| @@ -100,21 +99,6 @@ | ||
| 100 | 99 | max-width: none; |
| 101 | 100 | } |
| 102 | 101 | |
| 103 | - // The watch menu opens inside the fixed More panel: it stays in the panel's flow. | |
| 104 | - .head-more .watch-control, | |
| 105 | - .head-more .watch-menu { | |
| 106 | - display: block; | |
| 107 | - width: 100%; | |
| 108 | - } | |
| 109 | - | |
| 110 | - .head-more .watch-menu > .menu-list { | |
| 111 | - position: static !important; | |
| 112 | - width: 100%; | |
| 113 | - min-width: 0; | |
| 114 | - max-width: 100%; | |
| 115 | - box-shadow: none; | |
| 116 | - } | |
| 117 | - | |
| 118 | 102 | .line .val { |
| 119 | 103 | flex-wrap: wrap; |
| 120 | 104 | min-width: 0; |
style/_one.scssmodified+40 -0
| @@ -3645,3 +3645,43 @@ details.log-group { | ||
| 3645 | 3645 | font-size: 15px; |
| 3646 | 3646 | line-height: 22px; |
| 3647 | 3647 | } |
| 3648 | + | |
| 3649 | +// A topic's own action, standing alone under its heading (Rename repository, Transfer repository, | |
| 3650 | +// Regenerate codes), is a small soft pill like Star, not a word: it is the thing the topic is for. | |
| 3651 | +// Tools on a line of facts stay words. A dangerous one keeps its red word on the pill. | |
| 3652 | +.sec > .acts > details.reveal > summary.act, | |
| 3653 | +.sec > .acts > :is(a.act, button.act), | |
| 3654 | +.sec > .acts > form.act-form > button.act, | |
| 3655 | +.sec > :is(a.act, button.act), | |
| 3656 | +.sec > details > summary.act, | |
| 3657 | +.sec > form > button.act:only-of-type { | |
| 3658 | + height: var(--control-sm); | |
| 3659 | + margin-left: 0; | |
| 3660 | + padding: 0 14px; | |
| 3661 | + border-radius: 15px; | |
| 3662 | + background: var(--surface-2); | |
| 3663 | + color: var(--text); | |
| 3664 | + font-size: 13px; | |
| 3665 | + font-weight: 600; | |
| 3666 | + | |
| 3667 | + &:hover { | |
| 3668 | + background: color-mix(in oklab, var(--surface-2) 88%, var(--text)); | |
| 3669 | + color: var(--text); | |
| 3670 | + } | |
| 3671 | + | |
| 3672 | + &.danger, | |
| 3673 | + &.danger:hover { | |
| 3674 | + background: var(--danger-bg); | |
| 3675 | + color: var(--bad); | |
| 3676 | + } | |
| 3677 | + | |
| 3678 | + &.quiet { | |
| 3679 | + color: var(--muted); | |
| 3680 | + } | |
| 3681 | +} | |
| 3682 | + | |
| 3683 | +// Pills keep their own edge, so a row of them starts on the topic's text edge. | |
| 3684 | +.sec > .acts:has(> details.reveal > summary.act, > a.act, > button.act, > form.act-form > button.act) { | |
| 3685 | + margin-left: 0; | |
| 3686 | + gap: 8px; | |
| 3687 | +} |
style/_one_admin.scssmodified+91 -0
| @@ -306,3 +306,94 @@ $repo: 'main:has(> section.repo-head .tab.active[href$="/settings"])'; | ||
| 306 | 306 | border-bottom: 0; |
| 307 | 307 | } |
| 308 | 308 | } |
| 309 | + | |
| 310 | +// Branch rules. The form has two groups, Pushes and Pull requests, each with a heading and its | |
| 311 | +// fields stacked. Its options are toggles: the checkbox itself is drawn as a switch, so it stays the | |
| 312 | +// control for the keyboard and the label, and its focus ring shows. | |
| 313 | +#{$repo} .rule-section, | |
| 314 | +#{$repo} .rule-pr { | |
| 315 | + display: flex; | |
| 316 | + flex-direction: column; | |
| 317 | + gap: 6px; | |
| 318 | + min-width: 0; | |
| 319 | +} | |
| 320 | + | |
| 321 | +#{$repo} .rule-head { | |
| 322 | + margin: 12px 0 0; | |
| 323 | + font-size: 14px; | |
| 324 | + font-weight: 600; | |
| 325 | + color: var(--muted); | |
| 326 | +} | |
| 327 | + | |
| 328 | +#{$repo} .branch-rule-form label.switch { | |
| 329 | + align-items: center; | |
| 330 | + gap: 12px; | |
| 331 | + cursor: pointer; | |
| 332 | + font-weight: 400; | |
| 333 | + | |
| 334 | + > input[type="checkbox"] { | |
| 335 | + position: relative; | |
| 336 | + flex: none; | |
| 337 | + appearance: none; | |
| 338 | + width: 36px; | |
| 339 | + height: 20px; | |
| 340 | + margin: 0; | |
| 341 | + border: 0; | |
| 342 | + border-radius: 10px; | |
| 343 | + background: var(--surface-2); | |
| 344 | + box-shadow: inset 0 0 0 1.5px var(--border-strong); | |
| 345 | + transition: background 0.15s; | |
| 346 | + | |
| 347 | + &::after { | |
| 348 | + content: ""; | |
| 349 | + position: absolute; | |
| 350 | + top: 3px; | |
| 351 | + left: 3px; | |
| 352 | + width: 14px; | |
| 353 | + height: 14px; | |
| 354 | + border-radius: 50%; | |
| 355 | + background: var(--muted); | |
| 356 | + transition: transform 0.15s, background 0.15s; | |
| 357 | + } | |
| 358 | + | |
| 359 | + &:checked { | |
| 360 | + background: var(--accent); | |
| 361 | + box-shadow: none; | |
| 362 | + | |
| 363 | + &::after { | |
| 364 | + transform: translateX(16px); | |
| 365 | + background: var(--surface); | |
| 366 | + } | |
| 367 | + } | |
| 368 | + | |
| 369 | + &:focus-visible { | |
| 370 | + outline: 2px solid var(--focus); | |
| 371 | + outline-offset: 2px; | |
| 372 | + } | |
| 373 | + } | |
| 374 | +} | |
| 375 | + | |
| 376 | +// Pull requests show only while the rule is restricted to pull requests, live as its switch is ticked. | |
| 377 | +// A rule that already keeps a pull request setting keeps the group in view, so no saved value is hidden. | |
| 378 | +#{$repo} .branch-rule-form:has(input[name="restrict_push"]:not(:checked)) .rule-pr:not(.rule-pr-set) { | |
| 379 | + display: none; | |
| 380 | +} | |
| 381 | + | |
| 382 | +// The actions sit under the form on its control column, one row: Save or Add, Cancel, and Remove rule. | |
| 383 | +#{$repo} .rule-edit { | |
| 384 | + --label-w: 130px; | |
| 385 | +} | |
| 386 | + | |
| 387 | +#{$repo} .rule-acts { | |
| 388 | + align-items: center; | |
| 389 | + margin-left: calc(var(--label-w) + 16px); | |
| 390 | + | |
| 391 | + @media (max-width: 700px) { | |
| 392 | + margin-left: 0; | |
| 393 | + } | |
| 394 | +} | |
| 395 | + | |
| 396 | +// The recently seen checks start on the input's edge, in one line under it. | |
| 397 | +#{$repo} .recent-checks { | |
| 398 | + margin-left: 0; | |
| 399 | +} |
style/_one_shell.scssmodified+25 -70
| @@ -131,31 +131,6 @@ a > .ref-chip, | ||
| 131 | 131 | border: 0; |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | -// Repo actions panel on a phone: one fixed panel inside the window, its watch options inside it. | |
| 135 | -@media (max-width: 899px) { | |
| 136 | - .head-more-list { | |
| 137 | - position: fixed !important; | |
| 138 | - left: 16px !important; | |
| 139 | - right: 16px !important; | |
| 140 | - top: auto; | |
| 141 | - width: auto; | |
| 142 | - min-width: 0; | |
| 143 | - max-width: none; | |
| 144 | - } | |
| 145 | - | |
| 146 | - .head-more-list .watch-menu, | |
| 147 | - .head-more-list .watch-control { | |
| 148 | - width: 100%; | |
| 149 | - min-width: 0; | |
| 150 | - } | |
| 151 | - | |
| 152 | - .head-more-list .watch-menu > summary { | |
| 153 | - width: 100%; | |
| 154 | - max-width: 100%; | |
| 155 | - box-sizing: border-box; | |
| 156 | - } | |
| 157 | -} | |
| 158 | - | |
| 159 | 134 | // Watch options are menu rows: the name only. The longer description stays for screen readers. |
| 160 | 135 | .watch-list .watch-option-desc { |
| 161 | 136 | position: absolute; |
| @@ -166,8 +141,8 @@ a > .ref-chip, | ||
| 166 | 141 | white-space: nowrap; |
| 167 | 142 | } |
| 168 | 143 | |
| 169 | -// The watch menu's button is a soft shape like every other, and inside the repo's "…" panel it is | |
| 170 | -// one of that panel's rows. Its options are menu rows too: 34px, the check before the name. | |
| 144 | +// The watch menu's button is a soft shape like every other action beside a title (the | |
| 145 | +// `.head-title` pill rule below). Its options are menu rows: 34px, the check before the name. | |
| 171 | 146 | .watch-menu > summary { |
| 172 | 147 | height: var(--control-h); |
| 173 | 148 | padding: 0 30px 0 14px; |
| @@ -177,15 +152,18 @@ a > .ref-chip, | ||
| 177 | 152 | font-size: 15px; |
| 178 | 153 | } |
| 179 | 154 | |
| 180 | -.head-more-list .watch-menu > summary { | |
| 181 | - height: 34px; | |
| 182 | - padding: 0 30px 0 12px; | |
| 183 | - border-radius: 12px; | |
| 184 | - background: none; | |
| 185 | - font-size: 14px; | |
| 155 | +// Beside a repo title, the watch button is one of the head's pills: the same height, radius, fill, | |
| 156 | +// and 600 text as Star and Fork. The caret keeps its place at the end. | |
| 157 | +.head-title > .watch-control .watch-menu > summary { | |
| 158 | + box-sizing: border-box; | |
| 159 | + padding: 0 30px 0 18px; | |
| 160 | + font-size: 15px; | |
| 161 | + font-weight: 600; | |
| 162 | + line-height: 1; | |
| 163 | + color: var(--text); | |
| 186 | 164 | |
| 187 | 165 | &:hover { |
| 188 | - background: var(--surface-2); | |
| 166 | + background: color-mix(in oklab, var(--surface-2) 88%, var(--text)); | |
| 189 | 167 | } |
| 190 | 168 | } |
| 191 | 169 | |
| @@ -211,42 +189,6 @@ a > .ref-chip, | ||
| 211 | 189 | } |
| 212 | 190 | } |
| 213 | 191 | |
| 214 | -// The counts in the repo's "…" panel sit on its rows' inset, as quiet rows of their own. | |
| 215 | -.head-more-list > .hint, | |
| 216 | -.head-more-list .watch-control > .hint { | |
| 217 | - display: flex; | |
| 218 | - align-items: center; | |
| 219 | - height: 30px; | |
| 220 | - margin: 0; | |
| 221 | - padding: 0 12px; | |
| 222 | - font-size: 13px; | |
| 223 | -} | |
| 224 | - | |
| 225 | -.head-more-list .watch-menu > summary { | |
| 226 | - justify-content: flex-start; | |
| 227 | -} | |
| 228 | - | |
| 229 | -// Inside the "…" panel the watch options open in place under their row, never as a second panel. | |
| 230 | -.head-more .watch-control, | |
| 231 | -.head-more .watch-menu { | |
| 232 | - display: block; | |
| 233 | - width: 100%; | |
| 234 | -} | |
| 235 | - | |
| 236 | -.head-more .watch-menu > .menu-list { | |
| 237 | - position: static !important; | |
| 238 | - width: 100%; | |
| 239 | - min-width: 0; | |
| 240 | - max-width: 100%; | |
| 241 | - padding: 0 0 4px; | |
| 242 | - box-shadow: none !important; | |
| 243 | - background: none !important; | |
| 244 | -} | |
| 245 | - | |
| 246 | -.head-more-list { | |
| 247 | - min-width: 220px; | |
| 248 | -} | |
| 249 | - | |
| 250 | 192 | .watch-list button.watch-option { |
| 251 | 193 | justify-content: flex-start; |
| 252 | 194 | text-align: left; |
| @@ -257,3 +199,16 @@ a > .ref-chip, | ||
| 257 | 199 | background: var(--surface-2); |
| 258 | 200 | font-weight: 600; |
| 259 | 201 | } |
| 202 | + | |
| 203 | +// In the head the watcher count is in the line under the title, so the watch pill stands alone. | |
| 204 | +.head-title > .watch-control > .hint { | |
| 205 | + display: none; | |
| 206 | +} | |
| 207 | + | |
| 208 | +// On a phone the watch pill is its eye and chevron, so it shares the title's line with Star; its | |
| 209 | +// level stays in the summary's label. | |
| 210 | +@media (max-width: 700px) { | |
| 211 | + .head-title > .watch-control .watch-menu > summary > span { | |
| 212 | + display: none; | |
| 213 | + } | |
| 214 | +} |