fabrica

hanna/fabrica

fix(web): center-floating + button, disabled object-format field, checkbox styling

63945cc · hanna committed on 2026-07-25

Fix the create menu drifting to the middle of the top bar when signed in (two
margin-left:auto elements were splitting the free space; the search now yields
to the create menu). Show the repo object format as a disabled select under
Visibility instead of a muted note. Style checkboxes with accent-color and a
consistent size, and give the email-visibility toggle a clean bordered row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed by hannaSSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
2 files changed · +38 −8UnifiedSplit
assets/base.css +34 −4
@@ -132,6 +132,12 @@ code, pre, .mono {
132 flex: 0 1 28rem;132 flex: 0 1 28rem;
133 margin-left: auto;133 margin-left: auto;
134}134}
135/* When the create menu is present it owns the right-alignment, so the search
136 must not add a second auto margin (two would split the free space and float
137 the create menu into the middle). */
138.topbar-create ~ .topbar-search {
139 margin-left: 0;
140}
135.topbar-search input[type="search"] {141.topbar-search input[type="search"] {
136 width: 100%;142 width: 100%;
137 padding: 0.3rem 0.6rem;143 padding: 0.3rem 0.6rem;
@@ -817,10 +823,19 @@ body.drawer-open .drawer-backdrop {
817 margin-top: 0;823 margin-top: 0;
818}824}
819.email-list {825.email-list {
820 margin-bottom: 1rem;826 margin-bottom: 0;
821}827}
822.email-visibility {828.email-visibility {
823 margin: 0.5rem 0 1rem;829 margin: 0;
830 padding: 0.85rem 0;
831 border-top: 1px solid var(--fb-border);
832 border-bottom: 1px solid var(--fb-border);
833}
834.email-visibility label.checkbox {
835 margin: 0;
836}
837.email-add {
838 margin-top: 1rem;
824}839}
825.email-add label {840.email-add label {
826 margin-top: 0;841 margin-top: 0;
@@ -869,6 +884,12 @@ select {
869 border: 1px solid var(--fb-border);884 border: 1px solid var(--fb-border);
870 border-radius: var(--fb-radius);885 border-radius: var(--fb-radius);
871}886}
887input:disabled,
888textarea:disabled,
889select:disabled {
890 opacity: 0.6;
891 cursor: not-allowed;
892}
872input:focus,893input:focus,
873textarea:focus,894textarea:focus,
874select:focus {895select:focus {
@@ -949,15 +970,24 @@ select:focus {
949 font-size: 0.9em;970 font-size: 0.9em;
950 font-weight: 600;971 font-weight: 600;
951}972}
973input[type="checkbox"],
974input[type="radio"] {
975 accent-color: var(--fb-accent);
976 width: 1.05rem;
977 height: 1.05rem;
978 cursor: pointer;
979}
952label.checkbox {980label.checkbox {
953 display: inline-flex;981 display: inline-flex;
954 align-items: center;982 align-items: center;
955 gap: 0.3rem;983 gap: 0.45rem;
956 margin: 0 1rem 0 0;984 margin: 0 1rem 0 0;
957 font-weight: 400;985 font-weight: 400;
986 cursor: pointer;
958}987}
959label.checkbox input {988label.checkbox input {
960 width: auto;989 width: 1.05rem;
990 flex: none;
961}991}
962/* Link slots stack full-width; the Add button sits beside the last one. */992/* Link slots stack full-width; the Add button sits beside the last one. */
963.link-fields {993.link-fields {
crates/web/src/repo.rs +4 −4
@@ -987,6 +987,10 @@ async fn repo_settings_view(
987 (vis_option(Visibility::Internal, "Internal — any signed-in user"))987 (vis_option(Visibility::Internal, "Internal — any signed-in user"))
988 (vis_option(Visibility::Private, "Private — only you and collaborators"))988 (vis_option(Visibility::Private, "Private — only you and collaborators"))
989 }989 }
990 label for="object_format" { "Object format" }
991 select id="object_format" disabled title="Fixed at creation" {
992 option { (ctx.repo.object_format.to_uppercase()) }
993 }
990 label { "Features" }994 label { "Features" }
991 label class="checkbox" {995 label class="checkbox" {
992 input type="checkbox" name="issues_enabled" value="1"996 input type="checkbox" name="issues_enabled" value="1"
@@ -996,10 +1000,6 @@ async fn repo_settings_view(
996 input type="checkbox" name="pulls_enabled" value="1"1000 input type="checkbox" name="pulls_enabled" value="1"
997 checked[ctx.repo.pulls_enabled]; " Pull requests"1001 checked[ctx.repo.pulls_enabled]; " Pull requests"
998 }1002 }
999 p class="muted field-hint" {
1000 "Object format: " (ctx.repo.object_format.to_uppercase())
1001 " · fixed at creation."
1002 }
1003 }1003 }
1004 div class="settings-actions" {1004 div class="settings-actions" {
1005 button class="btn btn-primary" type="submit" form="repo-general" { "Save changes" }1005 button class="btn btn-primary" type="submit" form="repo-general" { "Save changes" }