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 {
132132 flex: 0 1 28rem;
133133 margin-left: auto;
134134 }
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+}
135141 .topbar-search input[type="search"] {
136142 width: 100%;
137143 padding: 0.3rem 0.6rem;
@@ -817,10 +823,19 @@ body.drawer-open .drawer-backdrop {
817823 margin-top: 0;
818824 }
819825 .email-list {
820- margin-bottom: 1rem;
826+ margin-bottom: 0;
821827 }
822828 .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;
824839 }
825840 .email-add label {
826841 margin-top: 0;
@@ -869,6 +884,12 @@ select {
869884 border: 1px solid var(--fb-border);
870885 border-radius: var(--fb-radius);
871886 }
887+input:disabled,
888+textarea:disabled,
889+select:disabled {
890+ opacity: 0.6;
891+ cursor: not-allowed;
892+}
872893 input:focus,
873894 textarea:focus,
874895 select:focus {
@@ -949,15 +970,24 @@ select:focus {
949970 font-size: 0.9em;
950971 font-weight: 600;
951972 }
973+input[type="checkbox"],
974+input[type="radio"] {
975+ accent-color: var(--fb-accent);
976+ width: 1.05rem;
977+ height: 1.05rem;
978+ cursor: pointer;
979+}
952980 label.checkbox {
953981 display: inline-flex;
954982 align-items: center;
955- gap: 0.3rem;
983+ gap: 0.45rem;
956984 margin: 0 1rem 0 0;
957985 font-weight: 400;
986+ cursor: pointer;
958987 }
959988 label.checkbox input {
960- width: auto;
989+ width: 1.05rem;
990+ flex: none;
961991 }
962992 /* Link slots stack full-width; the Add button sits beside the last one. */
963993 .link-fields {
crates/web/src/repo.rs +4 −4
@@ -987,6 +987,10 @@ async fn repo_settings_view(
987987 (vis_option(Visibility::Internal, "Internal — any signed-in user"))
988988 (vis_option(Visibility::Private, "Private — only you and collaborators"))
989989 }
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+ }
990994 label { "Features" }
991995 label class="checkbox" {
992996 input type="checkbox" name="issues_enabled" value="1"
@@ -996,10 +1000,6 @@ async fn repo_settings_view(
9961000 input type="checkbox" name="pulls_enabled" value="1"
9971001 checked[ctx.repo.pulls_enabled]; " Pull requests"
9981002 }
999- p class="muted field-hint" {
1000- "Object format: " (ctx.repo.object_format.to_uppercase())
1001- " · fixed at creation."
1002- }
10031003 }
10041004 div class="settings-actions" {
10051005 button class="btn btn-primary" type="submit" form="repo-general" { "Save changes" }