A platform for community discussion. Free, open, simple.
UX: hide settings btn when disabled
chapoi74f01b8cbdda
diff --git a/plugins/chat/assets/stylesheets/common/chat-thread-list-item.scss b/plugins/chat/assets/stylesheets/common/chat-thread-list-item.scssindex b383703d3e0..fd71c8e16c9 100644--- a/plugins/chat/assets/stylesheets/common/chat-thread-list-item.scss+++ b/plugins/chat/assets/stylesheets/common/chat-thread-list-item.scss@@ -2,8 +2,8 @@display: flex;flex-direction: row;padding: 0.5rem;- border-radius: 6px;- background-color: var(--d-selected);+ border-radius: 4px;+ background-color: var(--primary-very-low);border: 1px solid transparent;}@@ -14,7 +14,7 @@.touch & {&:active {background-color: var(--d-hover);- border: 1px solid var(--primary-medium);+ border: 1px solid var(--primary-300);}}@@ -22,7 +22,7 @@&:hover,&:active {background-color: var(--d-hover);- border: 1px solid var(--primary-medium);+ border: 1px solid var(--primary-300);}}@@ -41,6 +41,10 @@font-weight: bold;}+ &__settings[disabled] {+ display: none;+ }+&__open-button {display: flex;flex-direction: column;diff --git a/plugins/chat/assets/stylesheets/common/chat-thread-list.scss b/plugins/chat/assets/stylesheets/common/chat-thread-list.scssindex 1e785d8f810..b5f61bbdb90 100644--- a/plugins/chat/assets/stylesheets/common/chat-thread-list.scss+++ b/plugins/chat/assets/stylesheets/common/chat-thread-list.scss@@ -14,7 +14,7 @@flex-direction: column;.chat-thread-list-item {- margin: 0.5rem 0.25rem 0.5rem 0.5rem;+ margin: 0.75rem 0.25rem 0.75rem 0.5rem;& + .chat-thread-list-item {margin-top: 0;diff --git a/plugins/chat/spec/system/thread_list/full_page_spec.rb b/plugins/chat/spec/system/thread_list/full_page_spec.rbindex cd0ae36e4d5..3943f33469f 100644--- a/plugins/chat/spec/system/thread_list/full_page_spec.rb+++ b/plugins/chat/spec/system/thread_list/full_page_spec.rb@@ -108,12 +108,12 @@ describe "Thread list in side panel | full page", type: :system, js: true doit "does not allow updating if user is neither admin nor original message user" dothread_1.update!(original_message_user: other_user)thread_1.original_message.update!(user: other_user)+open_thread_list- expect(- thread_list_page.item_by_id(thread_1.id).find(".chat-thread-list-item__settings")[- :disabled- ],- ).to eq("true")++ expect(thread_list_page.item_by_id(thread_1.id)).to have_no_css(+ ".chat-thread-list-item__settings",+ )endendend