Fossil

History of src/chat.js of 217b0d2548c7183f
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of file src/chat.js at check-in 217b0d2548c7183f

2025-12-28
23:00
Remove some more duplicates in comments. No functional changes. file: [8b080a2aff] check-in: [d83638e40e] user: danield branch: trunk, size: 113699
2025-12-23
16:06
Assorted fixes of typos and grammar in code comments. No functional changes. file: [b0ce32fe15] check-in: [e2bdc10572] user: danield branch: trunk, size: 113703
2025-12-19
04:43
Update a comment about contenteditable=plaintext-only to reflect current browser status. No code changes. file: [b750aaa63d] check-in: [480bf26bf8] user: stephan branch: trunk, size: 113703
2025-12-11
20:11
Re-scope a var in /chat, noticed while looking up the answer to an off-list question about its keystroke handling. No functional change. file: [4308857596] check-in: [9c2741ec92] user: stephan branch: trunk, size: 113669
2025-11-28
18:11
/chat: slight size tweak to try to avoid message truncation in zoom mode. When switching views, ensure that any zoomed widget is moved back where it needs to be so that, e.g. visiting the config view while zooming does not cause the message to locally disappear. file: [f7cce790d4] check-in: [5d71561e20] user: stephan branch: trunk, size: 113667
2025-11-27
14:11
The various /chat Delete buttons misinteract with zoom mode's moving-around of the message widget within the DOM, so hide those buttons in zoom mode. file: [df3ca2677e] check-in: [1c75007627] user: stephan branch: trunk, size: 113507
14:00
Tapping the Zoom button on a zoomed messages now unzooms it (same as the Close Zoom button). file: [d5062ca1ed] check-in: [24e050a0be] user: stephan branch: trunk, size: 113475
13:16
Initial work on the /chat option to zoom a single message into its own view, the idea being that it will render pikchrs larger. The initial bits are in place but i've yet to find the CSS combination which will get the message widget to stretch out in the zoom view. file: [f209e7f408] check-in: [ff297e1a35] user: stephan branch: chat-zoom-msg, size: 113515
2025-11-24
13:39
Add some text to /chat config which suggests enabling all of the Editing options insofar as they don't misinteract with the user's specific browser or software keyboard. file: [d198f52519] check-in: [54272f72a1] user: stephan branch: trunk, size: 112064
2025-08-17
15:00
Remove some dead code from /chat. file: [fe8121d2f7] check-in: [144c5dbe00] user: stephan branch: trunk, size: 111856
14:52
Correct a mis-calculation of fontSize for /chat attachments which use the Embed checkbox. file: [cc6de8723b] check-in: [e3f0dcc325] user: stephan branch: trunk, size: 112012
2025-08-12
15:04
Revamp the Copy Buttons for a more responsive user experience. See the [branch/copybtn.js-responsive | wiki page linked to this branch] for more details. file: [359ba24a33] check-in: [32c3a210c8] user: florian branch: copybtn.js-responsive, size: 112003
2025-04-12
01:15
Fix an age-old /chat bug which caused /chat-delete posts to misadjust the ajax-in-flight counter, leading to various UI widgets not being disabled when they should after a message is deleted. file: [d38a457176] check-in: [2827a38aca] user: stephan branch: trunk, size: 112069
00:07
Maintainability cleanups and docs in /chat. No (intended) functional changes. file: [55fadbaab9] check-in: [084001c76d] user: stephan branch: trunk, size: 112095
2025-04-11
20:29
In /chat-generated notifications (typically error messages), add a button to the drop-down options to delete all notifications. That replaces the 'delete all poller notifications' button which previously only showed up only on those message types. Add a mention of the backoff timer to chat.md. file: [3ccf6d47ee] check-in: [da1c351b6e] user: stephan branch: trunk, size: 110611
19:35
Replace an a recurrent setInterval() timer in /chat's poll-connection error handler with a single-fire-as-needed setTimeout(). This saves some CPU and allows /chat to respond more quickly to non-timeout HTTP errors. file: [29ee3a7a40] check-in: [1bfb06c752] user: stephan branch: trunk, size: 110501
18:52
Further refinements of the chat poll connection detection. The first N ignored errors are now spaced out unevenly. Use the server's configured chat-poll-timeout as the basis for calculating our client-side timeout time. file: [7d7954246e] check-in: [e8bbaf924f] user: stephan branch: trunk, size: 110559
16:09
Minor cosmetic tweaks to the poll-in-distress indicator. Make it yellow in dark-mode skins, as red blends in too well. No functional changes. file: [d7c48303c0] check-in: [160d26923b] user: stephan branch: trunk, size: 109322
15:30
Teach /chat to not be so verbose about connection errors. The first 3 will be subtly signaled via a tiny red line between the input field and message list, which will go away once the poller connection is re-established. After that, it will resort to the more verbose notifications. file: [c2ae9731b1] check-in: [e3eb83997b] user: stephan branch: trunk, size: 109503
2025-04-10
16:11
Add a 'retry now' button to the /chat poller timeout notification widgets. Fix a bug which kept Chat.deleteMessageElem() from working if it was passed a MessageWidget instance. file: [2a9e70fcfe] check-in: [8c64fa26f3] user: stephan branch: trunk, size: 108072
15:14
Fix an = vs == bug in the /chat timeout error handling which only coincidentally worked that way. Update some /chat-internal docs. file: [40bbcb7d59] check-in: [5fc2f2a034] user: stephan branch: trunk, size: 107391
14:24
Remove comments calling for a now-resolved TODO. No code changes. file: [c4848b3565] check-in: [a5521984c3] user: stephan branch: trunk, size: 106835
07:23
When deleting a connection-restored notification, also delete the connection-broken notification it's associated with. Add a button to the message popup for connection-related notifications to delete all connection-related notifications. When running on localhost, reduce the /chat poller timeout to 15s. file: [e2203bae67] check-in: [79932a5210] user: stephan branch: chat-backoff-timer2, size: 107612
06:12
Improve an error message. file: [686b0616a9] check-in: [1f97db779d] user: stephan branch: chat-backoff-timer2, size: 106196
06:08
Remove some stray debug output. Make fossil.dom.remove() a bit more robust against passed-in elements which have already been removed from the DOM. file: [85ab1ef913] check-in: [040a7d4503] user: stephan branch: chat-backoff-timer2, size: 106189
06:02
Restore the production-mode (not dev-mode) long-pole timeout. file: [d1b2485a72] check-in: [8da1269599] user: stephan branch: chat-backoff-timer2, size: 106174
06:01
Rework the chat poll fallback considerably. The notification widgets now interact with other messages better and don't mis-fire when the long-poll connection times out. file: [6adf6d5489] check-in: [9516f7cd15] user: stephan branch: chat-backoff-timer2, size: 106174
00:28
Make (refine?) the back-off random delay adjustment to be a factor of the current delay. file: [016dbadee4] check-in: [f75fb1dd54] user: stephan branch: chat-backoff-timer, size: 103860
00:16
Get the /chat-fetch-one handler to lift the back-off delay on success. file: [d500cb3046] check-in: [d3baf9d5ec] user: stephan branch: chat-backoff-timer, size: 103818
00:08
Apply the connection-recovery reporting to the other AJAX commands, so that they can trigger the polling to continue if they determine that the connection is back up. Internal cleanups. file: [c4b14f5d26] check-in: [fd36f8490b] user: stephan branch: chat-backoff-timer, size: 103877
2025-04-09
22:37
If /chat's poller cannot connect to the server, apply a back-off timer so that it does not keep hammering the remote every single second. It attempts to inform the user about outages and when reconnection has succeeded, but it's difficult to test the timing of the the UI elements thoroughly with a single pair of hands, so this is being checked in for dogfooding. file: [fda30be86e] check-in: [2debc54e67] user: stephan branch: chat-backoff-timer, size: 102893
2024-11-05
10:00
(Grammar) Missing terminating period, one is present in preceding phrase. file: [79429e7e10] check-in: [669633dd18] user: brickviking branch: bv-corrections01, size: 98514
2024-08-09
10:32
Doc touchups in /chat. No code changes. file: [3cefe611f1] check-in: [7141427370] user: stephan branch: trunk, size: 98513
2024-07-23
12:27
Revert a /chat change, introduced in [be01315c86cd2f7d], which causes the Send button to trigger a preview update if the current view is the preview. In practice that's annoying, as the shift-enter and the preview button do the same thing and this change forces a separate click to leave preview mode. file: [e7ab13ddac] check-in: [ec6fbe9863] user: stephan branch: trunk, size: 98213
2024-07-09
15:20
Use the long date format for all messages in the chat search dialog, not just those that match the current query. file: [151f9f840f] check-in: [2a3a32edea] user: dan branch: trunk, size: 98287
2024-07-06
09:33
/chat: when tapping on a #NNNN reference, if the referred-to message is not loaded in the local history then search the chat history for message #NNNN. file: [89d091119d] check-in: [347084af90] user: stephan branch: markdown-tagrefs, size: 105004
2024-07-03
12:55
Merge trunk into the markdown-tagrefs branch to begin experimentation with tying chat #NNN references into the new search capabilities. file: [8f8e5f6a3d] check-in: [5e26fd4c10] user: stephan branch: markdown-tagrefs, size: 105002
09:16
Merge trunk into markdown-tagrefs branch. file: [0a2e312772] check-in: [9d3ca32ef7] user: stephan branch: markdown-tagrefs, size: 93856
2024-07-02
12:04
Chat help text cleanups and add a FIXME regarding connection failure (as opposed to HTTP-level errors) while polling for new chat messages (which is not a new problem, but is one which came up while working on fts5-chat-search). file: [edd2e93fe2] check-in: [4711a8c4dd] user: stephan branch: fts5-chat-search, size: 98248
11:03
If the chat search request has an HTTP error, report it. It currently fails without any useful information, beyond the HTTP code, if the query triggers a prepare() error, but that's at least no longer silently failing. file: [be29dcfadc] check-in: [5ae93fd23f] user: stephan branch: fts5-chat-search, size: 97460
10:33
Add chat search for message by ID using search term #NNNN. file: [ae28f3ca03] check-in: [3449350042] user: stephan branch: fts5-chat-search, size: 97324
09:22
/chat: use the historical timestamp format for main-feed messages and ISO-8601 for search results. Misc. internal cleanups. file: [34b589cee1] check-in: [3c53bd325a] user: stephan branch: fts5-chat-search, size: 97176
2024-07-01
18:40
Clean up some harmless stray tokens. file: [27c9b830b4] check-in: [417bb15064] user: stephan branch: fts5-chat-search, size: 96975
18:36
Ensure that chat search results get placed in the proper parent DOM element (this fixes some layout unsightliness). Remove the DOM elements related to loading more search result context when they have no more results to load. file: [c3215ba902] check-in: [2e8f1a9a15] user: stephan branch: fts5-chat-search, size: 96987
08:54
Add clear-search option to chat search and code-adjacent cleanups. file: [d3638c26e2] check-in: [be01315c86] user: stephan branch: fts5-chat-search, size: 95943
08:11
Remove the now-superfluous /chat-search page. Preliminarily switch to long-format time strings in /chat messages, but that's up for reworking as we decide how we want to handle those. file: [828639a5cf] check-in: [e1f6c7f589] user: stephan branch: fts5-chat-search, size: 94937
2024-06-30
15:44
Add context-loading buttons to /chat search. file: [e268ebb5b0] check-in: [884214d0e3] user: stephan branch: fts5-chat-search, size: 94560
15:11
Basic /chat search is working, but it's missing the load-more-context buttons and appropriate timestamps. Checking in for purposes of dogfooding it on my server. file: [2783b4e78e] check-in: [7561498cf7] user: stephan branch: fts5-chat-search, size: 89451
13:57
Hook up the event handlers for the /chat search UI. Next up: run the search. file: [b8f8118d9a] check-in: [7f745aa647] user: stephan branch: fts5-chat-search, size: 88794
13:06
Main UI of chat history search for /chat, without the actual search functionality. file: [8cfee24bd7] check-in: [80b869acf9] user: stephan branch: fts5-chat-search, size: 87790
2024-05-15
21:11
In /chat, add a config option to audibly notify only for the first message received when the tab is not visible, and then remain silent until chat is visited again. file: [b1aa83a1ca] check-in: [df86fa3357] user: stephan branch: trunk, size: 87102
2024-04-20
21:58
In /chat preview mode, apply the click handlers to pikchrs in the preview. file: [353b598a66] check-in: [133e6e59b9] user: stephan branch: trunk, size: 86494
2024-03-05
12:53
Merge trunk into markdown-tagrefs branch. file: [9e92229fcb] check-in: [0517bd2dd8] user: stephan branch: markdown-tagrefs, size: 93090
2024-02-11
12:45
Removed the body-area h1 from the /chat message-area size calculation now that it's being suppressed in CSS. This should be a net zero now. file: [468a8092b5] check-in: [e4aca28d1c] user: wyoung branch: trunk, size: 86336
10:56
Merged two near-identical lists of CSS selectors in the /chat JS into one. As far as I can tell, they _are_ supposed to be identical, since they're both concerned with calculating the "framing" elements of the chat area, being everything other than the list of messages. It looks like they slipped out of that ideal in the way duplicated code does. file: [82e63f6d14] check-in: [1cf4a7d728] user: wyoung branch: trunk, size: 86359
10:27
Grammar fix in "Left-align my posts" /chat setting hint file: [f8dc6630b2] check-in: [aca0be1659] user: wyoung branch: trunk, size: 86483
2024-02-10
22:12
Fixes to /chat's js to allow for the new skin changes. (Mea culpa; didn't even think to try /chat while working on all this.) file: [b9483cc892] check-in: [4dc8798583] user: wyoung branch: trunk, size: 86476
2023-12-22
14:32
Add option to disable the shift-enter preview hotkey in /wikiedit, /fileedit, and /chat as a workaround for software keyboards which report the shift key being pressed when auto-capitalizing text, per discussion in [forum:dbd5b68366147ce8|forum post dbd5b68366147ce8]. file: [c69434686c] check-in: [4bb5515cae] user: stephan branch: trunk, size: 86475
14:27
Remove the write-perms check from the /ajax/preview-text route so that folks without checkin permissions can use /chat. Problem reported in [forum:ed4a762b3a557898|forum post ed4a762b3a557898]. Some code-adjacent end-of-line whitespace cleanups. file: [81f6e03d55] check-in: [0c6e669a7b] user: stephan branch: trunk, size: 85782
2023-12-16
01:39
Add the shift-enter toggle config option to /chat, sharing the same persistent config key as /wikiedit and /fileedit. file: [ece252cd04] check-in: [895ecf9e4d] user: stephan branch: shift-enter-preview, size: 86477
2023-01-21
12:14
Merge trunk into markdown-tagrefs branch. file: [9fa22140fc] check-in: [baf038b1aa] user: stephan branch: markdown-tagrefs, size: 92538
2022-11-29
21:08
Remove JS console debug output added by the previous checkin. file: [44287811e6] check-in: [2755b31a87] user: stephan branch: trunk, size: 85784
20:59
/chat: add embedded view support for .wiki/.md/.pikchr file attachments, with the caveat that the rendering happens in an iframe and thus has some limitations/usability quirks compared to non-iframed content. Added based on feedback from a /chat session. file: [3df62dc846] check-in: [fd5298f027] user: stephan branch: trunk, size: 85910
2022-11-16
20:05
Fix harmless typos reported by [forum:/forumpost/15f7327318|forum post 15f7327318]. file: [d0a74b587a] check-in: [f3adbd8874] user: drh branch: trunk, size: 84352
2022-11-13
18:49
Update /chat and /pikchrshow UIs to work with skins conforming to the WCAG rework as well as pre-WCAG skins (except for the bootstrap skin, which restructures the DOM in an incompatible way). file: [0ecc928c6d] check-in: [d208efdd5e] user: stephan branch: wcag-2.1, size: 84261
16:26
Apply fixes to all web views to pass WCAG 2.1 tests performed by "axe DevTools" browser extension. Most fixes related to screen reader compatibility, like making sure that form elements have labels. Some color changes to improve contrast on Default skin. Made more HTML5 compliant. Minor improvement to select combo boxes for UX. Improved Search form UX. Two minor bug fixes for malformed HTML. Fixed help pages to resolve issues with non-compliant HTML being generated. Mostly documented at https://fossil-scm.org/forum/forumpost/aafb17a981df4166 file: [0fea9f8a77] check-in: [1f231db380] user: ericwikman branch: wcag-2.1, size: 84408
2022-06-11
12:34
Merged in trunk. file: [43c12368fd] check-in: [fd14e7ec62] user: stephan branch: markdown-tagrefs, size: 91105
2022-06-08
15:52
/chat: do not show the Toggle Text Mode feature for messages with no text, e.g. image-only posts (resolves an unhandled exception). When text is toggled to the unparsed state, show a copy-to-clipboard button which copies the raw message text to the clipboard. That is a workaround for mouse-copying of that text collecting extraneous newlines for reasons only the browsers understand. file: [6173560b37] check-in: [f98a4f5c94] user: stephan branch: trunk, size: 84351
15:17
In /chat, change the EOL whitespace-stripping policy to retain up to 2 spaces, only stripping after the 3rd, to avoid breaking certain markdown constructs. Per /chat discussion. file: [40a78d2cd0] check-in: [cd7f2ddc98] user: stephan branch: trunk, size: 82899
2022-01-15
10:09
Merged in trunk. file: [88d5b70726] check-in: [d11cbb637b] user: stephan branch: markdown-tagrefs, size: 89410
2022-01-01
23:09
/chat: be more restrictive in what mimetypes we enable embedding for because loading an iframe with an arbitrary mimetype might force the browser to prompt to download the content. Leave the Embed toggle enabled, even during loading, to avoid that such a download prompt leaves the toggle permanently disabled. That latter bit required some refactoring of the auto-iframe-resize to account for toggling while the content is still in transit. file: [ee39a5cb50] check-in: [0423fb8d7b] user: stephan branch: trunk, size: 82656
13:09
/chat: when creating download links, append file's extension to the /chat-download/MSGID so that the browser's mime-type guessing can work better (seems to fix inline SVG attachments). Prefer to use an attachment's mimetype, instead of filename, for guessing whether it can be embedded, and enable embedding for all text/ and image/ mimetypes. file: [3c44c060f1] check-in: [cead9178c8] user: stephan branch: trunk, size: 81629
2021-12-31
02:59
Merged in trunk. file: [73c448ce92] check-in: [c800d2ca82] user: stephan branch: markdown-tagrefs, size: 88184
2021-12-30
19:02
/chat: if an iframe's body has no fontSize set, try to force it to match the message wrapper's font size. Whether this works might be environment-dependent. Add support for embedding images in iframes if the when the 'inline images' option is off. file: [b2f257d0cb] check-in: [d4b167bd97] user: stephan branch: chat-attachment-iframe, size: 81430
18:26
/chat: shorted 'Toggle Embedded' label to 'Embed'. file: [22252ea29d] check-in: [490c7b435f] user: stephan branch: chat-attachment-iframe, size: 80760
18:02
/chat: added txt to the list of iframe-embeddable extensions. file: [344e3324f4] check-in: [1721d3089a] user: stephan branch: chat-attachment-iframe, size: 80770
17:58
/chat: change the Embed button to a toggle checkbox to show/hide the embedded iframe. file: [7e71e6a29c] check-in: [956515f677] user: stephan branch: chat-attachment-iframe, size: 80759
17:39
/chat: fixed text mode toggle to not mangle messages with attachments (it apparently never worked properly with them). file: [59ab9d2c75] check-in: [7678922283] user: stephan branch: chat-attachment-iframe, size: 80091
17:20
/chat: experimentally add an Embed button to HTML attachments which embeds their contents in an iframe. file: [d38818786f] check-in: [d9e3ed5e20] user: stephan branch: chat-attachment-iframe, size: 79969
2021-12-22
10:57
Fixed a null-pointer deref in /chat JS in the try-to-resend-message error handler. file: [3559e64002] check-in: [86bba486c5] user: stephan branch: trunk, size: 78972
2021-12-16
04:20
Merged in trunk and resolved numerous code clashes in /chat. file: [ad962bf77c] check-in: [54dba74790] user: stephan branch: markdown-tagrefs, size: 85721
2021-10-12
20:28
/chat: fixed an error reporting bug which could cause server-triggered errors to not be displayed. When sending a message fails, the failed message is now presented as an error message, along with buttons to either retry or discard the message. file: [7c3659c333] check-in: [9d693ef80a] user: stephan branch: trunk, size: 78967
2021-10-10
15:44
/chat: grouped config settings into categories. Moved config checkboxes back to the left, per /chat feedback, but now clicking anywhere on their row toggles them. Slightly shrunk the main buttons when in non-compact mode. Various look-and-feel and help text tweaks to the config view. file: [aefafea624] check-in: [67e8599874] user: stephan branch: trunk, size: 77110
14:07
Integrated a debouncer into the window-resize monitor callbacks used by the diff table views and /chat to eliminate a flurry of UI resizing while resizing a window, per suggestion from Florian in [forum:7807e0dbcca1dc45 | forum post 7807e0dbcca1dc45]. file: [204842965f] check-in: [df0e2ca168] user: stephan branch: trunk, size: 76521
06:31
More /chat config cosmetics. Started 2.18 change notes. file: [411a26f7e9] check-in: [891d79de18] user: stephan branch: chat-input-revisited, size: 76602
05:53
/chat: added option to toggle between text and contenteditable widget, defaulting to the former. Prettied up the config view a bit and made it more right-handed friendly. file: [5d1aabe312] check-in: [5d7c98ef92] user: stephan branch: chat-input-revisited, size: 75886
04:13
/chat input field rework, as discussed in [forum:9e85f44f864eb1f5 | forum post 9e85f44f864eb1f5]. Part 1: revert to plain text input fields, with compact-mode toggle swapping between them. file: [e91dafba99] check-in: [136d95b6f1] user: stephan branch: chat-input-revisited, size: 73223
2021-10-09
04:12
/chat: a long-shot potential workaround for the weird intermittent bug where the Pale Moon browser gives focus to the preview (non-)button instead of the input field. Worst case, it behaves the same as it does now. file: [c3c225ef42] check-in: [e3e62a0d3d] user: stephan branch: trunk, size: 72157
2021-10-07
16:45
/chat: removed some debug output. Reformulated part of the previous checkin to only re-grab input focus if the input field is not document.activeElement. file: [d165cbaf37] check-in: [85a99733d5] user: stephan branch: trunk, size: 72138
16:27
/chat: 1) force the cursor on the input element to always be 'text' (I-beam), even when it doesn't have focus (browser inconsistency) and 2) when the chat window regains visibility after having lost it, give focus to the input element to try to work around a problem where Pale Moon is giving focus to one of the pseudo-buttons. Change (2) comes with a couple of minor but annoying quirks and might have to be undone, but it's worth a try. file: [17661bbc8b] check-in: [503395796e] user: stephan branch: trunk, size: 72121
2021-10-06
14:27
/chat default message font is now inherited from the skin instead of defaulting to monospace, per /chat discussion. file: [361240eae4] check-in: [3cd13cb633] user: stephan branch: trunk, size: 71585
02:38
Merge in trunk for test server deployment. file: [2cbfe6e90a] check-in: [664b04b280] user: stephan branch: markdown-tagrefs, size: 78426
02:37
/chat: a potential fix to stop *some* builds of Firefox from pasting formatted content into the edit field. (Some builds, same version, do not do so.) file: [2e91cf957e] check-in: [498bc071ca] user: stephan branch: trunk, size: 71584
2021-10-05
18:44
Merged in trunk for latest /chat features. file: [699559120f] check-in: [49689e1c70] user: stephan branch: markdown-tagrefs, size: 77954
18:43
/chat: re-added accidentally-disabled animation. Added a button to locally delete all messages prior to the current one in the per-message controls. The intent is to stop unbounded growth (and potential lag) in long-running chats and give the user to way to flag "have read up until this point". file: [5285c2da14] check-in: [fe0bcfaad1] user: stephan branch: trunk, size: 71112
15:49
/chat: reuse the window-resize listener to cap the max-size of the input field to approx. half the height of the screen, per user feedback. file: [c9cda04a48] check-in: [84d4a0e851] user: stephan branch: trunk, size: 70514
2021-10-04
19:48
Merged in trunk for latest (and conflicting) /chat changes. file: [e532ab3e52] check-in: [7cae4c0981] user: stephan branch: markdown-tagrefs, size: 76792
19:01
/chat: replaced input-related buttons with span elements in an attempt to get more consistent cross-browser results. Renamed some internal element IDs for naming consistency's sake. file: [f9f74d3dcd] check-in: [98b2cbe69b] user: stephan branch: trunk, size: 69950
2021-10-03
19:56
Rotated the paperclip 45 degrees (it's now horizontal) and restored the behavior that ctrl-enter will send a message if there is only an attachment with no text. file: [5ba8c508c0] check-in: [b8a20e20ff] user: stephan branch: chat-input-rework, size: 70011
2021-10-02
04:57
Added a toggle to play the audio alert (or not) for one's own messages (default=off) and added docs describing each configurable setting. file: [0df7404d59] check-in: [8534eb75e1] user: stephan branch: chat-input-rework, size: 69982
04:21
Do not play notification sound for the sender's own messages. This change was made and reverted before so may be subject to further debate. file: [53cae740f6] check-in: [87c29eee98] user: stephan branch: chat-input-rework, size: 68084
02:09
Reordered two config menu entries. Removed the enter/ctrl-enter toggle toast because that info is now in the edit widget's placeholder text and the toast can block access to config view entries for a few seconds. file: [f960c0f0ad] check-in: [b2d55ec947] user: stephan branch: chat-input-rework, size: 68066
2021-10-01
17:40
Removed the cumbersome and platform-dependent file selection widget from view and now proxy its activation via a new toolbar button. Saves space and looks nicer. file: [de9ef90556] check-in: [2b07b66d59] user: stephan branch: chat-input-rework, size: 68101
14:14
Added file attachment widget toggle (on by default) and reversed order of config options (top-down instead of bottom-up) because that simply seems more intuitive. file: [14f579f4c8] check-in: [40cdaeecd4] user: stephan branch: chat-input-rework, size: 69312
12:48
Made monospace the default because that setting now also applies to the input area and this chat is often used for conveying code. Accounted for a couple bits of skin-specific weirdness. file: [9dce420810] check-in: [f9e2851a99] user: stephan branch: chat-input-rework, size: 69042
12:26
Reimplemented [607b11ddc6] to use a proper feature check approach rather than user agent string check. file: [706fd16e91] check-in: [d96f6f195c] user: stephan branch: chat-input-rework, size: 69043
12:13
Found a Chrome-only workaround to tell Chrome not to paste formatting into the chat editor field. file: [0b4e9c0cdc] check-in: [607b11ddc6] user: stephan branch: chat-input-rework, size: 69015
2021-09-30
21:01
Documented the source of the extraneous end-of-line spaces when pasting from a console. Changed the markdown backslash-space-space workaround to backslash-n-spaces. file: [db5ae41698] check-in: [87b0b12dc4] user: stephan branch: chat-input-rework, size: 68714
19:56
Re-enabled ctrl-enter-sends when enter-sends mode is active (was disabled during testing). Update the tooltip on the send button to reflect the current send mode. file: [1d350b7c73] check-in: [7d6c07496e] user: stephan branch: chat-input-rework, size: 68586
19:32
Forcibly disable drop support in the new editor widget, as the browser will otherwise allow the user to drop images to it, which is confusing and does not work with our ability to upload images. Found a way to implement placeholder text in the contenteditable field. file: [fe4a87f425] check-in: [86d6be3fe2] user: stephan branch: chat-input-rework, size: 68463
17:24
Minor restructuring and docs in the enter/ctrl-enter handling. Trying to get ctrl-enter to add newlines when in enter-sends mode, but it's not working for reasons beyond my ken. file: [9bca7ab477] check-in: [ab9fef759e] user: stephan branch: chat-input-rework, size: 67607
15:59
When stripping trailing spaces from lines to avoid the "console paste problem", leave markdown paragraph continuation markers intact. Robustified the config view layout in a trial-and-error attempt to defend against Safari-on-iPhone layout bugs. file: [5a35677afd] check-in: [cbc7f117e6] user: stephan branch: chat-input-rework, size: 67116
03:21
Provide a toast notification when ctrl-enter mode is toggled via keypress. file: [7b31f7177f] check-in: [c448462596] user: stephan branch: chat-input-rework, size: 66261
03:14
Split ctrl-enter/enter input modes and compact/spacious layout into two independent settings. file: [ddbaf611aa] check-in: [a83defad3a] user: stephan branch: chat-input-rework, size: 66155
2021-09-29
22:30
Added mini-help hint text to /chat config view entries. file: [8f6c677983] check-in: [3259251aeb] user: stephan branch: chat-input-rework, size: 64606
22:08
Significant reworking of chat input mode to use a single contenteditable element instead of two text input elements. This required considerable collateral cleanup in how the various settings are handled and communicated within the app. file: [12315f93a9] check-in: [b9c5792e34] user: stephan branch: chat-input-rework, size: 63729
17:03
/chat: shift-enter when in preview mode now switches back to message list mode if the input field is empty. It was previously only possible to switch back via button or sending a message. file: [524f18a75d] check-in: [79995e1355] user: stephan branch: trunk, size: 63567
16:50
Merged in trunk for latest changes. file: [a6c92c44ad] check-in: [09f86815c6] user: stephan branch: markdown-tagrefs, size: 70101
16:45
Consolidated /wikiedit, /pikchrshow, /fileedit, and /chat to use shift-enter to run preview mode. The former 3 previously used ctrl-enter but it was poorly documented and probably not widely used like ctrl-enter is in chat (to send a message). file: [7654818a3a] check-in: [13fabf3f4d] user: stephan branch: trunk, size: 63213
2021-09-28
11:22
/chat: experimental HTML5 history support for using the back button to return to a message from which a #nnn message ID was clicked. file: [87a03d35cb] check-in: [9df3fc6b0f] user: stephan branch: markdown-tagrefs, size: 69865
11:06
Renamed and modified src/chat.js → src/fossil.page.chat.js. Merged in trunk. /chat changed jump-to-message animation to fade out/in, per requests. Added HTML5 history to /chat clicks on #NNN message references but it's disabled because it's behaving unexpectedly. file: [609bc33723] check-in: [99b23d0fa3] user: stephan branch: markdown-tagrefs, size: 69399
09:45
Renamed and modified src/chat.js → src/fossil.page.chat.js. Moved chat.js to fossil.page.chat.js, for consistency with the other single-page apps and to emphasize that it is not to be loaded on arbitrary pages. Changed chat's startup to wait until the page on-load event to avoid a related timing issue. file: [42a3a086b2] check-in: [3ec8c6c04d] user: stephan branch: trunk, size: 62977
2021-09-25
12:26
Added #NNN and #NNN.NNN references as a special case of hashtag, noting that it will currently match a prefix of #NNN.NNN.NNN. Taught /chat that clicking on such a reference should jump to the referenced message or toast the user that the message is not in the current history. file: [0bf2f128a7] check-in: [4539bf8792] user: stephan branch: markdown-tagrefs, size: 68095
11:35
/chat: when applying a filter, automatically switch to the messages view. Apply hashtag processing to the preview view. file: [c5a2a2e473] check-in: [b59a761bb2] user: stephan branch: markdown-tagrefs, size: 67074
10:54
Improved the behavior in the face of multiple filters, applying only the most recent one. Added a button to clear filters which appears along the bottom of the message area if any filter is active. file: [e524dedd4d] check-in: [93bf25055a] user: stephan branch: markdown-tagrefs, size: 66988
2021-09-24
17:11
Removed an accidental extraneous animation on every chat message sent. file: [df7bc9ff86] check-in: [0fe5b6cb7e] user: stephan branch: chat-user-filter, size: 62955
17:01
Several minor cleanups, fixes, and presentation tweaks. file: [cb8f9a18c6] check-in: [10107e4fbc] user: stephan branch: chat-user-filter, size: 62889
12:07
Disable chat animations during the bootstrapping process. Increated timestamp size a tick. Xekri CSS tweak to eliminate body-level scrollbars in chat-only mode. file: [d273423343] check-in: [4ff16c0572] user: stephan branch: chat-user-filter, size: 61833
10:14
Animation tweaks and more predictable scrolling when the user filter is cleared (always scroll to the button). file: [44f73f3364] check-in: [3d4101d354] user: stephan branch: chat-user-filter, size: 61577
09:42
Doc typos and sped up the message-in-context animation a tick. file: [7502158c53] check-in: [2b3a6ed846] user: stephan branch: chat-user-filter, size: 60655
09:29
Changed the "message in context" animation to something more eye-catching and less stuttery. file: [c768d87495] check-in: [fc27d6a333] user: stephan branch: chat-user-filter, size: 60650
08:37
When chat view is filtered on a single user, the per-message popup now offers the option to jump to that message in the larger unfiltered context. When toggling the active user timestamps on, also toggle the active user setting on if it's not already on. file: [21e397b2b0] check-in: [5aac6ae058] user: stephan branch: chat-user-filter, size: 60612
2021-09-23
20:11
Insignificant typos. file: [0466d59706] check-in: [a4b9af1bb0] user: stephan branch: chat-user-filter, size: 59078
15:51
Only update the recent activity view when it's active or activated, not when it's hidden/inactive. file: [4e5e0c02ed] check-in: [06196b1993] user: stephan branch: chat-user-filter, size: 59078
13:26
Added a help buttonlet to the user activity list. file: [abea31b699] check-in: [f39c8326e2] user: stephan branch: chat-user-filter, size: 58868
12:41
When batch loading chat messages, delay update of recent activity list until after the batch is done. Squeezed about 0.5em more space out of the screen. file: [f2b709bdc5] check-in: [7c2f3eb31f] user: stephan branch: chat-user-filter, size: 58794
12:23
Corrected persistence of the timestamps toggle. Removed about 40 lines of dead CSS. file: [09b1d024b6] check-in: [dddd42baa6] user: stephan branch: chat-user-filter, size: 58640
12:00
Added toggle for the recent activity timestamps. file: [d01f8b63c9] check-in: [9938acb049] user: stephan branch: chat-user-filter, size: 58507
11:44
UI refinement of the chat user activity list. file: [ae8d165a87] check-in: [7aea432a47] user: stephan branch: chat-user-filter, size: 58042
09:41
Proof of concept /chat "active user list" which keeps track only of users who have posted messages in the client's current list and allows filtering on those messages by tapping a user. Widget is hidden by default and can be toggled in the config area. There are still cases to figure out (e.g. new messages do not apply the current filter). file: [29958a35a2] check-in: [dafd549711] user: stephan branch: chat-user-filter, size: 56828
03:46
/chat: give the input field focus when chat starts up. file: [37014953da] check-in: [c3362100e2] user: stephan branch: trunk, size: 52926
2021-09-22
17:12
Possibly fixed a case where /chat's preview button will get stuck in a disabled state, but it's intermittent and difficult to trigger so am not 100% sure. file: [a41f1b76d8] check-in: [2d385d94f5] user: stephan branch: trunk, size: 52884
12:22
Micro-adjustments to /chat CSS to squeeze a tiny bit more space from the bottom of the screen. file: [7d93a262aa] check-in: [62deb8f794] user: stephan branch: trunk, size: 52929
11:15
Simplified and consolidated how /chat internally manages its 3 separate main views, with an eye towards making it easy to add additional views. No user-visible changes. file: [e673517b77] check-in: [593d3a3a1e] user: stephan branch: trunk, size: 52926
2021-09-21
20:07
Internal cleanups of how /chat config area is built up. No significant visible changes. file: [ce6efe75d9] check-in: [60206ef512] user: stephan branch: trunk, size: 53122
19:45
Tweaked the /chat config options layout so that the entries start at the bottom of the view to put them in easier reach on tall screens, and moved the presumably most common options to the bottom so that they start out scrolled into view on smaller screens. file: [20f7b4e82f] check-in: [3524f72e6b] user: stephan branch: trunk, size: 52936
16:28
Removed some extraneous console debug output. file: [0fb6e0b624] check-in: [8663dde1df] user: stephan branch: trunk, size: 52936
16:10
Reimplemented chat message operations popup as an inlined DOM element to enable a confirmation option on the global delete button, per request from drh (and it's also more platform-portable). file: [698b3878dc] check-in: [fb9026e264] user: stephan branch: trunk, size: 53028
15:02
Updated changelog for chat preview. Hyperlinks in preview mode now have target=_blank. Removed extraneous FORM element around chat input area, as it caused only grief with regards to Enter key handling (always activating the first button in the list, which is now the preview button). file: [a618535320] check-in: [60ed1ff951] user: stephan branch: trunk, size: 52816
14:34
/chat restored accidentally-removed configurable notification sounds. More layout tweaks on chat buttons. file: [cd5aeda447] check-in: [cf81ddf97a] user: stephan branch: trunk, size: 52929
14:24
/chat: close config/preview area if user sends a message, to help avoid confusion and a corner-case layout bug. Minor layout tweaking of the single-line edit mode via collaborative /chat effort. file: [8cbb9d7049] check-in: [03f33cd3c2] user: stephan branch: trunk, size: 52322
13:34
/chat links now open in a new tab by default. Reduced min-width of input field to help out FF on Android. file: [0454fa946a] check-in: [cea66528e2] user: stephan branch: trunk, size: 52301
13:00
Prettified chat buttons via collaborative chat session dogfooding. file: [0e18877a6f] check-in: [607854c90f] user: stephan branch: chat-markdown, size: 52154
11:20
Initial go at a preview mode for /chat. Still some UI/UX decisions to be made. file: [f3bc0d3aa1] check-in: [f33eefe2bb] user: stephan branch: chat-markdown, size: 52077
04:09
/chat: add a button to the user/timestamp popup to toggle between parsed and plain-text rendering for that message, per /chat request. file: [3ee643b20c] check-in: [9a17e76ebf] user: stephan branch: chat-markdown, size: 50595
2021-09-20
11:28
/chat: add pikchr click handlers to incoming messages. file: [8a7c049c9d] check-in: [326eccf245] user: stephan branch: chat-markdown, size: 48457
2021-09-18
03:26
/chat: Corrected storage of selected audio URI to account for multiple sounds. Updated change log and chat.md. file: [22caaecb22] check-in: [c23aa77411] user: stephan branch: chat-config-options, size: 48336
2021-09-17
23:24
Removed dev-mode-only automatic toggle of config area. file: [37b4e64fc4] check-in: [563ce12aca] user: stephan branch: chat-config-options, size: 48324
23:21
Replace /chat config popup with a friendlier and more flexible widget. Reintroduces ability to select from multiple alerts. Seems to work but needs more testing. [forum:d97c869900 | Forum post d97c869900]. file: [0c615e3b10] check-in: [6f5e04b340] user: stephan branch: chat-config-options, size: 48375
2021-08-27
05:57
/chat: when submitting a message, trim trailing whitespace from all input lines in order to keep pasted-in text from consoles, especially wide ones, from forcing horizontal scrollbars on all clients to due long runs of blanks at the end of each line. Sidebar: this is incompatible with markdown-formatted text which makes use of lines ending with whitespace for continuation of multi-paragraph list entries. file: [247e10e06c] check-in: [afaffb66df] user: stephan branch: trunk, size: 49743
2021-06-15
03:00
Merged in trunk for SSL improvements and deployment to test server. file: [755f600684] check-in: [422323618e] user: stephan branch: chat-user-last-seen, size: 51308
02:29
/chat: in the popup which is triggered by tapping a user's name add a link to the /timeline filtered on that user, per suggestion by Sean in the forum. file: [1fb9f7cd1b] check-in: [b71be5ef36] user: stephan branch: trunk, size: 49111
2021-06-14
13:48
/chat: experimentally render a list of users ordered by most recent activity. Until/unless we can find a useful function for the list, though, it's really just a somewhat pretty screen space hog. file: [99d65b2e86] check-in: [c7ee6f4ef1] user: stephan branch: chat-user-last-seen, size: 50764
10:52
/chat now experimentally keeps track of the timestamp of the most recent message received from each user so that we can eventually integrate that information into the UI to provide a list of currently-active users (noting that we have no way of tracking the existence of lurkers). file: [b7730b4e2f] check-in: [be07b8d137] user: stephan branch: chat-user-last-seen, size: 49756
09:41
Squelch /chat poll timeout errors in the dev console unless an internal debugging flag is enabled. They're an expected error case and generate lots of console log entries. file: [152a05c697] check-in: [1eddedeaec] user: stephan branch: trunk, size: 48567
2021-04-09
07:17
/chat internal doc correction and cleanup. No visible changes. file: [b99c00729c] check-in: [243be3ef04] user: stephan branch: trunk, size: 48392
2021-04-07
15:35
chat: make user names stand out more to help differentiate between color-colliding users, per /chat discussion. file: [1e6f093040] check-in: [58e5348b36] user: stephan branch: trunk, size: 48446
15:10
Minor internal JS API doc clarification. file: [403824dc06] check-in: [bcc9a6ea3e] user: stephan branch: trunk, size: 48282
14:46
/chat experiment, per chat discussion: when a given user posts multiple messages in a row, indent the 2nd and subsequent messages. file: [db5cdb0946] check-in: [609bcd32c8] user: stephan branch: chat-indent-messages, size: 49927
2021-03-27
16:04
/chat: removed the unused/unnecessary jump-to-top/bottom buttons. file: [e1a7462101] check-in: [a044fea785] user: stephan branch: trunk, size: 48299
2021-03-21
18:51
Cleaned up the is-first-call handling of the /chat message poller. file: [e811ac4443] check-in: [147ff84e21] user: stephan branch: chat-fetch-port, size: 49328
18:25
Ported /chat from window.fetch to fossil.fetch, as FF versions as recently as 2017 fail with window.fetch. Needs more testing before merge but seems to work. file: [6206625643] check-in: [c973643209] user: stephan branch: chat-fetch-port, size: 49275
2021-02-07
09:56
/chat: added client-local day-of-week to the message time strings. Y-M-D seems awful noisy, per chat room consensus, but we also have code for that if we decide otherwise. A couple code-adjacent internal cleanups. file: [beb5bf45ac] check-in: [65be323110] user: stephan branch: trunk, size: 48903
2021-01-08
06:22
Updated chat alert sounds from @sdr, lengthened to the point that FF can play them except that it's still being weird with bflat3.wav. Minor doc fixes. file: [dec74b0802] check-in: [c4179f454b] user: stephan branch: trunk, size: 48193
2021-01-07
17:42
chat: Emit the audiable alert sound even for your own messages. This is an interim measure to help us debug intermittent sound problems on some platforms. This change will probably be backed out at some point in the future. file: [2370741a7f] check-in: [85b139c3ab] user: drh branch: trunk, size: 48181
2021-01-06
13:00
chat: home/end navigation buttons now unconditionally start toggled off, as they're rarely useful. file: [99c1f82dde] check-in: [b19081f3a3] user: stephan branch: trunk, size: 48177
05:40
chat: reconnected the audible-alert persistent toggle to the new way of storing the sound file config. file: [f4684ebcda] check-in: [2f0bf9dabd] user: stephan branch: trunk, size: 48211
2021-01-05
20:07
Improvements to the way that the chat alert sound is configured. Remove the /chat-alert webpage. Access the sound files directly using /builtin. file: [82d7256cb3] check-in: [21a870d02d] user: drh branch: trunk, size: 48122
19:05
Provide for two different chat-alert sounds in the /Admin/Chat configuration menu. file: [f27aedd2a8] check-in: [d8e6994350] user: drh branch: trunk, size: 48109
12:49
chat: switched back to binary notification sound on/off, without sound file selection, per chatroom discussion. The the file selection bits are simply if'd out. Removed alerts/g-minor-triad.wav per request. file: [a0c321a939] check-in: [1469c150c4] user: stephan branch: trunk, size: 48102
06:40
chat: fixed the 'may user delete this message?' check, which was comparing an incorrect property. Corrected response handling for remote deletion, broken by API changes made since it was implemented. file: [3c9dfc3aab] check-in: [0fffa63bbd] user: stephan branch: trunk, size: 47251
05:40
Removed an unnecessary level of if(...). file: [9f6fb269ed] check-in: [2d329da189] user: stephan branch: trunk, size: 47142
05:19
Moved chat audio notification files to src/alerts, per chatroom discussion. Chat audio is now configurable using a selection of builtin WAV files and audio files stored in /uv/alert-sounds/*.XYZ (==ogg, wav, mp3). The addition of a selection list means that closing the chat settings popup now requires tapping either a popup entry or the settings button - tapping in the page body won't do it because that handling collides with the selection list event handling. file: [0384ac972b] check-in: [4c34053c58] user: stephan branch: trunk, size: 47185
2021-01-04
14:15
chat: the 'New message...' toast now includes a button which scrolls to the bottom of the message area. file: [f3a6aa1d39] check-in: [e85b679d99] user: stephan branch: trunk, size: 45499
14:04
chat: trim() leading/trailing spaces from message text before trying to send them. file: [78a543c1ca] check-in: [b1d44f9ea7] user: stephan branch: trunk, size: 45333
03:26
Minor cleanups in the chat-internal settings API and menu. file: [460354ea40] check-in: [def06dc645] user: stephan branch: trunk, size: 45326
2021-01-03
16:40
Use the "plunk" sound for audiable alert in chat. Back out the "ping" processing logic. file: [cfea3ec31f] check-in: [f2fcdbc505] user: drh branch: trunk, size: 45236
12:41
chat: when enabling audio notification, play the notification sound after a half-second delay. Slimmed down the option menu buttons a bit. file: [63f02eba41] check-in: [729e1fc56d] user: stephan branch: trunk, size: 45576
11:08
chat: added preliminary audio notification support (may require toggling that capability on for a given server in the browser). Center-aligned chat error messages and removed the 'fossil' user name from them, for compatibility with upcoming timeline-style notifications. Added wav files to the binary-glob versioned setting. file: [7325607c3d] check-in: [99caeec643] user: stephan branch: trunk, size: 45491
2021-01-02
19:06
Improved chat.js error reporting a bit. Connection errors for send and history-fetch ops are now reported as error-style messags in the chat feed. file: [32db0175d8] check-in: [a08dfbabbd] user: stephan branch: trunk, size: 43959
2020-12-30
05:15
chat: multi-line mode and chat-only-mode toggles are now locally persistent. file: [69a71e600f] check-in: [e293584683] user: stephan branch: trunk, size: 41867
2020-12-29
04:18
chat: send and poll can now report if the session is logged out, and client-side poll stops looping if that condition is detected. Both cases emit a message in the message area, from user 'fossil', with the CSS class 'error' and a link to the login page with a redirect back to the chat page. file: [318d52ec41] check-in: [3c0c8954c7] user: stephan branch: trunk, size: 40974
00:37
Replaced use of a deprecated DOM API. file: [01ecd38545] check-in: [b06442a621] user: stephan branch: trunk, size: 39910
2020-12-28
09:46
Chat: fixed +1 being added to Date.getDate() call (copy/paste error). file: [dcac6398b0] check-in: [5fab875d32] user: stephan branch: trunk, size: 39886
08:59
chat: when loading older messages, return scroll point to the position it was at when load was started, per chat room request. file: [7dde4ef22a] check-in: [49cc6f28e8] user: stephan branch: trunk, size: 39888
08:54
chat: replaced the (approximate) messages-since-hidden count in the page title (i.e. browser tab label) to an asterisk so that users don't feel compelled to verify that number against what they actually see in the list (which differs at times). file: [d019494516] check-in: [0a5fd03e5c] user: stephan branch: trunk, size: 39634
02:55
chat: removed some dead code. If URL parameter ping=### is seen, assuming we're running from the 'chat' CLI command and automatically start up in chat-only mode. file: [15765d99b9] check-in: [b111d1ca74] user: stephan branch: trunk, size: 39675
00:23
chat: corrected the scroll position tracking when toggling single/multi-line mode to work from arbitrary points within the scroll area. file: [33c2375374] check-in: [0f59fba08a] user: stephan branch: trunk, size: 40334
2020-12-27
22:01
chat: when toggling between single/multi-line mode, retain the message area scroll position, insofar as its size allows for (e.g. might not work if the history is too short to scroll). file: [4ef8f59791] check-in: [423ee8101a] user: stephan branch: trunk, size: 40304
21:22
Refactored the calc-elem-effective-height routine into the fossil.dom API for reuse elsewhere. Fixed (arguably) a minor layout quirk in the chat input field in multi-line mode. file: [9e80ea5d27] check-in: [299fd6905f] user: stephan branch: trunk, size: 40144
20:33
chat: reworked the auto-resize algorithm to account for elements which "incorrectly" report a height of 0. Experimentally removed the 2em bottom gap at the end of the message reportedly required by Safari. file: [5c6f2d5e30] check-in: [cdc6dec7c7] user: stephan branch: trunk, size: 40586
18:56
chat: improved the 'is previous message currently visible' calculation for the 'should we scroll?' heuristic. file: [adb7355a24] check-in: [b3f2eee546] user: stephan branch: trunk, size: 39900
18:29
chat: seem to have eliminated the tiny dead-zone between the label and checkbox in the settings menu. file: [72e881d593] check-in: [dc8f3a3692] user: stephan branch: trunk, size: 39246
17:42
Chat: hide message home/end buttons by default in portrait mode and add a menu toggle for them, and swapped the button positions (seems more natural). Minor tweak to the div.content resize algo to make use of CSS calc(). file: [387e018019] check-in: [deb9963ac6] user: stephan branch: trunk, size: 39298
09:56
Some flicker reduction when batch loading chat messages. Minor chat layout tweaks. file: [38d6da013d] check-in: [5e046b64c7] user: stephan branch: trunk, size: 38573
09:05
chat: ARIA-related attribute changes suggested in the forum. file: [40fe3befca] check-in: [ca7aae80ad] user: stephan branch: trunk, size: 38303
08:32
chat: added buttons to jump to top/bottom of message list. Added a huge margin under the input area because Safari demands it. Improved the div.content auto-resize calculation to get a more precise fit. file: [cd6ab04504] check-in: [2408082760] user: stephan branch: trunk, size: 38306
07:45
chat: auto-scrolling of other peoples' posts into view works based on a heuristic of whether the *previous* post is in view or not (else we assume the user is back in the history), with the notable caveat that posts with inlined images play havok with this, in part because loading of images is async and we race against it. Moved the #debugMsg element out of div.content to keep it from unduly influencing our layout. file: [4a746deb1f] check-in: [6c28d7d6cb] user: stephan branch: trunk, size: 36693
07:03
chat: fixed mis-scroll when toggling chat-only mode. Re-re-introduced the img preview size cap. file: [b8cdb6a693] check-in: [b09f7e990d] user: stephan branch: trunk, size: 33838
06:48
chat: next round of Safari-friendly baby steps, developed in conjunction with Safari user mgagnon via chat session. file: [0699a25cc4] check-in: [a1161fa9bd] user: stephan branch: trunk, size: 33957
04:50
chat: reintegrated partial changes from [b0ab6cbd3] and [670732a6]: remove skin-induced div.content margins in chat-only mode and cap image preview size to avoid screen overflow. Moved #dbgMessage element out of the way at app startup to avoid it potentially influencing our flexbox layout, and include that element in the to-hide list for chat-only mode. Edit: Martin G. reports that this one also causes Grief with Safari, but in different ways that before. file: [5f6f8712aa] check-in: [7c3cf7a189] user: stephan branch: no-joy, size: 33694
04:30
chat: re-integrated JS-based div.content resizer to do approximately what the preferred 'vh' CSS units would, but upon which Safari apparently chokes. Message area now gets a scrollbar. This works reasonably well on FF/Chrome on both Linux and Android. The jury is still out on Safari. Edit: Martin G. confirmed this one also suffers from the "collapsing messages" problem on Safari. file: [e407358365] check-in: [d488f5c66c] user: stephan branch: no-joy, size: 33392
03:39
Eliminated top-down chat mode altogether in an attempt to eliminate some complexity and cruft. Re-added the toast-on-new-invisible-message from [0a00a103]. file: [18944253d8] check-in: [421d657078] user: stephan branch: trunk, size: 32130
01:58
chat: Safari has a severe allergic reaction to CSS vh units, so calculate the size of the affected DOM element in JS code at app startup and when the window resizes. file: [0ba55c2b8e] check-in: [8747d85ea0] user: stephan branch: chat-safari-experiments, size: 34265
01:07
CSS tweaks to attempt to counter some Safari message spacing problems - cannot test locally. Also limit the chat image preview to 40% of the viewport width/height, to avoid it taking up the whole screen for a large image. file: [0a9b355bbc] check-in: [670732a68f] user: stephan branch: chat-safari-experiments, size: 33269
00:32
Force bottom-up chat mode, now that the toggle is removed but it might still be set in some localStorage storage. file: [e0502596fc] check-in: [a6650eb776] user: stephan branch: chat-safari-breaks-here, size: 33222
00:22
Disabled the top-down/bottom-up chat toggle, per chat discussion. Removed explicit setting of div.content margins, in chat,except in chat-only mode, so that we honor skin-level margin settings (resolves layout breakage in Xekri skin). file: [0e7f8d73ba] check-in: [22b0faad3a] user: stephan branch: chat-safari-breaks-here, size: 33101
2020-12-26
23:57
Found what seems to be a more or less viable solution for the chat layout in which the input area is effectively sticky while not actually being so. New messages do not scroll to the start of the list except for when a user locally posts a message, but instead, if a new message arrives and is scrolled out of view, a toast is shown to gently alert the user that a new message has arrived. file: [eac0912f9e] check-in: [0a00a10312] user: stephan branch: chat-safari-breaks-here, size: 33096
22:09
Disabled automatic scrolling when a new chat message arrives, as it is unnecessary when the user input fields are not sticky. To revisit later with sticky input fields. file: [a9a9ad8ea4] check-in: [b75ce86581] user: stephan branch: trunk, size: 34411
20:33
Lowercased 'zulu' per chat discussion. file: [0db1382721] check-in: [c7a017e169] user: stephan branch: trunk, size: 34357
20:33
chat: removed extraneous T from sender-local timestamp. file: [f5ee13c04b] check-in: [16b8e480ec] user: stephan branch: trunk, size: 34357
20:30
Removed invalid Z suffix from the new lmtime string. file: [c9eb52a120] check-in: [7d4a32487f] user: stephan branch: trunk, size: 34340
20:26
Only apply sender-local time if it's in the message (older messages do not have it). file: [c14728717b] check-in: [f2a58f10bf] user: stephan branch: trunk, size: 34392
20:24
Integrated client-local timestamp into chat so that participants can see the local time in their colleagues' time zones. file: [fcc6e50602] check-in: [3c5e2badc8] user: stephan branch: trunk, size: 34369
19:43
Added lmtime (local mtime) parameter to /chat-send calls, per chat discussion. file: [46ed1d101c] check-in: [152ac599e8] user: stephan branch: trunk, size: 33566
18:08
Changed how chat-only mode figures out which elements to hide to account for skins which replace div.content with their own element. file: [c37bc1da12] check-in: [e390b95bbc] user: stephan branch: trunk, size: 33518
17:22
chat: disabled sticky mode of the input area for the time being due to grief in conjunction with message scrolling. When toggling between bottom/top modes, scroll to the input area. file: [4a1c047cc4] check-in: [ba3ebf0de9] user: stephan branch: trunk, size: 33752
17:07
Removed some debug output. When toggling between bottom-up/top-down chat, scroll to the input widget (which flips between the top and the bottom of the page). file: [dc0f5f385f] check-in: [34547542d2] user: stephan branch: trunk, size: 33232
16:21
Disabled a dangling part of the search for a solution for the bottom-scrolling problem. file: [5850b512be] check-in: [7f4000a62c] user: stephan branch: chat-mode-bottom-up, size: 33240
16:20
Disabled position:sticky on the input area when in bottom-up chat mode pending resolution of a scrolling misbehaviour for messages with IMG tags. IMG.src is loaded async, so the scrolling is actually working but loading of the IMG.src is then pushing the message back down behind/under the input field. file: [9cb7cda857] check-in: [8e12b61b50] user: stephan branch: chat-mode-bottom-up, size: 33231
15:40
Implement bottom-up and top-down chat layouts in chat-only mode and normal mode. There is a minor scroll-on-new-message quirk or two to resolve, but it otherwise seems to work. file: [94c8c1ebd1] check-in: [dfc20f4297] user: stephan branch: chat-mode-bottom-up, size: 32111
01:37
Settings menu now closes if a click or ESC happens outside of the menu. file: [f5118d2296] check-in: [1f00036884] user: stephan branch: chat-mode-bottom-up, size: 30348
01:31
Initial go at a "bottom-up" (mobile-like) layout for chat, but it is only active in chat-only mode where we have more control over the layout. The default mode works like before, top-down. There are still minor usability/scrolling issues left to resolve but it seems to essentially work. file: [56832c8ba7] check-in: [cffd66ffe9] user: stephan branch: chat-mode-bottom-up, size: 30399
2020-12-25
22:37
Removed some dead CSS. file: [3603d9df87] check-in: [c9ca5198be] user: stephan branch: chat-widget-rework, size: 29335
22:35
chat: refactored the messages from fieldsets to a custom widget. file: [9b62017706] check-in: [852bda77bd] user: stephan branch: chat-widget-rework, size: 29320
21:36
Reformulate the LEGEND elements to include an embedded anchor tag as an attempt to working around Safari's inability to click a LEGEND element. Edit: this approach didn't work - same effect as before on Safari. file: [4709d51f20] check-in: [73c8ccd3a7] user: stephan branch: chat-safari-ts-popup, size: 29342
20:48
chat: removed now-obsolete error checking for Date() parsing. Edit: moved from trunk and closed - an as-yet-unidentified Date() problem persists on Safari. file: [94dfb1b63e] check-in: [379b4689c8] user: stephan branch: no-joy, size: 28632
20:30
For the chat function, the server-to-client JSON uses strict ISO8601 time strings, including the "T" in the middle and the "Z" at the end. file: [317f36c9f3] check-in: [13c95f0c75] user: drh branch: trunk, size: 29170
19:20
chat: added 'role'='button' attribute to various non-button button-like elements, per forum request. file: [3f1f61815a] check-in: [6506b6de43] user: stephan branch: trunk, size: 29180
17:52
chat: added toggles for single/multi-line input (non-persistent) and monospace message font (persistent - affects message bodies and text input fields). file: [1d1a24492a] check-in: [9d24a28490] user: stephan branch: trunk, size: 29050
16:08
chat internal cleanups in prep for upcoming changes. Possibly fixed the cosmetic bug where the titlebar says '(0) ...' after receiving an empty list of messages in response to an auto-reconnect after a timeout. file: [26d92b5bd6] check-in: [e52d0fd5ce] user: stephan branch: trunk, size: 26855
15:27
Chat settings menu tweaks based on chat session feedback. file: [421d10bcb8] check-in: [9e797bf9bf] user: stephan branch: trunk, size: 26673
14:58
Added chat setting chat-inline-images: specifies whether /chat images default to display inline or as download links. Various code-adjacent tweaks. file: [a65d13d133] check-in: [9d86a4af61] user: stephan branch: trunk, size: 26617
13:00
When chat is in chat-only mode, the input area is now sticky at the top of the window. This required a bit of hackery involving its background color to keep it from being transparent (which causes the chat messages to be visible through it). file: [aecab5f09a] check-in: [429e5a9bde] user: stephan branch: trunk, size: 24686
11:32
chat setting: toggle whether 'my' messages are on the right or left, with the default depending on whether the window is wider than it is tall. file: [57c2090971] check-in: [f1e91a200a] user: stephan branch: trunk, size: 23692
11:06
Moved chat.c inline CSS style to default.css. Various chat layout tweaks. file: [0a4517ec99] check-in: [467dbc8fd7] user: stephan branch: trunk, size: 22351
10:04
Added settings popup to chat. Currently only 1 setting - toggling the page header/footer on/off. file: [81a4039092] check-in: [617e23bea3] user: stephan branch: trunk, size: 22092
09:39
chat.js restructuring/cleanup - no functional changes. file: [04b19e4e5d] check-in: [12682568f0] user: stephan branch: trunk, size: 20366
2020-12-24
22:21
chat poll again uses "quiet" error handling to avoid posting toast error messages when it times out (which it does every 10 minutes or so when idle). file: [511d4cc5fc] check-in: [b6de299bb7] user: stephan branch: trunk, size: 20112
22:07
chat message deletion: admins now have both delete local and delete global options, in case they want to remove something from local view without deleting it for all users. file: [9ddc423789] check-in: [b12d69d9f4] user: stephan branch: trunk, size: 19914
20:18
Initial impl of buttons to load older chat messages. The UI code is a bit more involved than might seem necessary, but is so largely because it needs to avoid UI/ajax race conditions. file: [4a585270b2] check-in: [6d676f6eb5] user: stephan branch: trunk, size: 19594
15:10
The ping=TCPPORT query parameter to /chat causes a call to /chat-ping on localhost and the given port whenever new chat content arrives. Can be used for notifications. file: [7f615e6c24] check-in: [ebdd91b92f] user: drh branch: trunk, size: 13503
13:44
Hyperlink processing for chat messages is now handled on the server side, where we have knowledge of interwiki links, wiki page names, and valid artifact hashes. file: [dacc39e008] check-in: [822653c269] user: drh branch: trunk, size: 13375
08:10
chat: revert title to its originalv alue when the tab becomes active after having been inactive. file: [a5c394355b] check-in: [0c0be4b763] user: stephan branch: trunk, size: 15794
08:07
Chat: if the current tab is not active when a message arrives, update the title to show the new message count. When the tab is active, revert the title. Note that deletions currently count towards new events, but that's arguable. file: [09647e3ec6] check-in: [d79592059a] user: stephan branch: trunk, size: 15588
07:19
chat: ported in the hyperlink and @username parser from the older chat.tcl script. This is an intermediary workaround until we decide how/whether to do server-side markup handling. file: [c755b36423] check-in: [c5095283fb] user: stephan branch: trunk, size: 15280
06:18
Removed some debug output. file: [ba67e2bf25] check-in: [f315268e2c] user: stephan branch: trunk, size: 12401
05:58
Added UI to delete chat posts (tap on the message header). Made a change to the semantics of when fossil.PopupWidget's refresh() callback is triggered to account for the common case of having to show() the popup twice in a row without a hide() in between. file: [04edcb6a93] check-in: [b7f106da8a] user: stephan branch: trunk, size: 12450
05:03
Initial impl for chat message deletion. The ajax bits are in place and message deletion propagates to other connected clients (if the message is owned by the poster or the user is an admin) but there's not currently a user interface. TODO: add related controls to the same popup used for the message timestamps. file: [90a673aedd] check-in: [247276113c] user: stephan branch: trunk, size: 10728
2020-12-23
23:27
Several internal cleanups in chat app, e.g. replace document.createXYZ with simpler fossil.dom API. Eliminate assignment to innerHTML, which is widely considered unsafe. file: [67a5ae8bad] check-in: [68da24594f] user: stephan branch: trunk, size: 9233
22:58
chat: minor UI refinements. file: [77da11f25b] check-in: [8eb01c314b] user: stephan branch: trunk, size: 8998
22:16
Chat: disable pasting of text when then input field does NOT have focus and fix complete overwriting of input field when pasting and it DOES have focus. Whether or not we should paste to that field when it does not have focus is debatable and possibly violates the Principle of Least Surprise. file: [5bf74fb99d] check-in: [87ff8fe357] user: stephan branch: trunk, size: 8943
20:58
Add the /Admin/Chat page. Add settings to configure the initial history load size of /chat, and to configure purging of historical messages. file: [ecb6a9ba24] check-in: [15bc20f29d] user: drh branch: trunk, size: 8504
16:11
The althttpd webserver blocks the "/-50" part of the URL. So it has to be a query parameter. file: [1ce6d0dc6e] check-in: [3d6267edad] user: drh branch: chatroom-dev, size: 8434
16:08
Upon initial connect to the chatroom, only load the most recent 50 messages. This magic number "50" ought to be configurable, but is hard-coded for the moment. We also need a way for the user to request more history. file: [079be865c4] check-in: [c017a7b4d0] user: drh branch: chatroom-dev, size: 8429
15:18
chat: when pasting an image and a file is already selected, make sure to clear out that selected file state to avoid conflicting data. file: [6d41153473] check-in: [63ec4a5bcd] user: stephan branch: chatroom-dev, size: 8427
15:12
chat: improved visual notification of drag/drop into the file input selector. file: [fb352abbea] check-in: [d521007602] user: stephan branch: chatroom-dev, size: 8371
15:00
chat: reworked the drag/drop bits to take advantage of Firefox and Chrome already supporting drag/drop onto a file input element. file: [3b9f155941] check-in: [7e48953c16] user: stephan branch: chatroom-dev, size: 7691
14:21
Made chat drop zone smaller by replacing its text with a helplet button. Added 'chat' table to the list of those NOT nuked by rebuild. file: [da48eb7f30] check-in: [85939ffcbe] user: stephan branch: chatroom-dev, size: 8905
13:51
Only right-align the self-posts if the outerWidth of the browser is less than 1000. Simplify the CSS by removing unused rules. file: [e2e51e1438] check-in: [f3c8e83858] user: drh branch: chatroom-dev, size: 8615
10:41
Added a Cancel button to the drag/drop file/image field to clear the pending blob. Still need to hook it up to interact with the file input field, but that will have to wait a bit. file: [1f9328c447] check-in: [018084c50e] user: stephan branch: chatroom-dev, size: 8731
10:23
chat: added drag/drop support for files. Images get previewed like those pasted from the clipboard. file: [e58f10d29a] check-in: [4c0146f180] user: stephan branch: chatroom-dev, size: 8571
08:43
Removed some dead code. Updated some docs. file: [086c72a8e6] check-in: [cf789fa7e1] user: stephan branch: chatroom-dev, size: 6827
08:33
Chat clipboard paste: pasted text, regardless of event target, now goes to the input field and pasted images, regardless of the event target, now go into the image-submit slot. file: [8add7ade13] check-in: [02fa19aa99] user: stephan branch: chatroom-dev, size: 6766
07:59
Rescoped the chat timestamp popup widget into a deeper scope (less visible/leaky). Moved the duplicated click-somewhere-to-close-popup handlers into PopupWidget.installClickToHide() method. file: [5e4b96b36c] check-in: [6bccbc20ea] user: stephan branch: chatroom-dev, size: 6476
07:45
Simplified some JSON quoting in chat.c. Bypass the paste-from-clipboard handling if the paste target is the input text field, to avoid a console-level error when the text cannot be parsed as an image. TODO: figure out how to handle the paste-image case properly when the event target is the text input field. file: [bf7795162b] check-in: [2fe8d7c4b1] user: stephan branch: chatroom-dev, size: 6595
07:12
Seem to have resolved the broken download names for chat-posted files. file: [d09b114c49] check-in: [b604154c38] user: stephan branch: chatroom-dev, size: 6521
07:09
Implemented paste image into chat from clipboard. Fixed posted file download link but the files download with the same name as their message ID, which isn't very friendly. Not sure how to resolve that bit. file: [c7dca4e6cd] check-in: [eb7845f339] user: stephan branch: chatroom-dev, size: 6396
06:26
Chat message precise timestamps are now shown via a tap/click popup, rather than hoverhelp, for mobile compatibility. file: [11b43d1359] check-in: [0101325f9d] user: stephan branch: chatroom-dev, size: 5386
05:44
Import fossil bootstrapping JS into the chat app, add current login name to window.fossil.user.name, and use that name as the initial 'me' value in chat.js (resolves the FIXME in that latter part). file: [d81f52a05e] check-in: [4e832e9f40] user: stephan branch: chatroom-dev, size: 3981
05:28
Disable the detailed timestamp popup when browser doesn't support it. (example: Safari) file: [ee805c4c5b] check-in: [5744428bfa] user: mgagnon branch: chatroom-dev, size: 3972
04:19
Added complete timestamps (local and GMT) as title attribute of message headers. file: [a332d93a79] check-in: [696135b65e] user: stephan branch: chatroom-dev, size: 3958
04:06
Attempt to fix the "NaN" date problem in chat. file: [ae37ed62d2] check-in: [aefa8e5d1f] user: drh branch: chatroom-dev, size: 3213
03:52
Experimentally removed the left/right split of me/everyone else messages, per chatroom discussion. Added a min-width to messages to keep the user name from being longer than short messages (unless the user name is really long). Update: The experiment didn't work out. Moved to a branch. file: [5995a32c4e] check-in: [7e6d2f0a11] user: stephan branch: no-joy, size: 3201
02:58
Show only the HH:MM part of the date for each chat message. file: [48e62afad7] check-in: [bc65900dae] user: drh branch: chatroom-dev, size: 2960
02:24
Chat message background color determined by username. file: [efb806d038] check-in: [adb93ca980] user: drh branch: chatroom-dev, size: 3397
01:33
Basic chat functionality seems to be on-line again. file: [9781d6bda4] check-in: [441ee6af06] user: drh branch: chatroom-dev, size: 3311
00:58
Get the /chat-send and /chat-poll interfaces working. file: [9c44895c32] check-in: [25828eb581] user: drh branch: chatroom-dev, size: 3260
2020-12-22
20:11
Added: Begin trying to integrate the chatroom prototype into the Fossil core. New code is in src/chat.c and src/chat.js. Add the new "C" capability to enable access to chat. The new code compiles but is not yet functional. (This is an incremental check-in.) The original tools/chat.tcl Wapp script is still available for reference. file: [cd3be36997] check-in: [217b0d2548] user: drh branch: chatroom-dev, size: 6447