forge
Explore
Log in

Don't you dare go Hollow

The role picker's caret skin narrows to the native select so the themed trigger stops doubling it, and the logs table wraps in a viewport-capped scroller — a stale or missing page-size fit can no longer push rows past the fold, and a window resize re-opens the fit's reload budget

Browse files at this commit

6c367aedc9fc25d11c755d4d71ee324bdc246ef2Ahmet Kaan GümüşParent: 02a64a4
crates/im-web/assets/main.cssmodified+26 -1
@@ -880,6 +880,26 @@ a.wordmark-home {
880880 min-width: 0;
881881 }
882882
883+body:has(.log-list) {
884+ height: 100vh;
885+ height: 100dvh;
886+ overflow: hidden;
887+}
888+body:has(.log-list) .admin-shell {
889+ height: 100%;
890+}
891+body:has(.log-list) .admin-column {
892+ height: 100%;
893+}
894+body:has(.log-list) .admin-card:has(.log-list) {
895+ min-height: 0;
896+}
897+
898+.log-list-wrap {
899+ min-height: 0;
900+ overflow-y: auto;
901+}
902+
883903 .logs-foot {
884904 display: flex;
885905 align-items: center;
@@ -962,7 +982,7 @@ a.wordmark-home {
962982 height: var(--control-h);
963983 box-sizing: border-box;
964984 }
965-.admin-invite .admin-role {
985+.admin-invite select.admin-role {
966986 flex: 0 0 auto;
967987 width: auto;
968988 padding: 0 28px 0 12px;
@@ -1108,6 +1128,11 @@ input[type=checkbox] {
11081128 display: none;
11091129 }
11101130
1131+.admin-invite .dd-trigger {
1132+ flex: 0 0 auto;
1133+ width: auto;
1134+}
1135+
11111136 .dd-trigger {
11121137 display: flex;
11131138 align-items: center;
crates/im-web/src/admin.rsmodified+5 -4
@@ -779,10 +779,10 @@ async fn logs_section(cx: &Cx, lang: i18n::Lang) -> Result<String, topcoat::Erro
779779 format!(r#"<div class="muted">{}</div>"#, t(lang, Key::LogsEmpty))
780780 } else {
781781 format!(
782- r#"<table class="admin-table log-list" data-rows="{limit}" data-section="logs">
782+ r#"<div class="log-list-wrap"><table class="admin-table log-list" data-rows="{limit}" data-section="logs">
783783 <thead><tr><th>{when}</th><th>{what}</th><th>{who}</th><th>{detail}</th></tr></thead>
784784 <tbody>{rows}</tbody>
785- </table>"#,
785+ </table></div>"#,
786786 when = t(lang, Key::WhenCol),
787787 what = t(lang, Key::WhatCol),
788788 who = t(lang, Key::WhoCol),
@@ -931,7 +931,8 @@ const LOG_FIT_SCRIPT: &str = r#"<script>(function () {
931931 // first row re-measures whenever its height changes (font swap, layout
932932 // settle), a window resize re-measures for the new viewport, and the
933933 // debounce folds the burst into one. A wrong early value is corrected by
934- // the next firing; the reload guard caps the round trips.
934+ // the next firing. A resize also re-opens the reload budget — the hops
935+ // spent against the old geometry say nothing about the new one.
935936 var timer = null;
936937 function schedule() {
937938 if (timer) { clearTimeout(timer); }
@@ -939,7 +940,7 @@ const LOG_FIT_SCRIPT: &str = r#"<script>(function () {
939940 }
940941 var row = document.querySelector('.log-list[data-rows] tbody tr');
941942 if (row && window.ResizeObserver) { new ResizeObserver(schedule).observe(row); }
942- window.addEventListener('resize', schedule);
943+ window.addEventListener('resize', function () { window.sessionStorage.removeItem('imLogFitHops'); schedule(); });
943944 schedule();
944945 })();</script>"#;
945946
style/main.scssmodified+34 -2
@@ -902,6 +902,31 @@ a.wordmark-home {
902902 }
903903 }
904904
905+// The logs page never outgrows the window, whatever the fit script managed:
906+// when the script's page size is right the table ends where the foot sits,
907+// and when it is not (script off, a stale cookie, a mid-session resize) the
908+// card caps at the room below the bar and the table scrolls inside itself
909+// instead of pushing rows past the fold. Scoped by `:has(.log-list)` so the
910+// other sections keep the page's natural scroll.
911+body:has(.log-list) {
912+ height: 100vh;
913+ height: 100dvh;
914+ overflow: hidden;
915+
916+ .admin-shell { height: 100%; }
917+
918+ .admin-column { height: 100%; }
919+
920+ // The card is a flex column that may shrink below its content; the wrap is
921+ // the piece that gives, taking the scroll the page would have owned.
922+ .admin-card:has(.log-list) { min-height: 0; }
923+}
924+
925+.log-list-wrap {
926+ min-height: 0;
927+ overflow-y: auto;
928+}
929+
905930 .logs-foot {
906931 display: flex;
907932 align-items: center;
@@ -984,8 +1009,10 @@ a.wordmark-home {
9841009 }
9851010
9861011 // The role picker: same field skin as the inputs, just narrower — izlek's
987- // invite row uses a select here too, not a checkbox.
988- .admin-role {
1012+ // invite row uses a select here too, not a checkbox. `select`-scoped so the
1013+ // enhancement's trigger button (which wears the same classes) keeps only
1014+ // its own ::after caret instead of doubling this one.
1015+ select.admin-role {
9891016 flex: 0 0 auto;
9901017 width: auto;
9911018 padding: 0 28px 0 12px;
@@ -1140,6 +1167,11 @@ input[type="checkbox"] { accent-color: var(--accent); }
11401167
11411168 .dd-native { display: none; }
11421169
1170+.admin-invite .dd-trigger {
1171+ flex: 0 0 auto;
1172+ width: auto;
1173+}
1174+
11431175 .dd-trigger {
11441176 display: flex;
11451177 align-items: center;