Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings css: Make HTML table headers sticky.
Nikhil Maske0023f7f9a0f9
diff --git a/static/styles/night_mode.css b/static/styles/night_mode.cssindex 23a9adde697..da78ed6ab58 100644--- a/static/styles/night_mode.css+++ b/static/styles/night_mode.css@@ -10,6 +10,14 @@ body.night-mode {color: inherit;}+ table.table-striped thead.table-sticky-headers th {+ background-color: hsl(0, 0%, 0%);++ &:hover {+ background-color: hsl(211, 29%, 14%);+ }+ }+.app-main,.header-main,#message_view_header_underpadding,diff --git a/static/styles/settings.css b/static/styles/settings.cssindex ca6d8987ad4..eaf4efed1d7 100644--- a/static/styles/settings.css+++ b/static/styles/settings.css@@ -251,16 +251,22 @@ td .button {}}+ .table-sticky-headers th {+ position: sticky;+ top: 0;+ }+.table-striped {table-layout: auto;+ border-collapse: separate;tbody {border-bottom: none;}thead th {- background-color: inherit;color: inherit;+ background-color: hsl(0, 0%, 100%);border-top: 1px solid hsla(0, 0%, 0%, 0.2) !important;border-bottom: 1px solid hsla(0, 0%, 0%, 0.2) !important;@@ -286,7 +292,7 @@ td .button {&[data-sort]:hover {cursor: pointer;- background-color: hsla(0, 0%, 0%, 0.05);+ background-color: hsla(0, 0%, 95%);transition: background-color 100ms ease-in-out;&:not(.active)::after {diff --git a/static/templates/settings/attachments_settings.hbs b/static/templates/settings/attachments_settings.hbsindex fa9ec12373a..f8437dac783 100644--- a/static/templates/settings/attachments_settings.hbs+++ b/static/templates/settings/attachments_settings.hbs@@ -5,7 +5,7 @@<div class="alert" id="delete-upload-status"></div><div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table">- <thead>+ <thead class="table-sticky-headers"><th data-sort="alphabetic" data-sort-prop="name" class="upload-file-name">{{t "File" }}</th><th class="active" data-sort="numeric" data-sort-prop="create_time">{{t "Date uploaded" }}</th><th data-sort="mentioned_in">{{t "Mentioned in" }}</th>diff --git a/static/templates/settings/bot_list_admin.hbs b/static/templates/settings/bot_list_admin.hbsindex 7d061993ca6..1f33b7ce931 100644--- a/static/templates/settings/bot_list_admin.hbs+++ b/static/templates/settings/bot_list_admin.hbs@@ -6,7 +6,7 @@<div class="clear-float"></div><div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="alphabetic" data-sort-prop="full_name">{{t "Name" }}</th><th data-sort="email">{{t "Email" }}</th><th data-sort="bot_owner">{{t "Owner" }}</th>diff --git a/static/templates/settings/data_exports_admin.hbs b/static/templates/settings/data_exports_admin.hbsindex 7c6129e0592..21d08affc46 100644--- a/static/templates/settings/data_exports_admin.hbs+++ b/static/templates/settings/data_exports_admin.hbs@@ -33,7 +33,7 @@aria-label="{{t 'Filter exports' }}"/><div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table admin_exports_table">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="user">{{t "Requesting user" }}</th><th data-sort="numeric" data-sort-prop="export_time">{{t "Time" }}</th><th>{{t "Status" }}</th>diff --git a/static/templates/settings/deactivated_users_admin.hbs b/static/templates/settings/deactivated_users_admin.hbsindex a9f2aaaebb2..c44b76fd4ce 100644--- a/static/templates/settings/deactivated_users_admin.hbs+++ b/static/templates/settings/deactivated_users_admin.hbs@@ -8,7 +8,7 @@<div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="alphabetic" data-sort-prop="full_name">{{t "Name" }}</th>{{#if show_email}}<th data-sort="email">{{t "Email" }}</th>diff --git a/static/templates/settings/default_streams_list_admin.hbs b/static/templates/settings/default_streams_list_admin.hbsindex 35aba7860e5..0c180921a49 100644--- a/static/templates/settings/default_streams_list_admin.hbs+++ b/static/templates/settings/default_streams_list_admin.hbs@@ -26,7 +26,7 @@<div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="alphabetic" data-sort-prop="name">{{t "Name" }}</th>{{#if is_admin}}<th class="actions">{{t "Actions" }}</th>diff --git a/static/templates/settings/emoji_settings_admin.hbs b/static/templates/settings/emoji_settings_admin.hbsindex 53ee7f30041..d790958796c 100644--- a/static/templates/settings/emoji_settings_admin.hbs+++ b/static/templates/settings/emoji_settings_admin.hbs@@ -36,7 +36,7 @@aria-label="{{t 'Filter emojis' }}"/><div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table admin_emoji_table">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="alphabetic" data-sort-prop="name">{{t "Name" }}</th><th class="image">{{t "Image" }}</th><th class="image" data-sort="author_full_name">{{t "Author" }}</th>diff --git a/static/templates/settings/invites_list_admin.hbs b/static/templates/settings/invites_list_admin.hbsindex 60bafd05641..79be0b12527 100644--- a/static/templates/settings/invites_list_admin.hbs+++ b/static/templates/settings/invites_list_admin.hbs@@ -14,7 +14,7 @@<div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="invitee">{{t "Invitee" }}</th>{{#if is_admin }}<th data-sort="alphabetic" data-sort-prop="ref">{{t "Invited by" }}</th>diff --git a/static/templates/settings/linkifier_settings_admin.hbs b/static/templates/settings/linkifier_settings_admin.hbsindex a573b0c7058..9c48165839d 100644--- a/static/templates/settings/linkifier_settings_admin.hbs+++ b/static/templates/settings/linkifier_settings_admin.hbs@@ -68,7 +68,7 @@<input type="text" class="search" placeholder="{{t 'Filter linkifiers' }}" aria-label="{{t 'Filter linkifiers' }}"/><div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table admin_linkifiers_table">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="pattern">{{t "Pattern" }}</th><th data-sort="url">{{t "URL format string" }}</th>{{#if is_admin}}diff --git a/static/templates/settings/muted_topics_settings.hbs b/static/templates/settings/muted_topics_settings.hbsindex 9b65c0a0bd0..1c2cb440ceb 100644--- a/static/templates/settings/muted_topics_settings.hbs+++ b/static/templates/settings/muted_topics_settings.hbs@@ -2,7 +2,7 @@<input id="muted_topics_search" class="search" type="text" placeholder="{{t 'Filter muted topics' }}" aria-label="{{t 'Filter muted topics' }}"/><div class="progressive-table-wrapper" data-simplebar data-list-widget="muted-topics-list"><table class="table table-condensed table-striped wrapped-table">- <thead>+ <thead class="table-sticky-headers"><th data-sort="alphabetic" data-sort-prop="stream">{{t "Stream" }}</th><th data-sort="alphabetic" data-sort-prop="topic">{{t "Topic" }}</th><th data-sort="numeric" data-sort-prop="date_muted">{{t "Date muted" }}</th>diff --git a/static/templates/settings/user_list_admin.hbs b/static/templates/settings/user_list_admin.hbsindex a40e6057026..79d6a54b70e 100644--- a/static/templates/settings/user_list_admin.hbs+++ b/static/templates/settings/user_list_admin.hbs@@ -7,7 +7,7 @@<div class="progressive-table-wrapper" data-simplebar><table class="table table-condensed table-striped wrapped-table">- <thead>+ <thead class="table-sticky-headers"><th class="active" data-sort="alphabetic" data-sort-prop="full_name">{{t "Name" }}</th>{{#if show_email}}<th data-sort="email">{{t "Email" }}</th>