Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
templates: Stop using `::after` to render empty list message.
Hemant Umreeeec8f06e9c0
diff --git a/web/src/recent_view_ui.js b/web/src/recent_view_ui.jsindex a600042a14c..ab3945d85f5 100644--- a/web/src/recent_view_ui.js+++ b/web/src/recent_view_ui.js@@ -293,8 +293,6 @@ export function hide_loading_indicator() {loading.destroy_indicator($("#recent_view_loading_messages_indicator"), {abs_positioned: false,});- // Show empty table text if there are no messages fetched.- $("#recent_view_table tbody").addClass("required-text");}export function process_messages(messages) {diff --git a/web/styles/popovers.css b/web/styles/popovers.cssindex 0753d867f51..e3b043f802d 100644--- a/web/styles/popovers.css+++ b/web/styles/popovers.css@@ -636,20 +636,6 @@ ul {}}}-- & tbody:empty::after,- &:empty::after {- content: attr(data-empty);- display: block;-- text-align: center;- color: hsl(0deg 0% 67%);- }-- &:empty {- display: block;- padding: 5px;- }}}diff --git a/web/styles/recent_view.css b/web/styles/recent_view.cssindex b20092c4aed..139803e3443 100644--- a/web/styles/recent_view.css+++ b/web/styles/recent_view.css@@ -53,14 +53,6 @@}}- .required-text:empty::after {- content: attr(data-empty);- display: block;- font-style: italic;- color: hsl(0deg 0% 67%);- position: absolute;- }-#empty-table-message {background-color: var(--color-background);padding: 3em 1em;diff --git a/web/styles/settings.css b/web/styles/settings.cssindex 6bff22d3ce4..0ca40f89f55 100644--- a/web/styles/settings.css+++ b/web/styles/settings.css@@ -1724,20 +1724,6 @@ $option_title_width: 180px;width: 100px;}-.required-text {- &:empty::after {- content: attr(data-empty);- display: block;-- font-style: italic;- color: hsl(0deg 0% 67%);- }-- &.thick:empty::after {- width: 100%;- }-}-#payload_url_inputbox {& input[type="text"] {width: 340px;diff --git a/web/templates/right_sidebar.hbs b/web/templates/right_sidebar.hbsindex f7ab2a3c170..4a4714bb4bd 100644--- a/web/templates/right_sidebar.hbs+++ b/web/templates/right_sidebar.hbs@@ -18,7 +18,7 @@</button></div><div id="buddy_list_wrapper" class="scrolling_list" data-simplebar>- <ul id="user_presences" class="filters required-text" data-empty="{{t 'No matching users.' }}"></ul>+ <ul id="user_presences" class="filters" data-empty="{{t 'No matching users.' }}"></ul><div id="buddy_list_wrapper_padding"></div></div></div>diff --git a/web/templates/settings/alert_word_settings.hbs b/web/templates/settings/alert_word_settings.hbsindex 883aeba6c5a..046e0c974ed 100644--- a/web/templates/settings/alert_word_settings.hbs+++ b/web/templates/settings/alert_word_settings.hbs@@ -23,7 +23,7 @@<th data-sort="alphabetic" data-sort-prop="word">{{t "Word" }}</th><th class="actions">{{t "Actions" }}</th></thead>- <tbody id="alert-words-table" class="alert-words-table required-text thick"+ <tbody id="alert-words-table" class="alert-words-table"data-empty="{{t 'There are no current alert words.' }}"></tbody></table></div>diff --git a/web/templates/settings/attachments_settings.hbs b/web/templates/settings/attachments_settings.hbsindex f0282c0d80b..c5bcdf507f7 100644--- a/web/templates/settings/attachments_settings.hbs+++ b/web/templates/settings/attachments_settings.hbs@@ -15,7 +15,7 @@<th class="upload-size" data-sort="numeric" data-sort-prop="size">{{t "Size" }}</th><th class="upload-actions actions">{{t "Actions" }}</th></thead>- <tbody class="required-text" data-empty="{{t 'You have not uploaded any files.' }}"+ <tbody data-empty="{{t 'You have not uploaded any files.' }}"id="uploaded_files_table"></tbody></table></div>diff --git a/web/templates/settings/bot_list_admin.hbs b/web/templates/settings/bot_list_admin.hbsindex 48d93f09951..1a92dcafb96 100644--- a/web/templates/settings/bot_list_admin.hbs+++ b/web/templates/settings/bot_list_admin.hbs@@ -36,7 +36,7 @@<th class="actions">{{t "Actions" }}</th>{{/if}}</thead>- <tbody id="admin_bots_table" class="admin_bot_table required-text thick"+ <tbody id="admin_bots_table" class="admin_bot_table"data-empty="{{t 'No bots match your current filter.' }}"></tbody></table></div>diff --git a/web/templates/settings/bot_settings.hbs b/web/templates/settings/bot_settings.hbsindex 3326236230c..85579c9fb16 100644--- a/web/templates/settings/bot_settings.hbs+++ b/web/templates/settings/bot_settings.hbs@@ -26,10 +26,10 @@<li class="inactive-bots-tab"><a>{{t "Inactive bots" }}</a></li></ul>- <ol class="bots_list required-text" id="active_bots_list" data-empty="{{t 'You have no active bots.' }}">+ <ol class="bots_list" id="active_bots_list" data-empty="{{t 'You have no active bots.' }}"></ol>- <ol class="bots_list required-text" id="inactive_bots_list" data-empty="{{t 'You have no inactive bots.' }}">+ <ol class="bots_list" id="inactive_bots_list" data-empty="{{t 'You have no inactive bots.' }}"></ol></div>diff --git a/web/templates/settings/data_exports_admin.hbs b/web/templates/settings/data_exports_admin.hbsindex c1a03acbd00..b9e4a3973f2 100644--- a/web/templates/settings/data_exports_admin.hbs+++ b/web/templates/settings/data_exports_admin.hbs@@ -44,7 +44,7 @@<th>{{t "Status" }}</th><th class="actions">{{t "Actions" }}</th></thead>- <tbody id="admin_exports_table" class="required-text" data-empty="{{t 'No exports.' }}"></tbody>+ <tbody id="admin_exports_table" data-empty="{{t 'No exports.' }}"></tbody></table></div></div>diff --git a/web/templates/settings/deactivated_users_admin.hbs b/web/templates/settings/deactivated_users_admin.hbsindex 9b30bab8401..2c7a4599ec1 100644--- a/web/templates/settings/deactivated_users_admin.hbs+++ b/web/templates/settings/deactivated_users_admin.hbs@@ -19,7 +19,7 @@<th class="actions">{{t "Actions" }}</th>{{/if}}</thead>- <tbody id="admin_deactivated_users_table" class="required-text thick admin_user_table"+ <tbody id="admin_deactivated_users_table" class="admin_user_table"data-empty="{{t 'No users match your current filter.' }}"></tbody></table></div>diff --git a/web/templates/settings/default_streams_list_admin.hbs b/web/templates/settings/default_streams_list_admin.hbsindex 4355260eae8..a08db04f463 100644--- a/web/templates/settings/default_streams_list_admin.hbs+++ b/web/templates/settings/default_streams_list_admin.hbs@@ -19,7 +19,7 @@<th class="actions">{{t "Actions" }}</th>{{/if}}</thead>- <tbody class="required-text" data-empty="{{t 'No default streams match you current filter.' }}"+ <tbody data-empty="{{t 'No default streams match you current filter.' }}"id="admin_default_streams_table" class="admin_default_stream_table"></tbody></table></div>diff --git a/web/templates/settings/emoji_settings_admin.hbs b/web/templates/settings/emoji_settings_admin.hbsindex 2864faa22fb..009b9a79210 100644--- a/web/templates/settings/emoji_settings_admin.hbs+++ b/web/templates/settings/emoji_settings_admin.hbs@@ -22,7 +22,7 @@<th class="image" data-sort="author_full_name">{{t "Author" }}</th><th class="actions">{{t "Actions" }}</th></thead>- <tbody id="admin_emoji_table" class="required-text" data-empty="{{t 'No custom emoji.' }}"></tbody>+ <tbody id="admin_emoji_table" data-empty="{{t 'No custom emoji.' }}"></tbody></table></div></div>diff --git a/web/templates/settings/invites_list_admin.hbs b/web/templates/settings/invites_list_admin.hbsindex 3623e3db4cf..efe6058f70e 100644--- a/web/templates/settings/invites_list_admin.hbs+++ b/web/templates/settings/invites_list_admin.hbs@@ -23,7 +23,7 @@<th data-sort="numeric" data-sort-prop="invited_as">{{t "Invited as" }}</th><th class="actions">{{t "Actions" }}</th></thead>- <tbody id="admin_invites_table" class="required-text thick admin_invites_table" data-empty="{{t 'No invites match your current filter.' }}"></tbody>+ <tbody id="admin_invites_table" class="admin_invites_table" data-empty="{{t 'No invites match your current filter.' }}"></tbody></table></div><div id="admin_page_invites_loading_indicator"></div>diff --git a/web/templates/settings/linkifier_settings_admin.hbs b/web/templates/settings/linkifier_settings_admin.hbsindex 492d2ea6d45..97a59251a47 100644--- a/web/templates/settings/linkifier_settings_admin.hbs+++ b/web/templates/settings/linkifier_settings_admin.hbs@@ -71,7 +71,7 @@<th class="actions">{{t "Actions" }}</th>{{/if}}</thead>- <tbody id="admin_linkifiers_table" class="required-text" data-empty="{{t 'No linkifiers set.' }}"></tbody>+ <tbody id="admin_linkifiers_table" data-empty="{{t 'No linkifiers set.' }}"></tbody></table></div></div>diff --git a/web/templates/settings/muted_users_settings.hbs b/web/templates/settings/muted_users_settings.hbsindex c72689cb633..8269e9446cf 100644--- a/web/templates/settings/muted_users_settings.hbs+++ b/web/templates/settings/muted_users_settings.hbs@@ -10,7 +10,7 @@<th data-sort="numeric" data-sort-prop="date_muted">{{t "Date muted" }}</th><th class="actions">{{t "Actions" }}</th></thead>- <tbody id="muted_users_table" class="required-text" data-empty="{{t 'You have not muted any users yet.'}}"></tbody>+ <tbody id="muted_users_table" data-empty="{{t 'You have not muted any users yet.'}}"></tbody></table></div></div>diff --git a/web/templates/settings/playground_settings_admin.hbs b/web/templates/settings/playground_settings_admin.hbsindex d211c3647c3..53c01c07690 100644--- a/web/templates/settings/playground_settings_admin.hbs+++ b/web/templates/settings/playground_settings_admin.hbs@@ -78,7 +78,7 @@<th class="actions">{{t "Actions" }}</th>{{/if}}</thead>- <tbody id="admin_playgrounds_table" class="required-text" data-empty="{{t 'No playgrounds configured.' }}"></tbody>+ <tbody id="admin_playgrounds_table" data-empty="{{t 'No playgrounds configured.' }}"></tbody></table></div></div>diff --git a/web/templates/settings/user_list_admin.hbs b/web/templates/settings/user_list_admin.hbsindex bcc3e6234ec..f85205eee5f 100644--- a/web/templates/settings/user_list_admin.hbs+++ b/web/templates/settings/user_list_admin.hbs@@ -19,7 +19,7 @@<th class="actions">{{t "Actions" }}</th>{{/if}}</thead>- <tbody id="admin_users_table" class="admin_user_table required-text thick"+ <tbody id="admin_users_table" class="admin_user_table"data-empty="{{t 'No users match your current filter.' }}"></tbody></table></div>diff --git a/web/templates/settings/user_topics_settings.hbs b/web/templates/settings/user_topics_settings.hbsindex efcad67e702..60b8f405abc 100644--- a/web/templates/settings/user_topics_settings.hbs+++ b/web/templates/settings/user_topics_settings.hbs@@ -33,7 +33,7 @@<th data-sort="numeric" data-sort-prop="visibility_policy">{{t "Status" }}</th><th data-sort="numeric" data-sort-prop="date_updated" class="active topic_date_updated">{{t "Date updated" }}</th></thead>- <tbody id="user_topics_table" class="required-text" data-empty="{{t 'You have not configured any topics yet.'}}"></tbody>+ <tbody id="user_topics_table" data-empty="{{t 'You have not configured any topics yet.'}}"></tbody></table></div></div>