forge
Explore
Log in

Don't you dare go Hollow

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 commit

c71bf40008db7a1ca220e6d565cd5922ec6e8502Ahmet Kaan GümüşParent: 409776f
All checks have passed
Show checks
  • 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
Show full message
💄 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
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 /// of its summary pills. The built-in default-branch row has no rule behind it, so it is skipped.379 /// of its summary pills. The built-in default-branch row has no rule behind it, so it is skipped.
380 fn branch_rows(body: &str) -> Vec<Vec<String>> {380 fn branch_rows(body: &str) -> Vec<Vec<String>> {
381 let doc = scraper::Html::parse_document(body);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" row382+ // Every rule row is a `details` with the pattern in its summary's name; the "Add rule" row
383 // has no pattern there, so it drops out.383 // has no pattern there, so it drops out.
384 let cards = scraper::Selector::parse("details.row-open").expect("selector");384 let cards = scraper::Selector::parse("details.row-open").expect("selector");
385 let pattern = scraper::Selector::parse("summary .name code").expect("selector");385 let pattern = scraper::Selector::parse("summary .name code").expect("selector");
@@ -464,7 +464,7 @@ async fn branch_protection_end_to_end() {
464 assert_eq!(page.status, 200, "owner settings page");464 assert_eq!(page.status, 200, "owner settings page");
465 assert!(page.body.contains("Branch protection"), "section missing");465 assert!(page.body.contains("Branch protection"), "section missing");
466 assert!(466 assert!(
467- page.body.contains("(default branch): protected by default"),467+ page.body.contains("protected by default"),
468 "built-in row missing"468 "built-in row missing"
469 );469 );
470 let danger_page = http470 let danger_page = http
@@ -515,7 +515,7 @@ async fn branch_protection_end_to_end() {
515 "main card after add"515 "main card after add"
516 );516 );
517 assert!(517 assert!(
518- !page.body.contains("(default branch): protected by default"),518+ !page.body.contains("protected by default"),
519 "built-in row must disappear once a rule matches"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 .await;626 .await;
627 assert!(rule_row(&page.body, "main").is_none(), "main removed");627 assert!(rule_row(&page.body, "main").is_none(), "main removed");
628 assert!(628 assert!(
629- page.body.contains("(default branch): protected by default"),629+ page.body.contains("protected by default"),
630 "built-in row back after remove"630 "built-in row back after remove"
631 );631 );
632 632
@@ -648,7 +648,7 @@ async fn branch_protection_end_to_end() {
648 http.get("/bob/app/settings?section=branches", Some(&bob))648 http.get("/bob/app/settings?section=branches", Some(&bob))
649 .await649 .await
650 .body650 .body
651- .contains("(default branch): protected by default"),651+ .contains("protected by default"),
652 "write collaborator must not change rules"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 use K::*;92 use K::*;
93 use Lang::{En, Tr};93 use Lang::{En, Tr};
94 match (key, lang) {94 match (key, lang) {
95- (RequireMergeQueue, En) => "Require merge queue",95+ (RequireMergeQueue, En) => "Merge queue",
96- (RequireMergeQueue, Tr) => "Birleştirme sırası iste",96+ (RequireMergeQueue, Tr) => "Birleştirme sırası",
97 (RequireMergeQueueHint, En) => {97 (RequireMergeQueueHint, En) => {
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."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 AllowDeletion,13 AllowDeletion,
14 AllowForcePush,14 AllowForcePush,
15 AlreadyOwner,15 AlreadyOwner,
16- ApprovalsHelp,
17 ApprovalsRange,16 ApprovalsRange,
18 ArchiveHeading,17 ArchiveHeading,
19 ArchiveHelp,18 ArchiveHelp,
@@ -49,7 +48,6 @@ pub enum K {
49 DeleteRepoHelp,48 DeleteRepoHelp,
50 DeleteTrashHelp,49 DeleteTrashHelp,
51 DeletionAllowed,50 DeletionAllowed,
52- DeletionDesc,
53 Description,51 Description,
54 DescriptionHelp,52 DescriptionHelp,
55 DescriptionLong,53 DescriptionLong,
@@ -57,7 +55,6 @@ pub enum K {
57 EnterUsername,55 EnterUsername,
58 EnterValue,56 EnterValue,
59 ForcePushAllowed,57 ForcePushAllowed,
60- ForcePushDesc,
61 General,58 General,
62 GeneralSaved,59 GeneralSaved,
63 MakePublic,60 MakePublic,
@@ -69,17 +66,14 @@ pub enum K {
69 NameRule,66 NameRule,
70 NewName,67 NewName,
71 NewOwnerLabel,68 NewOwnerLabel,
72- NewRule,69+ AddRule,
73 NoBranchesYet,70 NoBranchesYet,
74 NoCollaborators,71 NoCollaborators,
75 NoPendingTransfer,72 NoPendingTransfer,
76 NoSecrets,73 NoSecrets,
77 NotCollaborator,74 NotCollaborator,
78 OwnerIsMember,75 OwnerIsMember,
79- PatternHelpA,76+ PatternHelp,
80- PatternHelpB,
81- PatternHelpC,
82- PatternHelpD,
83 PendingTransfers,77 PendingTransfers,
84 PrivateOption,78 PrivateOption,
85 PublicOption,79 PublicOption,
@@ -96,7 +90,6 @@ pub enum K {
96 RepoUnarchived,90 RepoUnarchived,
97 RequireUpToDate,91 RequireUpToDate,
98 RequiredApprovals,92 RequiredApprovals,
99- RestrictPushDesc,
100 RestrictPushTitle,93 RestrictPushTitle,
101 Role,94 Role,
102 RoleAdminDesc,95 RoleAdminDesc,
@@ -107,7 +100,6 @@ pub enum K {
107 RoleUpdated,100 RoleUpdated,
108 RoleWriteDesc,101 RoleWriteDesc,
109 RequiredChecks,102 RequiredChecks,
110- RequiredChecksHelp,
111 RecentContexts,103 RecentContexts,
112 RuleChangesShort,104 RuleChangesShort,
113 RuleNoExtra,105 RuleNoExtra,
@@ -124,7 +116,7 @@ pub enum K {
124 Secrets,116 Secrets,
125 SecretsHelp,117 SecretsHelp,
126 SectionChecks,118 SectionChecks,
127- SectionMerging,119+ SectionPullRequests,
128 SectionPattern,120 SectionPattern,
129 SectionPushes,121 SectionPushes,
130 SettingsNavLabel,122 SettingsNavLabel,
@@ -167,18 +159,12 @@ pub fn t(lang: Lang, key: K) -> &'static str {
167 }159 }
168 (AddOrUpdate, En) => "Add or update a secret",160 (AddOrUpdate, En) => "Add or update a secret",
169 (AddOrUpdate, Tr) => "Gizli anahtar ekle veya güncelle",161 (AddOrUpdate, Tr) => "Gizli anahtar ekle veya güncelle",
170- (AllowDeletion, En) => "Allow deletion",162+ (AllowDeletion, En) => "Deleting the branch",
171- (AllowDeletion, Tr) => "Silmeye izin verilir",163+ (AllowDeletion, Tr) => "Dalın silinmesi",
172- (AllowForcePush, En) => "Allow force pushes",164+ (AllowForcePush, En) => "Force pushes",
173- (AllowForcePush, Tr) => "Zorla göndermeye izin verilir",165+ (AllowForcePush, Tr) => "Zorla gönderim",
174 (AlreadyOwner, En) => "The repository already belongs to that user.",166 (AlreadyOwner, En) => "The repository already belongs to that user.",
175 (AlreadyOwner, Tr) => "Depo zaten bu kullanıcıya ait.",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 (ApprovalsRange, En) => "required approvals must be a whole number from 0 to 20",168 (ApprovalsRange, En) => "required approvals must be a whole number from 0 to 20",
183 (ApprovalsRange, Tr) => "Gerekli onay sayısı 0 ile 20 arasında bir tam sayı olmalıdır.",169 (ApprovalsRange, Tr) => "Gerekli onay sayısı 0 ile 20 arasında bir tam sayı olmalıdır.",
184 (ArchiveHeading, En) => "Archive",170 (ArchiveHeading, En) => "Archive",
@@ -205,30 +191,26 @@ pub fn t(lang: Lang, key: K) -> &'static str {
205 (ArchivedSecrets, Tr) => "Bu depo arşivlenmiş. Gizli anahtarlar salt okunurdur.",191 (ArchivedSecrets, Tr) => "Bu depo arşivlenmiş. Gizli anahtarlar salt okunurdur.",
206 (BadForm, En) => "The form was not understood. Nothing was changed.",192 (BadForm, En) => "The form was not understood. Nothing was changed.",
207 (BadForm, Tr) => "Form anlaşılamadı. Hiçbir şey değiştirilmedi.",193 (BadForm, Tr) => "Form anlaşılamadı. Hiçbir şey değiştirilmedi.",
208- (BlockWhileChanges, En) => "Block merges while changes are requested",194+ (BlockWhileChanges, En) => "Block while changes are requested",
209- (BlockWhileChanges, Tr) => "Değişiklik istenirken birleştirmeler engellenir",195+ (BlockWhileChanges, Tr) => "Değişiklik istenirken engelle",
210 (BranchMissing, En) => "That branch does not exist. Nothing was saved.",196 (BranchMissing, En) => "That branch does not exist. Nothing was saved.",
211 (BranchMissing, Tr) => "Bu dal mevcut değil. Hiçbir şey kaydedilmedi.",197 (BranchMissing, Tr) => "Bu dal mevcut değil. Hiçbir şey kaydedilmedi.",
212- (BranchPattern, En) => "Branch pattern",198+ (BranchPattern, En) => "Branch",
213- (BranchPattern, Tr) => "Dal deseni",199+ (BranchPattern, Tr) => "Dal",
214 (BranchProtection, En) => "Branch protection",200 (BranchProtection, En) => "Branch protection",
215 (BranchProtection, Tr) => "Dal koruması",201 (BranchProtection, Tr) => "Dal koruması",
216 (BranchProtectionHelp, En) => {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 (BranchProtectionHelp, Tr) => {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 (BranchRuleRemoved, En) => "Branch rule removed.",208 (BranchRuleRemoved, En) => "Branch rule removed.",
223 (BranchRuleRemoved, Tr) => "Dal kuralı kaldırıldı.",209 (BranchRuleRemoved, Tr) => "Dal kuralı kaldırıldı.",
224 (BranchRuleSaved, En) => "Branch rule saved.",210 (BranchRuleSaved, En) => "Branch rule saved.",
225 (BranchRuleSaved, Tr) => "Dal kuralı kaydedildi.",211 (BranchRuleSaved, Tr) => "Dal kuralı kaydedildi.",
226- (BuiltinRowText, En) => {212+ (BuiltinRowText, En) => "protected by default",
227- " (default branch): protected by default; add a rule for it to change this."213+ (BuiltinRowText, Tr) => "varsayılan olarak korunur",
228- }
229- (BuiltinRowText, Tr) => {
230- " (varsayılan dal): varsayılan olarak korunur; bunu değiştirmek için bir kural ekleyin."
231- }
232 (CancelRule, En) => "Cancel",214 (CancelRule, En) => "Cancel",
233 (CancelRule, Tr) => "Vazgeç",215 (CancelRule, Tr) => "Vazgeç",
234 (CancelTransfer, En) => "Cancel transfer",216 (CancelTransfer, En) => "Cancel transfer",
@@ -277,9 +259,7 @@ pub fn t(lang: Lang, key: K) -> &'static str {
277 }259 }
278 (DeletionAllowed, En) => "Deletion allowed",260 (DeletionAllowed, En) => "Deletion allowed",
279 (DeletionAllowed, Tr) => "Silmeye izin var",261 (DeletionAllowed, Tr) => "Silmeye izin var",
280- (DeletionDesc, En) => "The branch can be deleted.",
281 (Description, En) => "Description",262 (Description, En) => "Description",
282- (DeletionDesc, Tr) => "Dal silinebilir.",
283 (Description, Tr) => "Açıklama",263 (Description, Tr) => "Açıklama",
284 (DescriptionHelp, En) => {264 (DescriptionHelp, En) => {
285 "Up to 350 characters, on one line. It is shown under the repository name."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 (EnterValue, Tr) => "Bir değer girin.",281 (EnterValue, Tr) => "Bir değer girin.",
302 (ForcePushAllowed, En) => "Force push allowed",282 (ForcePushAllowed, En) => "Force push allowed",
303 (ForcePushAllowed, Tr) => "Zorla gönderime izin var",283 (ForcePushAllowed, Tr) => "Zorla gönderime izin var",
304- (ForcePushDesc, En) => "Rewriting history with git push --force is allowed.",
305 (General, En) => "General",284 (General, En) => "General",
306- (ForcePushDesc, Tr) => "git push --force ile geçmişin yeniden yazılmasına izin verilir.",
307 (General, Tr) => "Genel",285 (General, Tr) => "Genel",
308 (GeneralSaved, En) => "General settings saved.",286 (GeneralSaved, En) => "General settings saved.",
309 (GeneralSaved, Tr) => "Genel ayarlar kaydedildi.",287 (GeneralSaved, Tr) => "Genel ayarlar kaydedildi.",
@@ -333,11 +311,11 @@ pub fn t(lang: Lang, key: K) -> &'static str {
333 (NewName, Tr) => "Yeni ad",311 (NewName, Tr) => "Yeni ad",
334 (NewOwnerLabel, En) => "New owner (username)",312 (NewOwnerLabel, En) => "New owner (username)",
335 (NewOwnerLabel, Tr) => "Yeni sahip (kullanıcı adı)",313 (NewOwnerLabel, Tr) => "Yeni sahip (kullanıcı adı)",
336- (NewRule, En) => "New rule",314+ (AddRule, En) => "Add rule",
315+ (AddRule, Tr) => "Kural ekle",
337 (NoBranchesYet, En) => {316 (NoBranchesYet, En) => {
338 "No branches yet. The default branch can be chosen after the first push."317 "No branches yet. The default branch can be chosen after the first push."
339 }318 }
340- (NewRule, Tr) => "Yeni kural",
341 (NoBranchesYet, Tr) => "Henüz dal yok. Varsayılan dal, ilk gönderimden sonra seçilebilir.",319 (NoBranchesYet, Tr) => "Henüz dal yok. Varsayılan dal, ilk gönderimden sonra seçilebilir.",
342 (NoCollaborators, En) => "No collaborators yet.",320 (NoCollaborators, En) => "No collaborators yet.",
343 (NoCollaborators, Tr) => "Henüz ortak çalışan yok.",321 (NoCollaborators, Tr) => "Henüz ortak çalışan yok.",
@@ -353,16 +331,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
353 (OwnerIsMember, Tr) => {331 (OwnerIsMember, Tr) => {
354 "Depo sahibi zaten tam erişimli bir üyedir ve ortak çalışan olarak eklenemez."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: ",334+ (PatternHelp, En) => "A name, or * and ** patterns.",
357- (PatternHelpA, Tr) => "Bir dal adı veya desen: ",335+ (PatternHelp, Tr) => "Bir ad veya * ve ** desenleri.",
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- }
366 (PendingTransfers, En) => "Pending transfers",336 (PendingTransfers, En) => "Pending transfers",
367 (PendingTransfers, Tr) => "Bekleyen devirler",337 (PendingTransfers, Tr) => "Bekleyen devirler",
368 (PrivateOption, En) => {338 (PrivateOption, En) => {
@@ -399,17 +369,13 @@ pub fn t(lang: Lang, key: K) -> &'static str {
399 (RepoTransfers, Tr) => "Depo devirleri",369 (RepoTransfers, Tr) => "Depo devirleri",
400 (RepoUnarchived, En) => "Repository unarchived.",370 (RepoUnarchived, En) => "Repository unarchived.",
401 (RepoUnarchived, Tr) => "Depo arşivden çıkarıldı.",371 (RepoUnarchived, Tr) => "Depo arşivden çıkarıldı.",
402- (RequireUpToDate, En) => "Require the pull request head to contain the latest base branch",372+ (RequireUpToDate, En) => "Up to date with the base branch",
403- (RequireUpToDate, Tr) => {373+ (RequireUpToDate, Tr) => "Hedef dalla güncel",
404- "Çekme isteğinin kaynak dalı, hedef dalın en son hâlini içermelidir"
405- }
406 (RequiredApprovals, En) => "Approvals",374 (RequiredApprovals, En) => "Approvals",
407 (RequiredApprovals, Tr) => "Onaylar",375 (RequiredApprovals, Tr) => "Onaylar",
408- (RestrictPushDesc, En) => "Direct pushes are limited to repo admins.",376+ (RestrictPushTitle, En) => "Only through pull requests",
409- (RestrictPushTitle, En) => "Only accept changes through pull requests",
410 (Role, En) => "Role",377 (Role, En) => "Role",
411- (RestrictPushDesc, Tr) => "Doğrudan gönderimler depo yöneticileriyle sınırlıdır.",378+ (RestrictPushTitle, Tr) => "Yalnızca çekme istekleri üzerinden",
412- (RestrictPushTitle, Tr) => "Değişiklikler yalnızca çekme istekleri üzerinden kabul edilir",
413 (Role, Tr) => "Rol",379 (Role, Tr) => "Rol",
414 (RoleAdminDesc, En) => "full repo settings except delete and transfer",380 (RoleAdminDesc, En) => "full repo settings except delete and transfer",
415 (RoleAdminDesc, Tr) => "silme ve devir dışında tüm depo ayarları",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 (RoleWriteDesc, Tr) => "gönderme (push)",393 (RoleWriteDesc, Tr) => "gönderme (push)",
428 (RequiredChecks, En) => "Required status checks",394 (RequiredChecks, En) => "Required status checks",
429 (RequiredChecks, Tr) => "Gerekli durum denetimleri",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 (RecentContexts, En) => "Recently seen:",396 (RecentContexts, En) => "Recently seen:",
437 (RecentContexts, Tr) => "Son görülenler:",397 (RecentContexts, Tr) => "Son görülenler:",
438 (RuleChangesShort, En) => "Blocks on changes requested",398 (RuleChangesShort, En) => "Blocks on changes requested",
@@ -467,13 +427,13 @@ pub fn t(lang: Lang, key: K) -> &'static str {
467 (SecretsHelp, Tr) => {427 (SecretsHelp, Tr) => {
468 "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."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",430+ (SectionChecks, En) => "Checks",
471- (SectionMerging, En) => "Merging",431+ (SectionPullRequests, En) => "Pull requests",
472 (SectionPattern, En) => "Pattern",432 (SectionPattern, En) => "Pattern",
473 (SectionPushes, En) => "Pushes",433 (SectionPushes, En) => "Pushes",
474 (SettingsNavLabel, En) => "Settings",434 (SettingsNavLabel, En) => "Settings",
475- (SectionChecks, Tr) => "Durum denetimleri",435+ (SectionChecks, Tr) => "Denetimler",
476- (SectionMerging, Tr) => "Birleştirme",436+ (SectionPullRequests, Tr) => "Çekme istekleri",
477 (SectionPattern, Tr) => "Desen",437 (SectionPattern, Tr) => "Desen",
478 (SectionPushes, Tr) => "Gönderimler",438 (SectionPushes, Tr) => "Gönderimler",
479 (SettingsNavLabel, Tr) => "Ayarlar",439 (SettingsNavLabel, Tr) => "Ayarlar",
@@ -679,7 +639,6 @@ mod tests {
679 K::AllowDeletion,639 K::AllowDeletion,
680 K::AllowForcePush,640 K::AllowForcePush,
681 K::AlreadyOwner,641 K::AlreadyOwner,
682- K::ApprovalsHelp,
683 K::ApprovalsRange,642 K::ApprovalsRange,
684 K::ArchiveHeading,643 K::ArchiveHeading,
685 K::ArchiveHelp,644 K::ArchiveHelp,
@@ -715,7 +674,6 @@ mod tests {
715 K::DeleteRepoHelp,674 K::DeleteRepoHelp,
716 K::DeleteTrashHelp,675 K::DeleteTrashHelp,
717 K::DeletionAllowed,676 K::DeletionAllowed,
718- K::DeletionDesc,
719 K::Description,677 K::Description,
720 K::DescriptionHelp,678 K::DescriptionHelp,
721 K::DescriptionLong,679 K::DescriptionLong,
@@ -723,7 +681,6 @@ mod tests {
723 K::EnterUsername,681 K::EnterUsername,
724 K::EnterValue,682 K::EnterValue,
725 K::ForcePushAllowed,683 K::ForcePushAllowed,
726- K::ForcePushDesc,
727 K::General,684 K::General,
728 K::GeneralSaved,685 K::GeneralSaved,
729 K::MakePublic,686 K::MakePublic,
@@ -735,17 +692,14 @@ mod tests {
735 K::NameRule,692 K::NameRule,
736 K::NewName,693 K::NewName,
737 K::NewOwnerLabel,694 K::NewOwnerLabel,
738- K::NewRule,695+ K::AddRule,
739 K::NoBranchesYet,696 K::NoBranchesYet,
740 K::NoCollaborators,697 K::NoCollaborators,
741 K::NoPendingTransfer,698 K::NoPendingTransfer,
742 K::NoSecrets,699 K::NoSecrets,
743 K::NotCollaborator,700 K::NotCollaborator,
744 K::OwnerIsMember,701 K::OwnerIsMember,
745- K::PatternHelpA,702+ K::PatternHelp,
746- K::PatternHelpB,
747- K::PatternHelpC,
748- K::PatternHelpD,
749 K::PendingTransfers,703 K::PendingTransfers,
750 K::PrivateOption,704 K::PrivateOption,
751 K::PublicOption,705 K::PublicOption,
@@ -762,7 +716,6 @@ mod tests {
762 K::RepoUnarchived,716 K::RepoUnarchived,
763 K::RequireUpToDate,717 K::RequireUpToDate,
764 K::RequiredApprovals,718 K::RequiredApprovals,
765- K::RestrictPushDesc,
766 K::RestrictPushTitle,719 K::RestrictPushTitle,
767 K::Role,720 K::Role,
768 K::RoleAdminDesc,721 K::RoleAdminDesc,
@@ -773,7 +726,6 @@ mod tests {
773 K::RoleUpdated,726 K::RoleUpdated,
774 K::RoleWriteDesc,727 K::RoleWriteDesc,
775 K::RequiredChecks,728 K::RequiredChecks,
776- K::RequiredChecksHelp,
777 K::RecentContexts,729 K::RecentContexts,
778 K::RuleChangesShort,730 K::RuleChangesShort,
779 K::RuleNoExtra,731 K::RuleNoExtra,
@@ -790,7 +742,7 @@ mod tests {
790 K::Secrets,742 K::Secrets,
791 K::SecretsHelp,743 K::SecretsHelp,
792 K::SectionChecks,744 K::SectionChecks,
793- K::SectionMerging,745+ K::SectionPullRequests,
794 K::SectionPattern,746 K::SectionPattern,
795 K::SectionPushes,747 K::SectionPushes,
796 K::SettingsNavLabel,748 K::SettingsNavLabel,
crates/forge-web/src/pages/repo.rsmodified+5 -13
@@ -160,6 +160,8 @@ pub async fn repo_head(
160 parts.push(SubPart::text(description.as_str()));160 parts.push(SubPart::text(description.as_str()));
161 }161 }
162 parts.push(SubPart::text(vis));162 parts.push(SubPart::text(vis));
163+ parts.push(SubPart::text(watch_count));
164+ parts.push(SubPart::text(fork_count));
163 if let Some((source_owner, source_name)) = forked_from {165 if let Some((source_owner, source_name)) = forked_from {
164 parts.push(SubPart::link(166 parts.push(SubPart::link(
165 format!("{} {source_owner}/{source_name}", g::t(lang, K::ForkedFrom)),167 format!("{} {source_owner}/{source_name}", g::t(lang, K::ForkedFrom)),
@@ -202,19 +204,9 @@ pub async fn repo_head(
202 <button type="submit">(g::t(lang, K::ForkButton))</button>204 <button type="submit">(g::t(lang, K::ForkButton))</button>
203 </form>205 </form>
204 }206 }
205- <details class="menu head-more">207+ if let Some((action, csrf, level)) = watch_control {
206- <summary class="button" aria-label=(s(lang, "Repository actions", "Depo işlemleri"))>208+ watch_form(lang: lang, action: action, csrf: csrf, level: level, watchers: watchers)
207- <span aria-hidden="true">"…"</span>209+ }
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>
218 } else if private {210 } else if private {
219 <span class=(badge)>(vis)</span>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 draft: RuleDraft,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,535+/// The rule list: a line per rule with its summary and an Edit word. The last line is the add line:
536-/// then the New rule line last. A rule opens in place with its rule's values, and the rule whose536+/// when no rule covers the default branch it also names that branch as protected by default, and
537-/// draft has an error opens with the draft instead. The New rule line opens with the draft when no537+/// the add line opens the add form, prefilled with the default branch. A rule opens in place with its
538-/// rule takes it. The rows share one `name`, so opening one closes the rest.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 #[component]540 #[component]
540 async fn branch_rule_cards(541 async fn branch_rule_cards(
541 lang: Lang,542 lang: Lang,
@@ -560,6 +561,7 @@ async fn branch_rule_cards(
560 <span class=(pill.class)>(pill.text.as_str())</span>561 <span class=(pill.class)>(pill.text.as_str())</span>
561 }562 }
562 </span>563 </span>
564+ <span class="act">(g::t(lang, K::EditRule))</span>
563 </summary>565 </summary>
564 <div class="opened">566 <div class="opened">
565 branch_rule_form(lang: lang, csrf: csrf.clone(), save_action: save_action.clone(),567 branch_rule_form(lang: lang, csrf: csrf.clone(), save_action: save_action.clone(),
@@ -568,15 +570,13 @@ async fn branch_rule_cards(
568 </div>570 </div>
569 </details>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 <details class="row-open" name="branch-rule" open=(new_open)>573 <details class="row-open" name="branch-rule" open=(new_open)>
578 <summary class="line">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 </summary>580 </summary>
581 <div class="opened">581 <div class="opened">
582 branch_rule_form(lang: lang, csrf: csrf.clone(), save_action: save_action.clone(),582 branch_rule_form(lang: lang, csrf: csrf.clone(), save_action: save_action.clone(),
@@ -584,14 +584,15 @@ async fn branch_rule_cards(
584 draft: new_draft, contexts: contexts.clone())584 draft: new_draft, contexts: contexts.clone())
585 </div>585 </div>
586 </details>586 </details>
587- <p class="hint">(passkeys::s(lang, "Pick a rule to edit it.", "Düzenlemek için bir kural seç."))</p>
588 </div>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 action591+/// The rule form: the pattern (a new rule only), two groups of toggles, and the approvals and checks,
593-/// under them. Saving an existing pattern updates its rule. An existing rule also gets a Remove592+/// with the actions in one row under the form. The Pull requests group hides while Only through
594-/// action, a confirm_act sibling of the rule form, because forms cannot nest.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 #[component]596 #[component]
596 async fn branch_rule_form(597 async fn branch_rule_form(
597 lang: Lang,598 lang: Lang,
@@ -615,118 +616,109 @@ async fn branch_rule_form(
615 error,616 error,
616 is_new: _,617 is_new: _,
617 } = draft;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 // Field ids are per rule, so two open rule forms never share an id.626 // Field ids are per rule, so two open rule forms never share an id.
619 let prefix = match &rule_id {627 let prefix = match &rule_id {
620 Some(id) => format!("rule-{id}"),628 Some(id) => format!("rule-{id}"),
621 None => "rule-new".to_owned(),629 None => "rule-new".to_owned(),
622 };630 };
631+ let form_id = format!("{prefix}-form");
623 let pattern_id = format!("{prefix}-pattern");632 let pattern_id = format!("{prefix}-pattern");
624 let approvals_id = format!("{prefix}-approvals");633 let approvals_id = format!("{prefix}-approvals");
625 let checks_id = format!("{prefix}-checks");634 let checks_id = format!("{prefix}-checks");
626 Ok(view! {635 Ok(view! {
627- <form method="post" action=(save_action.as_str()) class="fields">636+ <div class="rule-edit">
628- if let Some(message) = error {637+ <form id=(form_id.as_str()) method="post" action=(save_action.as_str()) class="fields branch-rule-form">
629- alert(message: message.as_str())638+ if let Some(message) = error {
630- }639+ alert(message: message.as_str())
631- <input type="hidden" name="csrf" value=(csrf.as_str())>640+ }
632- // An existing rule's pattern is fixed: this form only changes what the rule does. A641+ <input type="hidden" name="csrf" value=(csrf.as_str())>
633- // different pattern is a new rule, added from the New rule line.642+ // An existing rule's pattern is fixed: this form only changes what the rule does. A
634- if rule_id.is_some() {643+ // different pattern is a new rule, added from the Add rule line.
635- <input type="hidden" name="pattern" value=(pattern.as_str())>644+ if rule_id.is_some() {
636- <input type="hidden" name="existing" value="1">645+ <input type="hidden" name="pattern" value=(pattern.as_str())>
637- <div class="field">646+ <input type="hidden" name="existing" value="1">
638- <span class="field-label">(g::t(lang, K::BranchPattern))</span>647+ } else {
639- <span class="field-value"><code>(pattern.as_str())</code></span>648+ <div class="field">
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>649+ <label for=(pattern_id.as_str())>(g::t(lang, K::BranchPattern))</label>
641- </div>650+ <input id=(pattern_id.as_str()) type="text" name="pattern" value=(pattern.as_str()) autocomplete="off" spellcheck="false" required=(true)>
642- } else {651+ <p class="hint">(g::t(lang, K::PatternHelp))</p>
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>
667 </div>652 </div>
668- <div class="check-row">653+ }
669- <label class="switch">654+ <div class="rule-section">
670- <input type="checkbox" name="restrict_push" value="on" checked=(restrict_push)>655+ <h3 class="rule-head">(g::t(lang, K::SectionPushes))</h3>
671- <span>(g::t(lang, K::RestrictPushTitle))</span>656+ <div class="field">
672- </label>657+ <div class="checks">
673- <span class="hint">(g::t(lang, K::RestrictPushDesc))</span>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 </div>671 </div>
675 </div>672 </div>
676- </div>673+ <div class=(pr_class)>
677- <div class="field">674+ <h3 class="rule-head">(g::t(lang, K::SectionPullRequests))</h3>
678- <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label>675+ <div class="field">
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())>676+ <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label>
680- <p class="hint">(g::t(lang, K::ApprovalsHelp))</p>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())>
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>
699 </div>678 </div>
700- </div>679+ <div class="field">
701- </div>680+ <div class="checks">
702- <div class="field">681+ <label class="switch">
703- <label for=(checks_id.as_str())>(g::t(lang, K::SectionChecks))</label>682+ <input type="checkbox" name="block_on_changes_requested" value="on" checked=(block_on_changes_requested)>
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))>683+ <span>(g::t(lang, K::BlockWhileChanges))</span>
705- <p class="hint">(g::t(lang, K::RequiredChecksHelp))</p>684+ </label>
706- if !contexts.is_empty() {685+ <label class="switch">
707- <div class="acts">686+ <input type="checkbox" name="require_up_to_date" value="on" checked=(require_up_to_date)>
708- <span class="hint">(g::t(lang, K::RecentContexts))</span>687+ <span>(g::t(lang, K::RequireUpToDate))</span>
709- for context in contexts.iter() {688+ </label>
710- <button type="button" class="act" data-check-add=(context.as_str())>(context.as_str())</button>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 </div>706 </div>
713- }707+ </div>
714- </div>708+ </form>
715- <div class="acts">709+ <div class="acts rule-acts">
716 if rule_id.is_some() {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 } else {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 <button type="button" class="act quiet" data-close-details="">(g::t(lang, K::CancelRule))</button>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 </div>720 </div>
723- </form>721+ </div>
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- }
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 - **Time range**: every log has a When filter (Any time, Last hour, Last 24 hours, Last 7 days, Last80 - **Time range**: every log has a When filter (Any time, Last hour, Last 24 hours, Last 7 days, Last
81 30 days, Today, Dates…). Dates… shows From and To day fields in the viewer's timezone, and the tools81 30 days, Today, Dates…). Dates… shows From and To day fields in the viewer's timezone, and the tools
82 row starts with the count of entries that match, so "how many sign-ins last week" is one glance.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 in83+- **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 tools rows, in rows and in `.acts`.87 tools rows, in rows and in `.acts`.
85 - `reveal(label, id, open)`: a tool that opens its form in place. `open` when a form came back with an error.88 - `reveal(label, id, open)`: a tool that opens its form in place. `open` when a form came back with an error.
86 In a `.fields` form its word starts on the controls' edge. What should not be one click away89 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 seed["hook_id"] = m.group(1) if m and m.group(1) != "new" else None515 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 @step("secret")524 @step("secret")
519 def _():525 def _():
520 admin.post(f"{R}/settings/secrets", {"name": "DEPLOY_KEY", "value": "hunter2"})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 // Actions moved left, so their menus open rightward from them and stay in the window.73 // Actions moved left, so their menus open rightward from them and stay in the window.
74 .watch-menu > .menu-list,74 .watch-menu > .menu-list,
75-.head-more-list,
76 .pins-menu > .pop-panel,75 .pins-menu > .pop-panel,
77 .pins-menu > .menu-list,76 .pins-menu > .menu-list,
78 .clone > .menu-list,77 .clone > .menu-list,
@@ -100,21 +99,6 @@
100 max-width: none;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 .line .val {102 .line .val {
119 flex-wrap: wrap;103 flex-wrap: wrap;
120 min-width: 0;104 min-width: 0;
style/_one.scssmodified+40 -0
@@ -3645,3 +3645,43 @@ details.log-group {
3645 font-size: 15px;3645 font-size: 15px;
3646 line-height: 22px;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 border-bottom: 0;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 border: 0;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 // Watch options are menu rows: the name only. The longer description stays for screen readers.134 // Watch options are menu rows: the name only. The longer description stays for screen readers.
160 .watch-list .watch-option-desc {135 .watch-list .watch-option-desc {
161 position: absolute;136 position: absolute;
@@ -166,8 +141,8 @@ a > .ref-chip,
166 white-space: nowrap;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 is144+// The watch menu's button is a soft shape like every other action beside a title (the
170-// one of that panel's rows. Its options are menu rows too: 34px, the check before the name.145+// `.head-title` pill rule below). Its options are menu rows: 34px, the check before the name.
171 .watch-menu > summary {146 .watch-menu > summary {
172 height: var(--control-h);147 height: var(--control-h);
173 padding: 0 30px 0 14px;148 padding: 0 30px 0 14px;
@@ -177,15 +152,18 @@ a > .ref-chip,
177 font-size: 15px;152 font-size: 15px;
178 }153 }
179 154
180-.head-more-list .watch-menu > summary {155+// Beside a repo title, the watch button is one of the head's pills: the same height, radius, fill,
181- height: 34px;156+// and 600 text as Star and Fork. The caret keeps its place at the end.
182- padding: 0 30px 0 12px;157+.head-title > .watch-control .watch-menu > summary {
183- border-radius: 12px;158+ box-sizing: border-box;
184- background: none;159+ padding: 0 30px 0 18px;
185- font-size: 14px;160+ font-size: 15px;
161+ font-weight: 600;
162+ line-height: 1;
163+ color: var(--text);
186 164
187 &:hover {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 .watch-list button.watch-option {192 .watch-list button.watch-option {
251 justify-content: flex-start;193 justify-content: flex-start;
252 text-align: left;194 text-align: left;
@@ -257,3 +199,16 @@ a > .ref-chip,
257 background: var(--surface-2);199 background: var(--surface-2);
258 font-weight: 600;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+}