Commit graph

848 commits

Author SHA1 Message Date
Gabe Kangas
d43c2be44a
fix(admin): display year for user tables if not current year. Closes #3175 2023-07-16 16:46:35 -07:00
Gabe Kangas
4790880c19
fix(admin): save appearanceVariables to admin global config state. Fixes #3170 2023-07-16 16:34:37 -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
3f65099910
Name change: better unicode handling (#3164)
* Name change: better unicode handling

Client-side:

* Changes the NameChangeModal to show text "Over limit" when a proposed display
name is too long.

* Allows names to go over limit to prevent splitting graphemes on input.

Server-side:

* Changes the MakeSafeStringOfLength to count number of unicode code points
instead of string bytes.

* name modal: check that newName is defined before iterating
2023-07-11 10:44:09 -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
Dev Gupta
d107a3386c
Update ActionButtonRow.module.scss (#3156) 2023-07-09 18:08:02 -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
janWilejan
d09031faeb
Increase width of volume slider to 100px (#3155)
Co-authored-by: janWilejan <>
2023-07-09 12:50:04 -07:00
John Regan
58bc3ac173
emoji: display native emoji simiarly to custom (#3147) 2023-07-06 12:47:38 -07:00
janWilejan
185123dab2
fail silently when no codces are found (#3142)
Co-authored-by: janWilejan <>
2023-07-05 21:41:50 -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
Gabe Kangas
dc2c46e2a4
fix(ui): fix for exception when chat is disabled. Closes #3138 2023-07-05 14:02:39 -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
Gabe Kangas
65d52072d4
fix(chat): reposition chat loading spinner 2023-07-04 16:11:54 -07:00
Gabe Kangas
00a5fb8dc8
fix: pass username and instance url to external actions. Fixes #3130 2023-07-04 12:14:21 -07:00
Gabe Kangas
5876c7cfbb
fix(ui): simplify modal loading ui state 2023-07-04 12:11:27 -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
Gabe Kangas
f1bde962cc
feat(admin): auto-expand news item if there is only one 2023-06-29 19:37:52 -07:00
Dev Gupta
d973d1ac38
Update Sidebar.tsx (#3119) 2023-06-28 12:16:10 -07:00
Gabe Kangas
b1a8f712c0
fix(embed): leave room for status bar in video embed. Closes #3104 2023-06-28 10:13:24 -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
6805a7c1db
feat(ui): more improvements to initial loading state 2023-06-28 07:53:06 -07:00
Gabe Kangas
d60289c8bc
feat(ui): improve loading state 2023-06-27 22:52:23 -07:00
Gabe Kangas
0fd18cf889
fix: split out styles into two style tags. Should help #2989 2023-06-27 17:44:09 -07:00
Gabe Kangas
e7f464a10f
fix(ui): fix not being able to disable browser notifications. Closes #3115 2023-06-27 16:40:35 -07:00
Gabe Kangas
1ea9a548e1
fix(ui): fallback to an empty array. Closes #3116 2023-06-27 16:19:16 -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
1d6877d3ef
fix(admin): fix error displaying and do not allow deleting of the last stream key. Closes #3114 2023-06-27 16:08: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
janWilejan
7930747cbb
Fix highlight in video quality selection menu (#3102)
Also removed dead code in video quality selection menu.
Also 'minimize latency (experimental)' button is no longer renamed when pressed
(it is now highlighted when enabled).

Co-authored-by: janWilejan <>
2023-06-26 09:40:28 -07:00
janWilejan
c563742856
Chat popup (#3098)
* add pop out chat button

* add button to close chat popup

* chat is hidden on main interface when a popup chat is open

* NameChangeEvent renames clients with the given id

if you have two or more owncast windows (or pop-out chats) open, changing your
name in 1 client is reflected in all clients.

* replace isChatVisible booleans with chatState enum

* update stories to use ChatState

* fix build tests

---------

Co-authored-by: janWilejan <>
2023-06-26 09:00:27 -07:00
janWilejan
e752934fd5
fix TitleNotifier crash (#3100)
rare chance of crashing when using ReactRefresh with an empty chat

Co-authored-by: janWilejan <>
2023-06-23 19:12:34 -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
fb5cb10aa2
fix(ui): set description value to action button title 2023-06-20 20:25:17 -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
8862d5d6ef
Remove unused default exports 2023-06-19 18:32:56 -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