Commit graph

224 commits

Author SHA1 Message Date
Gabe Kangas
eb28ceca54 feat(chat): add support for chat part messages. Closes #3201 (#3291) 2023-10-26 13:10:08 -07:00
Gabe Kangas
10bffb49fe fix: add spacing between user badges. Closes #3247 2023-10-26 13:10:04 -07:00
Gabe Kangas
243156b307
chore: address linter warnings 2023-08-02 13:46:00 -07:00
janWilejan
c00b0be3d4
fix emojis overflowing the chat message (#3228)
* fix emojis overflowing the chat message

* fix: force ignoring of certain paths?

---------

Co-authored-by: janWilejan <>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2023-08-02 12:29:25 -07:00
Gabe Kangas
a163ab8d96
fix: formatting breaking build 2023-07-29 16:04:32 -07:00
renovate[bot]
7c13a3fd01
chore(deps): update dependency eslint-plugin-react to v7.33.0 (#3205)
* chore(deps): update dependency eslint-plugin-react to v7.33.0

* chore: have linter try to autofix and commit linter warnings

* Linter fixes

* chore: tweak how js formatting is run within actions

* fix: type mismatch

* Prettified Code!

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
Co-authored-by: Owncast <owncast@owncast.online>
Co-authored-by: gabek <gabek@users.noreply.github.com>
2023-07-29 15:57:45 -07:00
janWilejan
e15e2dc47c
Fix deprecated antd dropdown warnings (#3171)
* Fix deprecated antd dropdown warnings
2023-07-13 20:28:12 +00:00
janWilejan
14baef4e36
remove excess resize event listeners (#3169)
We add a resize handler to the window when the ChatContainer is created. If a
second ChatContainer is created due to React redrawing, remove the old handler.

Co-authored-by: janWilejan <>
2023-07-13 12:36:21 -07:00
janWilejan
f889113526
change overflow behaviour in chat input (#3167)
Firefox only breaks at word boundaries by default, meaning we need a horizontal
scrollbar to handle long words like AAAAAAAAAAAAAAAAAAAAAAAAAAAAA.

Co-authored-by: janWilejan <>
2023-07-11 13:13:04 -07:00
janWilejan
101174f71e
replace margins with padding in the chat container (#3165)
Virtuoso can't calculate the size of elements that have margins. This causes
strange behaviour with scrolling in chat.

Co-authored-by: janWilejan <>
2023-07-11 13:07:58 -07:00
John Regan
056bd9f152
contenteditable: remove warning about unknown property onContentChange (#3161) 2023-07-10 23:02:07 -07:00
janWilejan
3f4887020d
Add resize handle to chat (#3157)
* add resize handle to chat

* Add chat resize functionality

* window resize only causes chat resize on desktop

* fix parseFloat invocation

* desktop is optional attribute of ChatContainer

---------

Co-authored-by: janWilejan <>
2023-07-10 23:00:28 -07:00
John Regan
a663f8ec34
replace grapheme-splitter with graphemer (updated fork) (#3160) 2023-07-10 16:13:40 -07:00
janWilejan
2d72935564
change chat from a sidebar to a column (#3113)
* change chat from a sidebar to a column

Using a 2-column layout prevents the chat scrollbar from overlapping the page
scrollbar. Also, it no longer needs to calculate extra padding for elements.

* remove unused Sidebar.tsx

* fix css for chat column

* re-center "Go to last message" button

* main content column always uses maximum height

* lint

* re-hide scrollbars in mainContent on chromium

* fix chat column width when input is over-full

* chat is only fixed-width in desktop

---------

Co-authored-by: janWilejan <>
2023-07-09 14:07:35 -07:00
John Regan
c132d82645
simpler chatbox (#3146) 2023-07-09 13:42:03 -07:00
John Regan
58bc3ac173
emoji: display native emoji simiarly to custom (#3147) 2023-07-06 12:47:38 -07:00
John Regan
46ca5223f9
Chat wire protocol (#3125)
* core: remove file extension from emoji name

* web: transform emotes to labels when sending

* chat: replace br with line break

* core: implement emoji cache

* chat: send shortcodes for custom emoji

* chat: correct esling errors

* core: move emoji injection into dedicated function

* emoji: integrate emoji into markdown renderer, fix formatting

* chat protocol: correct golangci-lint findings

* chat field: specify that the contentEditable is an HTMLElement

* admin: mention that emoji should have unique names

* Prettified Code!

* regenerate pack-lock

* chat: correct the emphasis tag, provide fallback for other elements

---------

Co-authored-by: jprjr <jprjr@users.noreply.github.com>
2023-07-05 17:25:47 -07:00
janWilejan
74ad8d5e18
Fix chat flicker / Usernames collapse in order (#3135)
Co-authored-by: janWilejan <>
2023-07-05 11:51:16 -07:00
John Regan
5c07e3ced6
highlighting: make case-insensitive, support unicode (#3137)
* highlighting: make case-insensitive, support unicode

* highlighting: also highlight simplified/normalized form

* highlighting: use MDN-recommended escape pattern
2023-07-05 11:23:39 -07:00
John Regan
bf1ccf21d2
chat: simplify input handling (#3124)
* chat: simplify input handling

Removes the cursor save/restore functionality.

Removes most key handling.

Allows message to go over limit.

Moves the message length check into SendMessage.

Changes the chat input to change to the max style only when over the limit,
rather than at the limit. Makes it apparent that something is wrong.

Fixes #3121

* Prettified Code!

---------

Co-authored-by: jprjr <jprjr@users.noreply.github.com>
2023-06-30 12:22:01 -07:00
Gabe Kangas
bcd08633b4
fix(chat): simplify emoji + char count handling. Closes #3120 2023-06-29 20:35:53 -07:00
janWilejan
ce724fa073
username of repeat chat messages is display:none (#3101)
users who want to show repeat usernames can inject the following CSS:
[class^="ChatUserMessage_repeatUser"]{display:flex !important;}

Co-authored-by: janWilejan <>
2023-06-28 09:58:07 -07:00
Gabe Kangas
1f755cb0ba
fix(chat): do not allow chat scrolling to impact page scrolling. Closes #3109 2023-06-27 16:11:07 -07:00
Gabe Kangas
02811ef37e
feat(chat): preload and cache the custom emoji. Closes #3117 2023-06-27 15:48:16 -07:00
Gabe Kangas
a354787a9e
feat(chat): support line breaks and pasted content. Closes #3108 2023-06-27 14:51:01 -07:00
Gabe Kangas
d33f117a82
fix(chat): fix missing alt tags on custom emoji. Closes #3106 2023-06-26 11:38:10 -07:00
Gabe Kangas
06adee2bc2
fix(chat): restore placeholder value to what it was before 2023-06-22 09:48:26 -07:00
Gabe Kangas
7924a561b2
fix(chat): update scroll to bottom button text color 2023-06-21 14:26:57 -07:00
Gabe Kangas
ccb9b5d075
chore: run stylelint on our css files 2023-06-20 20:58:00 -07:00
Gabe Kangas
0e13bd143e
fix(chat): set cursor for chat input field 2023-06-20 20:51:36 -07:00
Gabe Kangas
ad814a8802
fix(chat): refactor chat input to not use slatejs. Closes #3094 2023-06-20 17:06:24 -07:00
Gabe Kangas
a86049729e
fix(chat): enable tld validation in autolinking and add online to accepted tlds 2023-06-15 05:41:19 -07:00
Gabe Kangas
58f2d09815
fix(chat): try to improve auto scroll to bottom. Closes #3029 2023-06-12 15:47:41 -07:00
Gabe Kangas
2046e4999f
feat(chat): decrease msg collapse timeout + add spacing. Closes #3062 2023-06-02 19:48:07 -07:00
renovate[bot]
a4f984e7d1
fix(deps): update dependency slate-react to v0.95.0 (#3065)
* fix(deps): update dependency slate-react to v0.95.0

* fix: slate requires prop name change

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2023-06-02 11:44:44 -07:00
Gabe Kangas
6d30de19f6
fix(chat): cleanup of moderator flag check 2023-05-31 16:54:30 -07:00
Gabe Kangas
924223328c
fix(chat): tweak layouts of chat user badges. Closes #3009 2023-05-31 14:53:13 -07:00
Gabe Kangas
71703f2245
fix(chat): fix bot status not showing. Closes #3046 2023-05-31 13:54:03 -07:00
Gabe Kangas
69f217f758
Refactor mobile chat into modal (#3038)
* feat(mobile): refactor mobile chat into modal

- Make page always scrollable
- Move mobile chat into a standalone modal

* fix(test): split out mobile browser test specs

* fix(mobile): force chat button to render on top of footer

* fix: some small updates from review

* fix: hide/show hide chat menu option based on width

* fix: chat button icon getting cut off

* chore(tests): add browser tests for mobile chat modal

* chore(tests): add story for ChatModal component

* fix(test): quiet shellcheck

* fix: remove unused import

* fix(tests): silence storybook linting warning

* fix(ui): reposition chat modal button icon with transform
2023-05-22 18:56:44 -07:00
Gabe Kangas
e50b23d081
Cleanup unused Javascript (#3027)
* chore(js): be stricter about dead code warnings

* chore(js): remove dead code and unused exports

* rebase

* chore: remove unused files

* chore(deps): remove unused prop-types dep

* chore(js): remove unused function

* chore(deps): remove + check unused deps

* chore(js): remove unused exports. Closes #3036
2023-05-20 21:15:25 -07:00
Gabe Kangas
acab4e5c85
fix(ui): hard code the colors of the chat moderation menu button 2023-05-20 14:59:02 -07:00
Gabe Kangas
1f1f48acb0
fix(chat): fix chat input placeholder positioning. Closes #2991 2023-05-18 14:07:11 -07:00
Gabe Kangas
cfdfdf5f49
fix(chat): add slight spacing via margin below bottom chat message 2023-05-08 19:29:00 -07:00
Gabe Kangas
fadb9def83
fix(chat): allow system chat messages to fill width. Closes #2998 2023-05-08 18:49:34 -07:00
Gabe Kangas
722d11307a
feat(ui): add id to scroll to bottom button 2023-05-08 09:44:39 -07:00
Gabe Kangas
a9a2ad5487
fix(chat): tweak auto scrolling on message logic to reduce scroll to bottom button showing 2023-05-07 20:29:29 -07:00
Gabe Kangas
3616717ceb
fix(chat): strip p tags from outgoing chat messages to fix markdown rendering 2023-05-06 16:00:48 -07:00
Gabe Kangas
afa6c8fd23
fix(chat): increase font weight of chat name change messages 2023-05-06 11:01:14 -07:00
Gabe Kangas
6d55c42282
fix(chat): increase font weight of chat join messages 2023-05-06 10:49:00 -07:00
Gabe Kangas
4325c64205
fix(chat): limit image size within a chat message 2023-05-04 21:23:01 -07:00