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 commit6c367aedc9fc25d11c755d4d71ee324bdc246ef2Parent: 02a64a43 changed files +65 -7
- crates/im-web/assets/main.css +26 -1
- crates/im-web/src/admin.rs +5 -4
- style/main.scss +34 -2
crates/im-web/assets/main.cssmodified+26 -1
| @@ -880,6 +880,26 @@ a.wordmark-home { | ||
| 880 | 880 | min-width: 0; |
| 881 | 881 | } |
| 882 | 882 | |
| 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 | + | |
| 883 | 903 | .logs-foot { |
| 884 | 904 | display: flex; |
| 885 | 905 | align-items: center; |
| @@ -962,7 +982,7 @@ a.wordmark-home { | ||
| 962 | 982 | height: var(--control-h); |
| 963 | 983 | box-sizing: border-box; |
| 964 | 984 | } |
| 965 | -.admin-invite .admin-role { | |
| 985 | +.admin-invite select.admin-role { | |
| 966 | 986 | flex: 0 0 auto; |
| 967 | 987 | width: auto; |
| 968 | 988 | padding: 0 28px 0 12px; |
| @@ -1108,6 +1128,11 @@ input[type=checkbox] { | ||
| 1108 | 1128 | display: none; |
| 1109 | 1129 | } |
| 1110 | 1130 | |
| 1131 | +.admin-invite .dd-trigger { | |
| 1132 | + flex: 0 0 auto; | |
| 1133 | + width: auto; | |
| 1134 | +} | |
| 1135 | + | |
| 1111 | 1136 | .dd-trigger { |
| 1112 | 1137 | display: flex; |
| 1113 | 1138 | 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 | ||
| 779 | 779 | format!(r#"<div class="muted">{}</div>"#, t(lang, Key::LogsEmpty)) |
| 780 | 780 | } else { |
| 781 | 781 | 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"> | |
| 783 | 783 | <thead><tr><th>{when}</th><th>{what}</th><th>{who}</th><th>{detail}</th></tr></thead> |
| 784 | 784 | <tbody>{rows}</tbody> |
| 785 | - </table>"#, | |
| 785 | + </table></div>"#, | |
| 786 | 786 | when = t(lang, Key::WhenCol), |
| 787 | 787 | what = t(lang, Key::WhatCol), |
| 788 | 788 | who = t(lang, Key::WhoCol), |
| @@ -931,7 +931,8 @@ const LOG_FIT_SCRIPT: &str = r#"<script>(function () { | ||
| 931 | 931 | // first row re-measures whenever its height changes (font swap, layout |
| 932 | 932 | // settle), a window resize re-measures for the new viewport, and the |
| 933 | 933 | // 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. | |
| 935 | 936 | var timer = null; |
| 936 | 937 | function schedule() { |
| 937 | 938 | if (timer) { clearTimeout(timer); } |
| @@ -939,7 +940,7 @@ const LOG_FIT_SCRIPT: &str = r#"<script>(function () { | ||
| 939 | 940 | } |
| 940 | 941 | var row = document.querySelector('.log-list[data-rows] tbody tr'); |
| 941 | 942 | if (row && window.ResizeObserver) { new ResizeObserver(schedule).observe(row); } |
| 942 | - window.addEventListener('resize', schedule); | |
| 943 | + window.addEventListener('resize', function () { window.sessionStorage.removeItem('imLogFitHops'); schedule(); }); | |
| 943 | 944 | schedule(); |
| 944 | 945 | })();</script>"#; |
| 945 | 946 |
style/main.scssmodified+34 -2
| @@ -902,6 +902,31 @@ a.wordmark-home { | ||
| 902 | 902 | } |
| 903 | 903 | } |
| 904 | 904 | |
| 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 | + | |
| 905 | 930 | .logs-foot { |
| 906 | 931 | display: flex; |
| 907 | 932 | align-items: center; |
| @@ -984,8 +1009,10 @@ a.wordmark-home { | ||
| 984 | 1009 | } |
| 985 | 1010 | |
| 986 | 1011 | // 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 { | |
| 989 | 1016 | flex: 0 0 auto; |
| 990 | 1017 | width: auto; |
| 991 | 1018 | padding: 0 28px 0 12px; |
| @@ -1140,6 +1167,11 @@ input[type="checkbox"] { accent-color: var(--accent); } | ||
| 1140 | 1167 | |
| 1141 | 1168 | .dd-native { display: none; } |
| 1142 | 1169 | |
| 1170 | +.admin-invite .dd-trigger { | |
| 1171 | + flex: 0 0 auto; | |
| 1172 | + width: auto; | |
| 1173 | +} | |
| 1174 | + | |
| 1143 | 1175 | .dd-trigger { |
| 1144 | 1176 | display: flex; |
| 1145 | 1177 | align-items: center; |