Fossil SCM
Prettified chat buttons via collaborative chat session dogfooding.
Commit
607854c90f95b5c8d918701d47bfb2a36e658913ce67bae160493b75938edc52
Parent
4fc065ba4a865e6…
3 files changed
+6
-4
+4
-1
-3
+6
-4
| --- src/chat.c | ||
| +++ src/chat.c | ||
| @@ -162,14 +162,16 @@ | ||
| 162 | 162 | @ autocomplete="off"> |
| 163 | 163 | @ <textarea rows="8" id="chat-input-multi" \ |
| 164 | 164 | @ placeholder="Type markdown-formatted message for %h(zProjectName). Ctrl-Enter sends it." \ |
| 165 | 165 | @ class="hidden"></textarea> |
| 166 | 166 | @ <div id='chat-edit-buttons'> |
| 167 | - @ <button id="chat-preview-button">Preview</button> | |
| 168 | - @ <span id="chat-settings-button" class="settings-icon" \ | |
| 169 | - @ aria-label="Settings..." aria-haspopup="true" ></span> | |
| 170 | - @ <button id="chat-message-submit">Send</button> | |
| 167 | + @ <button id="chat-preview-button" \ | |
| 168 | + @ title="Preview message">👁</button> | |
| 169 | + @ <button id="chat-settings-button" \ | |
| 170 | + @ title="Configure chat">⚙</button> | |
| 171 | + @ <button id="chat-message-submit" \ | |
| 172 | + @ title="Send message">📤</button> | |
| 171 | 173 | @ </div> |
| 172 | 174 | @ </div> |
| 173 | 175 | @ <div id='chat-input-file-area'> |
| 174 | 176 | @ <div class='file-selection-wrapper'> |
| 175 | 177 | @ <div class='help-buttonlet'> |
| 176 | 178 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -162,14 +162,16 @@ | |
| 162 | @ autocomplete="off"> |
| 163 | @ <textarea rows="8" id="chat-input-multi" \ |
| 164 | @ placeholder="Type markdown-formatted message for %h(zProjectName). Ctrl-Enter sends it." \ |
| 165 | @ class="hidden"></textarea> |
| 166 | @ <div id='chat-edit-buttons'> |
| 167 | @ <button id="chat-preview-button">Preview</button> |
| 168 | @ <span id="chat-settings-button" class="settings-icon" \ |
| 169 | @ aria-label="Settings..." aria-haspopup="true" ></span> |
| 170 | @ <button id="chat-message-submit">Send</button> |
| 171 | @ </div> |
| 172 | @ </div> |
| 173 | @ <div id='chat-input-file-area'> |
| 174 | @ <div class='file-selection-wrapper'> |
| 175 | @ <div class='help-buttonlet'> |
| 176 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -162,14 +162,16 @@ | |
| 162 | @ autocomplete="off"> |
| 163 | @ <textarea rows="8" id="chat-input-multi" \ |
| 164 | @ placeholder="Type markdown-formatted message for %h(zProjectName). Ctrl-Enter sends it." \ |
| 165 | @ class="hidden"></textarea> |
| 166 | @ <div id='chat-edit-buttons'> |
| 167 | @ <button id="chat-preview-button" \ |
| 168 | @ title="Preview message">👁</button> |
| 169 | @ <button id="chat-settings-button" \ |
| 170 | @ title="Configure chat">⚙</button> |
| 171 | @ <button id="chat-message-submit" \ |
| 172 | @ title="Send message">📤</button> |
| 173 | @ </div> |
| 174 | @ </div> |
| 175 | @ <div id='chat-input-file-area'> |
| 176 | @ <div class='file-selection-wrapper'> |
| 177 | @ <div class='help-buttonlet'> |
| 178 |
+4
-1
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -1025,18 +1025,21 @@ | ||
| 1025 | 1025 | }; |
| 1026 | 1026 | |
| 1027 | 1027 | (function(){/*Set up #chat-settings-button */ |
| 1028 | 1028 | const settingsButton = document.querySelector('#chat-settings-button'); |
| 1029 | 1029 | const optionsMenu = E1('#chat-config-options'); |
| 1030 | - const cbToggle = function(){ | |
| 1030 | + const cbToggle = function(ev){ | |
| 1031 | + ev.preventDefault(); | |
| 1032 | + ev.stopPropagation(); | |
| 1031 | 1033 | if(Chat.e.configArea.classList.contains('hidden')){ |
| 1032 | 1034 | D.removeClass(Chat.e.configArea, 'hidden'); |
| 1033 | 1035 | D.addClass([Chat.e.messagesWrapper, Chat.e.previewArea], 'hidden'); |
| 1034 | 1036 | }else{ |
| 1035 | 1037 | D.addClass(Chat.e.configArea, 'hidden'); |
| 1036 | 1038 | D.removeClass(Chat.e.messagesWrapper, 'hidden'); |
| 1037 | 1039 | } |
| 1040 | + return false; | |
| 1038 | 1041 | }; |
| 1039 | 1042 | D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); |
| 1040 | 1043 | Chat.e.configArea.querySelector('button').addEventListener('click', cbToggle, false); |
| 1041 | 1044 | /* Settings menu entries... */ |
| 1042 | 1045 | const settingsOps = [{ |
| 1043 | 1046 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -1025,18 +1025,21 @@ | |
| 1025 | }; |
| 1026 | |
| 1027 | (function(){/*Set up #chat-settings-button */ |
| 1028 | const settingsButton = document.querySelector('#chat-settings-button'); |
| 1029 | const optionsMenu = E1('#chat-config-options'); |
| 1030 | const cbToggle = function(){ |
| 1031 | if(Chat.e.configArea.classList.contains('hidden')){ |
| 1032 | D.removeClass(Chat.e.configArea, 'hidden'); |
| 1033 | D.addClass([Chat.e.messagesWrapper, Chat.e.previewArea], 'hidden'); |
| 1034 | }else{ |
| 1035 | D.addClass(Chat.e.configArea, 'hidden'); |
| 1036 | D.removeClass(Chat.e.messagesWrapper, 'hidden'); |
| 1037 | } |
| 1038 | }; |
| 1039 | D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); |
| 1040 | Chat.e.configArea.querySelector('button').addEventListener('click', cbToggle, false); |
| 1041 | /* Settings menu entries... */ |
| 1042 | const settingsOps = [{ |
| 1043 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -1025,18 +1025,21 @@ | |
| 1025 | }; |
| 1026 | |
| 1027 | (function(){/*Set up #chat-settings-button */ |
| 1028 | const settingsButton = document.querySelector('#chat-settings-button'); |
| 1029 | const optionsMenu = E1('#chat-config-options'); |
| 1030 | const cbToggle = function(ev){ |
| 1031 | ev.preventDefault(); |
| 1032 | ev.stopPropagation(); |
| 1033 | if(Chat.e.configArea.classList.contains('hidden')){ |
| 1034 | D.removeClass(Chat.e.configArea, 'hidden'); |
| 1035 | D.addClass([Chat.e.messagesWrapper, Chat.e.previewArea], 'hidden'); |
| 1036 | }else{ |
| 1037 | D.addClass(Chat.e.configArea, 'hidden'); |
| 1038 | D.removeClass(Chat.e.messagesWrapper, 'hidden'); |
| 1039 | } |
| 1040 | return false; |
| 1041 | }; |
| 1042 | D.attr(settingsButton, 'role', 'button').addEventListener('click', cbToggle, false); |
| 1043 | Chat.e.configArea.querySelector('button').addEventListener('click', cbToggle, false); |
| 1044 | /* Settings menu entries... */ |
| 1045 | const settingsOps = [{ |
| 1046 |
-3
| --- src/style.chat.css | ||
| +++ src/style.chat.css | ||
| @@ -226,13 +226,10 @@ | ||
| 226 | 226 | body.chat #chat-edit-buttons { |
| 227 | 227 | display: flex; |
| 228 | 228 | flex-direction: column; |
| 229 | 229 | justify-content: space-between; |
| 230 | 230 | } |
| 231 | -body.chat #chat-input-line.single-line { | |
| 232 | - flex-direction: column; | |
| 233 | -} | |
| 234 | 231 | body.chat #chat-input-line.single-line #chat-edit-buttons { |
| 235 | 232 | flex-direction: row; |
| 236 | 233 | } |
| 237 | 234 | body.chat #chat-edit-buttons > * { |
| 238 | 235 | /*flex: 1 5 auto;*/ |
| 239 | 236 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -226,13 +226,10 @@ | |
| 226 | body.chat #chat-edit-buttons { |
| 227 | display: flex; |
| 228 | flex-direction: column; |
| 229 | justify-content: space-between; |
| 230 | } |
| 231 | body.chat #chat-input-line.single-line { |
| 232 | flex-direction: column; |
| 233 | } |
| 234 | body.chat #chat-input-line.single-line #chat-edit-buttons { |
| 235 | flex-direction: row; |
| 236 | } |
| 237 | body.chat #chat-edit-buttons > * { |
| 238 | /*flex: 1 5 auto;*/ |
| 239 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -226,13 +226,10 @@ | |
| 226 | body.chat #chat-edit-buttons { |
| 227 | display: flex; |
| 228 | flex-direction: column; |
| 229 | justify-content: space-between; |
| 230 | } |
| 231 | body.chat #chat-input-line.single-line #chat-edit-buttons { |
| 232 | flex-direction: row; |
| 233 | } |
| 234 | body.chat #chat-edit-buttons > * { |
| 235 | /*flex: 1 5 auto;*/ |
| 236 |