From 5e1fc2c4cd4e861a79deb47dd1f822a8442686c2 Mon Sep 17 00:00:00 2001 From: Lisa Sy Date: Tue, 16 Jun 2020 15:15:59 -0700 Subject: [PATCH] Update connect chat container (part 2) (#8717) [deploy] * Update chat container of Connect - Rename certain class names to improve BEM syntax and naming - Update typography of message cells - Update header of message area - Use new 'info' icon to expand sidebar - Update form fields for both writing and editing a message - Implement Crayons styling for 'delete' modal https://github.com/thepracticaldev/dev.to/issues/8437 * Update some tests aand class names * Update tests * Update info icon * Update reference --- app/assets/images/info.svg | 6 ++---- .../initializers/initializeBaseUserData.js | 8 +++++-- app/assets/stylesheets/chat.scss | 17 --------------- app/javascript/chat/chat.jsx | 21 ++++++------------- app/views/internal/configs/show.html.erb | 1 - 5 files changed, 14 insertions(+), 39 deletions(-) diff --git a/app/assets/images/info.svg b/app/assets/images/info.svg index 27e06ee67..38162c06a 100644 --- a/app/assets/images/info.svg +++ b/app/assets/images/info.svg @@ -1,5 +1,3 @@ - - - - + + diff --git a/app/assets/javascripts/initializers/initializeBaseUserData.js b/app/assets/javascripts/initializers/initializeBaseUserData.js index 0233171a3..5610f341d 100644 --- a/app/assets/javascripts/initializers/initializeBaseUserData.js +++ b/app/assets/javascripts/initializers/initializeBaseUserData.js @@ -68,7 +68,10 @@ function addRelevantButtonsToComments(user) { let butt = settingsButts[i]; const { action, commentableUserId, userId } = butt.dataset; if (parseInt(userId, 10) === user.id && action === 'settings-button') { - butt.innerHTML = 'Settings' + butt.innerHTML = + 'Settings'; butt.style.display = 'inline-block'; butt.classList.remove('hidden'); } @@ -87,7 +90,8 @@ function addRelevantButtonsToComments(user) { for (let i = 0; i < modButts.length; i += 1) { let butt = modButts[i]; if (butt.classList.contains('mod-actions-comment-button')) { - butt.innerHTML = 'Moderate' + butt.innerHTML = + 'Moderate'; } butt.className = 'mod-actions'; butt.style.display = 'inline-block'; diff --git a/app/assets/stylesheets/chat.scss b/app/assets/stylesheets/chat.scss index 1815c634c..692b209c0 100644 --- a/app/assets/stylesheets/chat.scss +++ b/app/assets/stylesheets/chat.scss @@ -240,8 +240,6 @@ } } - - .active-channel__header { align-items: center; box-shadow: 0 0 0 1px var(--card-border); @@ -259,20 +257,6 @@ color: var(--body-color); } -.active-channel__config-btn { - display: flex; - align-items: center; - border-radius: 100%; - justify-content: center; - width: 40px; - height: 40px; - transition: all var(--transition-props); - - &:hover { - background: var(--button-secondary-bg); - } -} - .activechatchannel__messages { padding-top: var(--su-2); padding-bottom: var(--su-2); @@ -1068,7 +1052,6 @@ } } - .mention__list { position: absolute; background: var(--card-bg); diff --git a/app/javascript/chat/chat.jsx b/app/javascript/chat/chat.jsx index 952c8faf9..dc2fb5abd 100644 --- a/app/javascript/chat/chat.jsx +++ b/app/javascript/chat/chat.jsx @@ -1654,9 +1654,7 @@ export default class Chat extends Component { >
-

- Are you sure, you want to delete this message ? -

+

Are you sure, you want to delete this message ?

-
+
); }; @@ -1732,7 +1730,7 @@ export default class Chat extends Component { return ( @@ -1783,19 +1781,12 @@ export default class Chat extends Component { > - - + ); diff --git a/app/views/internal/configs/show.html.erb b/app/views/internal/configs/show.html.erb index 9ff966608..f81a88863 100644 --- a/app/views/internal/configs/show.html.erb +++ b/app/views/internal/configs/show.html.erb @@ -423,7 +423,6 @@
Special cute mascot image used in the footer.
-
<%= f.label :mascot_image_description %> <%= f.text_field :mascot_image_description,