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-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: [d38a4571] check-in: [2827a38a] user: stephan branch: trunk, size: 112069)
00:07
Maintainability cleanups and docs in /chat. No (intended) functional changes. ... (file: [55fadbaa] check-in: [084001c7] 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: [3ccf6d47] check-in: [da1c351b] 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: [29ee3a7a] check-in: [1bfb06c7] 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: [7d795424] check-in: [e8bbaf92] 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: [d7c48303] check-in: [160d2692] 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: [c2ae9731] check-in: [e3eb8399] 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: [2a9e70fc] check-in: [8c64fa26] 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: [40bbcb7d] check-in: [5fc2f2a0] user: stephan branch: trunk, size: 107391)
14:24
Remove comments calling for a now-resolved TODO. No code changes. ... (file: [c4848b35] check-in: [a5521984] 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: [e2203bae] check-in: [79932a52] user: stephan branch: chat-backoff-timer2, size: 107612)
06:12
Improve an error message. ... (file: [686b0616] check-in: [1f97db77] 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: [85ab1ef9] check-in: [040a7d45] user: stephan branch: chat-backoff-timer2, size: 106189)
06:02
Restore the production-mode (not dev-mode) long-pole timeout. ... (file: [d1b2485a] check-in: [8da12695] 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: [6adf6d54] check-in: [9516f7cd] 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: [016dbade] check-in: [f75fb1dd] 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: [d500cb30] check-in: [d3baf9d5] 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: [c4b14f5d] check-in: [fd36f849] 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: [fda30be8] check-in: [2debc54e] user: stephan branch: chat-backoff-timer, size: 102893)
2024-11-05
10:00
(Grammar) Missing terminating period, one is present in preceding phrase. ... (file: [79429e7e] check-in: [669633dd] user: brickviking branch: bv-corrections01, size: 98514)
2024-08-09
10:32
Doc touchups in /chat. No code changes. ... (file: [3cefe611] check-in: [71414273] 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: [e7ab13dd] check-in: [ec6fbe98] 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: [151f9f84] check-in: [2a3a32ed] 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: [89d09111] check-in: [347084af] 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: [8f8e5f6a] check-in: [5e26fd4c] user: stephan branch: markdown-tagrefs, size: 105002)
09:16
Merge trunk into markdown-tagrefs branch. ... (file: [0a2e3127] check-in: [9d3ca32e] 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: [edd2e93f] check-in: [4711a8c4] 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: [be29dcfa] check-in: [5ae93fd2] user: stephan branch: fts5-chat-search, size: 97460)
10:33
Add chat search for message by ID using search term #NNNN. ... (file: [ae28f3ca] check-in: [34493500] 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: [34b589ce] check-in: [3c53bd32] user: stephan branch: fts5-chat-search, size: 97176)
2024-07-01
18:40
Clean up some harmless stray tokens. ... (file: [27c9b830] check-in: [417bb150] 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: [c3215ba9] check-in: [2e8f1a9a] user: stephan branch: fts5-chat-search, size: 96987)
08:54
Add clear-search option to chat search and code-adjacent cleanups. ... (file: [d3638c26] check-in: [be01315c] 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: [828639a5] check-in: [e1f6c7f5] user: stephan branch: fts5-chat-search, size: 94937)
2024-06-30
15:44
Add context-loading buttons to /chat search. ... (file: [e268ebb5] check-in: [884214d0] 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: [2783b4e7] check-in: [7561498c] 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: [b8f8118d] check-in: [7f745aa6] user: stephan branch: fts5-chat-search, size: 88794)
13:06
Main UI of chat history search for /chat, without the actual search functionality. ... (file: [8cfee24b] check-in: [80b869ac] 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: [b1aa83a1] check-in: [df86fa33] 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: [353b598a] check-in: [133e6e59] user: stephan branch: trunk, size: 86494)
2024-03-05
12:53
Merge trunk into markdown-tagrefs branch. ... (file: [9e92229f] check-in: [0517bd2d] 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: [468a8092] check-in: [e4aca28d] 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: [82e63f6d] check-in: [1cf4a7d7] user: wyoung branch: trunk, size: 86359)
10:27
Grammar fix in "Left-align my posts" /chat setting hint ... (file: [f8dc6630] check-in: [aca0be16] 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: [b9483cc8] check-in: [4dc87985] 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 post dbd5b68366147ce8. ... (file: [c6943468] check-in: [4bb5515c] 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 post ed4a762b3a557898. Some code-adjacent end-of-line whitespace cleanups. ... (file: [81f6e03d] check-in: [0c6e669a] 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: [ece252cd] check-in: [895ecf9e] user: stephan branch: shift-enter-preview, size: 86477)
2023-01-21
12:14
Merge trunk into markdown-tagrefs branch. ... (file: [9fa22140] check-in: [baf038b1] user: stephan branch: markdown-tagrefs, size: 92538)
2022-11-29
21:08
Remove JS console debug output added by the previous checkin. ... (file: [44287811] check-in: [2755b31a] 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: [3df62dc8] check-in: [fd5298f0] user: stephan branch: trunk, size: 85910)
2022-11-16
20:05
Fix harmless typos reported by forum post 15f7327318. ... (file: [d0a74b58] check-in: [f3adbd88] 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: [0ecc928c] check-in: [d208efdd] 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: [0fea9f8a] check-in: [1f231db3] user: ericwikman branch: wcag-2.1, size: 84408)
2022-06-11
12:34
Merged in trunk. ... (file: [43c12368] check-in: [fd14e7ec] 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: [6173560b] check-in: [f98a4f5c] 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: [40a78d2c] check-in: [cd7f2ddc] user: stephan branch: trunk, size: 82899)
2022-01-15
10:09
Merged in trunk. ... (file: [88d5b707] check-in: [d11cbb63] 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: [ee39a5cb] check-in: [0423fb8d] 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: [3c44c060] check-in: [cead9178] user: stephan branch: trunk, size: 81629)
2021-12-31
02:59
Merged in trunk. ... (file: [73c448ce] check-in: [c800d2ca] 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: [b2f257d0] check-in: [d4b167bd] user: stephan branch: chat-attachment-iframe, size: 81430)
18:26
/chat: shorted 'Toggle Embedded' label to 'Embed'. ... (file: [22252ea2] check-in: [490c7b43] user: stephan branch: chat-attachment-iframe, size: 80760)
18:02
/chat: added txt to the list of iframe-embeddable extensions. ... (file: [344e3324] check-in: [1721d308] 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: [7e71e6a2] check-in: [956515f6] 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: [59ab9d2c] check-in: [76789222] 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: [d3881878] check-in: [d9e3ed5e] 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: [3559e640] check-in: [86bba486] user: stephan branch: trunk, size: 78972)
2021-12-16
04:20
Merged in trunk and resolved numerous code clashes in /chat. ... (file: [ad962bf7] check-in: [54dba747] 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: [7c3659c3] check-in: [9d693ef8] 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: [aefafea6] check-in: [67e85998] 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 post 7807e0dbcca1dc45. ... (file: [20484296] check-in: [df0e2ca1] user: stephan branch: trunk, size: 76521)
06:31
More /chat config cosmetics. Started 2.18 change notes. ... (file: [411a26f7] check-in: [891d79de] 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: [5d1aabe3] check-in: [5d7c98ef] user: stephan branch: chat-input-revisited, size: 75886)
04:13
/chat input field rework, as discussed in forum post 9e85f44f864eb1f5. Part 1: revert to plain text input fields, with compact-mode toggle swapping between them. ... (file: [e91dafba] check-in: [136d95b6] 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: [c3c225ef] check-in: [e3e62a0d] 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: [d165cbaf] check-in: [85a99733] 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: [17661bbc] check-in: [50339579] 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: [361240ea] check-in: [3cd13cb6] user: stephan branch: trunk, size: 71585)
02:38
Merge in trunk for test server deployment. ... (file: [2cbfe6e9] check-in: [664b04b2] 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: [2e91cf95] check-in: [498bc071] user: stephan branch: trunk, size: 71584)
2021-10-05
18:44
Merged in trunk for latest /chat features. ... (file: [69955912] check-in: [49689e1c] 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: [5285c2da] check-in: [fe0bcfaa] 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: [c9cda04a] check-in: [84d4a0e8] user: stephan branch: trunk, size: 70514)
2021-10-04
19:48
Merged in trunk for latest (and conflicting) /chat changes. ... (file: [e532ab3e] check-in: [7cae4c09] 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: [f9f74d3d] check-in: [98b2cbe6] 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: [5ba8c508] check-in: [b8a20e20] 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: [0df7404d] check-in: [8534eb75] 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: [53cae740] check-in: [87c29eee] 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: [f960c0f0] check-in: [b2d55ec9] 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: [de9ef905] check-in: [2b07b66d] 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: [14f579f4] check-in: [40cdaeec] 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: [9dce4208] check-in: [f9e2851a] 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: [706fd16e] check-in: [d96f6f19] 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: [0b4e9c0c] check-in: [607b11dd] 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: [db5ae416] check-in: [87b0b12d] 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: [1d350b7c] check-in: [7d6c0749] 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: [fe4a87f4] check-in: [86d6be3f] 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: [9bca7ab4] check-in: [ab9fef75] 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: [5a35677a] check-in: [cbc7f117] user: stephan branch: chat-input-rework, size: 67116)
03:21
Provide a toast notification when ctrl-enter mode is toggled via keypress. ... (file: [7b31f717] check-in: [c4484625] 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: [ddbaf611] check-in: [a83defad] user: stephan branch: chat-input-rework, size: 66155)
2021-09-29
22:30
Added mini-help hint text to /chat config view entries. ... (file: [8f6c6779] check-in: [3259251a] 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: [12315f93] check-in: [b9c5792e] 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: [524f18a7] check-in: [79995e13] user: stephan branch: trunk, size: 63567)
16:50
Merged in trunk for latest changes. ... (file: [a6c92c44] check-in: [09f86815] 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: [7654818a] check-in: [13fabf3f] 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: [87a03d35] check-in: [9df3fc6b] user: stephan branch: markdown-tagrefs, size: 69865)
11:06
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: [609bc337] check-in: [99b23d0f] user: stephan branch: markdown-tagrefs, size: 69399)
09:45
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: [42a3a086] check-in: [3ec8c6c0] 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: [0bf2f128] check-in: [4539bf87] 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: [c5a2a2e4] check-in: [b59a761b] 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: [e524dedd] check-in: [93bf2505] user: stephan branch: markdown-tagrefs, size: 66988)
2021-09-24
17:11
Removed an accidental extraneous animation on every chat message sent. ... (file: [df7bc9ff] check-in: [0fe5b6cb] user: stephan branch: chat-user-filter, size: 62955)
17:01
Several minor cleanups, fixes, and presentation tweaks. ... (file: [cb8f9a18] check-in: [10107e4f] 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: [d2734233] check-in: [4ff16c05] 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: [44f73f33] check-in: [3d4101d3] user: stephan branch: chat-user-filter, size: 61577)
09:42
Doc typos and sped up the message-in-context animation a tick. ... (file: [7502158c] check-in: [2b3a6ed8] 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: [c768d874] check-in: [fc27d6a3] 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: [21e397b2] check-in: [5aac6ae0] user: stephan branch: chat-user-filter, size: 60612)
2021-09-23
20:11
Insignificant typos. ... (file: [0466d597] check-in: [a4b9af1b] 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: [4e5e0c02] check-in: [06196b19] user: stephan branch: chat-user-filter, size: 59078)
13:26
Added a help buttonlet to the user activity list. ... (file: [abea31b6] check-in: [f39c8326] 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: [f2b709bd] check-in: [7c2f3eb3] user: stephan branch: chat-user-filter, size: 58794)
12:23
Corrected persistence of the timestamps toggle. Removed about 40 lines of dead CSS. ... (file: [09b1d024] check-in: [dddd42ba] user: stephan branch: chat-user-filter, size: 58640)
12:00
Added toggle for the recent activity timestamps. ... (file: [d01f8b63] check-in: [9938acb0] user: stephan branch: chat-user-filter, size: 58507)
11:44
UI refinement of the chat user activity list. ... (file: [ae8d165a] check-in: [7aea432a] 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: [29958a35] check-in: [dafd5497] user: stephan branch: chat-user-filter, size: 56828)
03:46
/chat: give the input field focus when chat starts up. ... (file: [37014953] check-in: [c3362100] 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: [a41f1b76] check-in: [2d385d94] 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: [7d93a262] check-in: [62deb8f7] 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: [e673517b] check-in: [593d3a3a] 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: [ce6efe75] check-in: [60206ef5] 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: [20f7b4e8] check-in: [3524f72e] user: stephan branch: trunk, size: 52936)
16:28
Removed some extraneous console debug output. ... (file: [0fb6e0b6] check-in: [8663dde1] 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: [698b3878] check-in: [fb9026e2] 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: [a6185353] check-in: [60ed1ff9] user: stephan branch: trunk, size: 52816)
14:34
/chat restored accidentally-removed configurable notification sounds. More layout tweaks on chat buttons. ... (file: [cd5aeda4] check-in: [cf81ddf9] 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: [8cbb9d70] check-in: [03f33cd3] 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: [0454fa94] check-in: [cea66528] user: stephan branch: trunk, size: 52301)
13:00
Prettified chat buttons via collaborative chat session dogfooding. ... (file: [0e18877a] check-in: [607854c9] 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: [f3bc0d3a] check-in: [f33eefe2] 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: [3ee643b2] check-in: [9a17e76e] user: stephan branch: chat-markdown, size: 50595)
2021-09-20
11:28
/chat: add pikchr click handlers to incoming messages. ... (file: [8a7c049c] check-in: [326eccf2] 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: [22caaecb] check-in: [c23aa774] user: stephan branch: chat-config-options, size: 48336)
2021-09-17
23:24
Removed dev-mode-only automatic toggle of config area. ... (file: [37b4e64f] check-in: [563ce12a] 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 post d97c869900. ... (file: [0c615e3b] check-in: [6f5e04b3] 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: [247e10e0] check-in: [afaffb66] user: stephan branch: trunk, size: 49743)
2021-06-15
03:00
Merged in trunk for SSL improvements and deployment to test server. ... (file: [755f6006] check-in: [42232361] 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: [1fb9f7cd] check-in: [b71be5ef] 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: [99d65b2e] check-in: [c7ee6f4e] 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: [b7730b4e] check-in: [be07b8d1] 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: [152a05c6] check-in: [1eddedea] user: stephan branch: trunk, size: 48567)
2021-04-09
07:17
/chat internal doc correction and cleanup. No visible changes. ... (file: [b99c0072] check-in: [243be3ef] 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: [1e6f0930] check-in: [58e5348b] user: stephan branch: trunk, size: 48446)
15:10
Minor internal JS API doc clarification. ... (file: [403824dc] check-in: [bcc9a6ea] 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: [db5cdb09] check-in: [609bcd32] user: stephan branch: chat-indent-messages, size: 49927)
2021-03-27
16:04
/chat: removed the unused/unnecessary jump-to-top/bottom buttons. ... (file: [e1a74621] check-in: [a044fea7] user: stephan branch: trunk, size: 48299)
2021-03-21
18:51
Cleaned up the is-first-call handling of the /chat message poller. ... (file: [e811ac44] check-in: [147ff84e] 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: [62066256] check-in: [c9736432] 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: [beb5bf45] check-in: [65be3231] 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: [dec74b08] check-in: [c4179f45] 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: [2370741a] check-in: [85b139c3] 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: [99c1f82d] check-in: [b19081f3] 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: [f4684ebc] check-in: [2f0bf9da] 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: [82d7256c] check-in: [21a870d0] user: drh branch: trunk, size: 48122)
19:05
Provide for two different chat-alert sounds in the /Admin/Chat configuration menu. ... (file: [f27aedd2] check-in: [d8e69943] 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: [a0c321a9] check-in: [1469c150] 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: [3c9dfc3a] check-in: [0fffa63b] user: stephan branch: trunk, size: 47251)
05:40
Removed an unnecessary level of if(...). ... (file: [9f6fb269] check-in: [2d329da1] 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: [0384ac97] check-in: [4c34053c] 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: [f3a6aa1d] check-in: [e85b679d] user: stephan branch: trunk, size: 45499)
14:04
chat: trim() leading/trailing spaces from message text before trying to send them. ... (file: [78a543c1] check-in: [b1d44f9e] user: stephan branch: trunk, size: 45333)
03:26
Minor cleanups in the chat-internal settings API and menu. ... (file: [460354ea] check-in: [def06dc6] 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: [cfea3ec3] check-in: [f2fcdbc5] 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: [63f02eba] check-in: [729e1fc5] 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: [7325607c] check-in: [99caeec6] 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: [32db0175] check-in: [a08dfbab] 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: [69a71e60] check-in: [e2935846] 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: [318d52ec] check-in: [3c0c8954] user: stephan branch: trunk, size: 40974)
00:37
Replaced use of a deprecated DOM API. ... (file: [01ecd385] check-in: [b06442a6] user: stephan branch: trunk, size: 39910)
2020-12-28
09:46
Chat: fixed +1 being added to Date.getDate() call (copy/paste error). ... (file: [dcac6398] check-in: [5fab875d] 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: [7dde4ef2] check-in: [49cc6f28] 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: [d0194945] check-in: [0a5fd03e] 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: [15765d99] check-in: [b111d1ca] 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: [33c23753] check-in: [0f59fba0] 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: [4ef8f597] check-in: [423ee810] 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: [9e80ea5d] check-in: [299fd690] 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: [5c6f2d5e] check-in: [cdc6dec7] user: stephan branch: trunk, size: 40586)
18:56
chat: improved the 'is previous message currently visible' calculation for the 'should we scroll?' heuristic. ... (file: [adb7355a] check-in: [b3f2eee5] 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: [72e881d5] check-in: [dc8f3a36] 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: [387e0180] check-in: [deb9963a] user: stephan branch: trunk, size: 39298)
09:56
Some flicker reduction when batch loading chat messages. Minor chat layout tweaks. ... (file: [38d6da01] check-in: [5e046b64] user: stephan branch: trunk, size: 38573)
09:05
chat: ARIA-related attribute changes suggested in the forum. ... (file: [40fe3bef] check-in: [ca7aae80] 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: [cd6ab045] check-in: [24080827] 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: [4a746deb] check-in: [6c28d7d6] 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: [b8cdb6a6] check-in: [b09f7e99] 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: [0699a25c] check-in: [a1161fa9] 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: [5f6f8712] check-in: [7c3cf7a1] 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: [e4073583] check-in: [d488f5c6] 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: [18944253] check-in: [421d6570] 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: [0ba55c2b] check-in: [8747d85e] 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: [0a9b355b] check-in: [670732a6] 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: [e0502596] check-in: [a6650eb7] 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: [0e7f8d73] check-in: [22b0faad] 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: [eac0912f] check-in: [0a00a103] 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: [a9a9ad8e] check-in: [b75ce865] user: stephan branch: trunk, size: 34411)
20:33
Lowercased 'zulu' per chat discussion. ... (file: [0db13827] check-in: [c7a017e1] user: stephan branch: trunk, size: 34357)
20:33
chat: removed extraneous T from sender-local timestamp. ... (file: [f5ee13c0] check-in: [16b8e480] user: stephan branch: trunk, size: 34357)
20:30
Removed invalid Z suffix from the new lmtime string. ... (file: [c9eb52a1] check-in: [7d4a3248] 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: [c1472871] check-in: [f2a58f10] 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: [fcc6e506] check-in: [3c5e2bad] user: stephan branch: trunk, size: 34369)
19:43
Added lmtime (local mtime) parameter to /chat-send calls, per chat discussion. ... (file: [46ed1d10] check-in: [152ac599] 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: [c37bc1da] check-in: [e390b95b] 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: [4a1c047c] check-in: [ba3ebf0d] 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: [dc0f5f38] check-in: [34547542] user: stephan branch: trunk, size: 33232)
16:21
Disabled a dangling part of the search for a solution for the bottom-scrolling problem. ... (file: [5850b512] check-in: [7f4000a6] 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: [9cb7cda8] check-in: [8e12b61b] 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: [94c8c1eb] check-in: [dfc20f42] 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: [f5118d22] check-in: [1f000368] 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: [56832c8b] check-in: [cffd66ff] user: stephan branch: chat-mode-bottom-up, size: 30399)
2020-12-25
22:37
Removed some dead CSS. ... (file: [3603d9df] check-in: [c9ca5198] user: stephan branch: chat-widget-rework, size: 29335)
22:35
chat: refactored the messages from fieldsets to a custom widget. ... (file: [9b620177] check-in: [852bda77] 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: [4709d51f] check-in: [73c8ccd3] 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: [94dfb1b6] check-in: [379b4689] 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: [317f36c9] check-in: [13c95f0c] user: drh branch: trunk, size: 29170)
19:20
chat: added 'role'='button' attribute to various non-button button-like elements, per forum request. ... (file: [3f1f6181] check-in: [6506b6de] 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: [1d1a2449] check-in: [9d24a284] 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: [26d92b5b] check-in: [e52d0fd5] user: stephan branch: trunk, size: 26855)
15:27
Chat settings menu tweaks based on chat session feedback. ... (file: [421d10bc] check-in: [9e797bf9] 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: [a65d13d1] check-in: [9d86a4af] 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: [aecab5f0] check-in: [429e5a9b] 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: [57c20909] check-in: [f1e91a20] user: stephan branch: trunk, size: 23692)
11:06
Moved chat.c inline CSS style to default.css. Various chat layout tweaks. ... (file: [0a4517ec] check-in: [467dbc8f] 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: [81a40390] check-in: [617e23be] user: stephan branch: trunk, size: 22092)
09:39
chat.js restructuring/cleanup - no functional changes. ... (file: [04b19e4e] check-in: [12682568] 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: [511d4cc5] check-in: [b6de299b] 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: [9ddc4237] check-in: [b12d69d9] 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: [4a585270] check-in: [6d676f6e] 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: [7f615e6c] check-in: [ebdd91b9] 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: [dacc39e0] check-in: [822653c2] 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: [a5c39435] check-in: [0c0be4b7] 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: [09647e3e] check-in: [d7959205] 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: [c755b364] check-in: [c5095283] user: stephan branch: trunk, size: 15280)
06:18
Removed some debug output. ... (file: [ba67e2bf] check-in: [f315268e] 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: [04edcb6a] check-in: [b7f106da] 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: [90a673ae] check-in: [24727611] 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: [67a5ae8b] check-in: [68da2459] user: stephan branch: trunk, size: 9233)
22:58
chat: minor UI refinements. ... (file: [77da11f2] check-in: [8eb01c31] 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: [5bf74fb9] check-in: [87ff8fe3] 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: [ecb6a9ba] check-in: [15bc20f2] 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: [1ce6d0dc] check-in: [3d6267ed] 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: [079be865] check-in: [c017a7b4] 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: [6d411534] check-in: [63ec4a5b] user: stephan branch: chatroom-dev, size: 8427)
15:12
chat: improved visual notification of drag/drop into the file input selector. ... (file: [fb352abb] check-in: [d5210076] 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: [3b9f1559] check-in: [7e48953c] 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: [da48eb7f] check-in: [85939ffc] 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: [e2e51e14] check-in: [f3c8e838] 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: [1f9328c4] check-in: [018084c5] 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: [e58f10d2] check-in: [4c0146f1] user: stephan branch: chatroom-dev, size: 8571)
08:43
Removed some dead code. Updated some docs. ... (file: [086c72a8] check-in: [cf789fa7] 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: [8add7ade] check-in: [02fa19aa] 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: [5e4b96b3] check-in: [6bccbc20] 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: [bf779516] check-in: [2fe8d7c4] user: stephan branch: chatroom-dev, size: 6595)
07:12
Seem to have resolved the broken download names for chat-posted files. ... (file: [d09b114c] check-in: [b604154c] 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: [c7dca4e6] check-in: [eb7845f3] 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: [11b43d13] check-in: [0101325f] 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: [d81f52a0] check-in: [4e832e9f] user: stephan branch: chatroom-dev, size: 3981)
05:28
Disable the detailed timestamp popup when browser doesn't support it. (example: Safari) ... (file: [ee805c4c] check-in: [5744428b] user: mgagnon branch: chatroom-dev, size: 3972)
04:19
Added complete timestamps (local and GMT) as title attribute of message headers. ... (file: [a332d93a] check-in: [696135b6] user: stephan branch: chatroom-dev, size: 3958)
04:06
Attempt to fix the "NaN" date problem in chat. ... (file: [ae37ed62] check-in: [aefa8e5d] 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: [5995a32c] check-in: [7e6d2f0a] user: stephan branch: no-joy, size: 3201)
02:58
Show only the HH:MM part of the date for each chat message. ... (file: [48e62afa] check-in: [bc65900d] user: drh branch: chatroom-dev, size: 2960)
02:24
Chat message background color determined by username. ... (file: [efb806d0] check-in: [adb93ca9] user: drh branch: chatroom-dev, size: 3397)
01:33
Basic chat functionality seems to be on-line again. ... (file: [9781d6bd] check-in: [441ee6af] user: drh branch: chatroom-dev, size: 3311)
00:58
Get the /chat-send and /chat-poll interfaces working. ... (file: [9c44895c] check-in: [25828eb5] user: drh branch: chatroom-dev, size: 3260)
2020-12-22
20:11
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: [cd3be369] check-in: [217b0d25] user: drh branch: chatroom-dev, size: 6447)