68 Commits

Author SHA1 Message Date
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
056bd9f152 contenteditable: remove warning about unknown property onContentChange (#3161) 2023-07-10 23:02:07 -07:00
a663f8ec34 replace grapheme-splitter with graphemer (updated fork) (#3160) 2023-07-10 16:13:40 -07:00
c132d82645 simpler chatbox (#3146) 2023-07-09 13:42:03 -07:00
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
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
bcd08633b4 fix(chat): simplify emoji + char count handling. Closes #3120 2023-06-29 20:35:53 -07:00
02811ef37e feat(chat): preload and cache the custom emoji. Closes #3117 2023-06-27 15:48:16 -07:00
a354787a9e feat(chat): support line breaks and pasted content. Closes #3108 2023-06-27 14:51:01 -07:00
d33f117a82 fix(chat): fix missing alt tags on custom emoji. Closes #3106 2023-06-26 11:38:10 -07:00
06adee2bc2 fix(chat): restore placeholder value to what it was before 2023-06-22 09:48:26 -07:00
ccb9b5d075 chore: run stylelint on our css files 2023-06-20 20:58:00 -07:00
0e13bd143e fix(chat): set cursor for chat input field 2023-06-20 20:51:36 -07:00
ad814a8802 fix(chat): refactor chat input to not use slatejs. Closes #3094 2023-06-20 17:06:24 -07:00
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
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
1f1f48acb0 fix(chat): fix chat input placeholder positioning. Closes #2991 2023-05-18 14:07:11 -07:00
3616717ceb fix(chat): strip p tags from outgoing chat messages to fix markdown rendering 2023-05-06 16:00:48 -07:00
44483a45d3 some webv2 UI polish (#2940)
* style tweaks for Action Button, UserMenu, Modal

* a bunch of misc polish; some around chat

* Prettified Code!

* cleanup

* fix formatting

* Reduce content padding a bit

* some stylesheet cleanup

* fix action button sizing

* Remove action button height completely

---------

Co-authored-by: gingervitis <gingervitis@users.noreply.github.com>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2023-04-24 10:58:57 -07:00
b5cc183a3c Continue to bump diff threshold so UI tests do not register as changed 2023-03-08 14:49:50 -08:00
4a0476b237 Add support for disabled chat state in the chat input field. Closes #2761 2023-03-01 16:22:10 -08:00
ed2dc00345 Remove unused imports 2023-02-26 18:12:44 -08:00
5e155179ef Fixed #2734 (#2742)
* Fixed #2734

* Prettified Code!

---------

Co-authored-by: bennett1412 <bennett1412@users.noreply.github.com>
2023-02-26 18:09:24 -08:00
b1cc8c6f12 Increase diffThreshold again for chat text field UI test 2023-02-26 15:44:18 -08:00
d2a3e718e4 Continue to bump the diff threshold 2023-02-21 09:31:57 -08:00
9f735d3c5d Increase diff threshold for UI test. Hopefully helps #2629 2023-02-12 17:12:03 -08:00
de20b2cc11 Increase diff threshold for UI tests: #2292 #2630 #2629 2023-01-30 14:46:34 -08:00
84aff441a2 Give text input more padding 2023-01-28 19:26:17 -08:00
a567f8543e Make chat text input background the same color as chat bg 2023-01-18 20:23:50 -08:00
6fbd6cbbcf Lazy load every instance of using ant icons. Closes #2583 2023-01-15 22:31:36 -08:00
d8a5380b7f Fix some React lifecycle and rendering errors that exist in build 2023-01-10 16:39:20 -08:00
fb1aca165f Give the chat text input surrounding a background color 2022-12-24 15:32:15 -08:00
c871251769 Tweak positioning of emoji picker popover 2022-12-24 15:08:46 -08:00
c597a0de9e Add accessibility properties to chat text input. Closes #2444 2022-12-19 21:49:11 -08:00
447779b439 Reduce textfield padding 2022-11-13 13:18:17 -08:00
4cdbcc642d Tweak Chromatic diffThreshold to reduce false negative tests 2022-11-05 17:27:44 -07:00
352447e3d4 Web UI frontend automated browser tests (#2223)
* First pass at basic browser tests for #1926

* Run tests against dev web server not go server

* Bundle the web code into the server before running tests

* Move cypress UI tests into its own npm project + add tests

* Add additional tests + wire up with cypress dashboard

* Limit concurrency of workflow jobs

* Temporarily comment out some tests that do not pass in mobile. Will fix later.
2022-11-04 20:04:13 -07:00
3021dd7795 Always show the 'send chat message' button. Re #2293. (#2298) 2022-11-03 10:36:03 -07:00
64b20cf070 Use 16px font size to prevent auto zoom on iOS Safari. Shorten the 'type here' message so it doesn't wrap to a second line when the chat pane becomes a column on the right side of larger screens. Re #2276. (#2294) 2022-11-02 12:34:57 -07:00
917248fc5b moved footer to layout. changed some css 2022-10-22 10:46:17 +02:00
6e54ec7695 Antd updates (#2194)
* Fix antd Modal.visible warning by using updated attribute name 'open'.

* Update more attributes (onVisibleChange => onOpenChange, defaultVisible => defaultOpen) to fix browser console warnings.

* Update ModalProps property from 'visible' to 'open' to match the change in antd.

* Update variable names to match the antd change from 'visible' to 'open'.

* Inline this for the linter.

* One more visible => open reference.
2022-10-10 17:11:29 -07:00
cd3722d9f1 Limit chat input to max characters. Closes #2109 2022-10-08 22:33:50 -07:00
45c7fa4f7e Only show chat send button on mobile 2022-10-04 19:14:50 -07:00
b1484f4c9f Lazy load some components that aren't needed at load. For #2167 2022-10-03 21:06:46 -07:00
adea618a44 improved ui of chat text input 2022-10-01 10:34:59 +02:00
44ef64b3b5 fixed chat container not showing in SB + minor changes 2022-09-30 13:17:22 +02:00
d1f3fffe2f reafctor: normalize component formatting (#2082)
* refactor: move/rename BanUserButton file

* refactor: move/rename Chart file

* refactor: update generic component filenames to PascalCase

* refactor: update config component filenames to PascalCase

* refactor: update AdminLayout component filename to PascalCase

* refactor: update/move VideoJS component

* chore(eslint): disable bad react/require-default-props rule

* refactor: normalize ActionButton component

* refactor: normalize ActionButtonRow component

* refactor: normalize FollowButton component

* refactor: normalize NotifyButton component

* refactor: normalize ChatActionMessage component

* refactor: normalize ChatContainer component

* refactor: normalize ChatJoinMessage component

* refactor: normalize ChatModerationActionMenu component

* refactor: normalize ChatModerationDetailsModal component

* refactor: normalize ChatModeratorNotification component

* refactor: normalize ChatSocialMessage component

* refactor: normalize ChatSystemMessage component

* refactor: normalize ChatTextField component

* refactor: normalize ChatUserBadge component

* refactor: normalize ChatUserMessage component

* refactor: normalize ContentHeader component

* refactor: normalize OwncastLogo component

* refactor: normalize UserDropdown component

* chore(eslint): modify react/function-component-definition rule

* refactor: normalize CodecSelector component

* refactor: update a bunch of functional components using eslint

* refactor: update a bunch of functional components using eslint, pt2

* refactor: update a bunch of functional components using eslint, pt3

* refactor: replace all component->component default imports with named imports

* refactor: replace all component-stories->component default imports with named imports

* refactor: remove default exports from most components

* chore(eslint): add eslint config files for the components and pages dirs

* fix: use-before-define error in ChatContainer

* Fix ChatContainer import

* Only process .tsx files in Next builds

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2022-09-07 00:00:28 -07:00
121c9415f1 Wire up emoji+custom emote selector to text input. Closes #1887 2022-09-06 17:52:09 -07:00
5ebbbb8bf2 refactor(stories): co-locate stories with components (#2078)
* refactor: move ActionButton component

* refactor: move BanUserButton component

* refactor: move ChatActionMessage component

* refactor: move ChatContainer component

* refactor: move AuthModal component

* refactor: move BrowserNotifyModal component

* refactor: move ChatUserMessage component

* refactor: move ChatJoinMessage component

* refactor: move ChatTextField component

* refactor: move ChatUserBadge component

* refactor: move FollowerCollection and SingleFollower components

* fix: bad import path

* refactor: move FollowModal component

* refactor: move Modal component

* refactor: move ContentHeader component

* refactor: move ChatSystemMessage component

* refactor: move Header component

* refactor: move Footer component

* refactor: move StatusBar component

* refactor: move OfflineBanner component

* refactor: move OwncastPlayer component

* refactor: move IndieAuthModal component

* refactor: move SocialLinks component

* refactor: move VideoPoster component

* refactor: move FollowModal component

* refactor: move FediAuthModal.tsx component

* refactor: move UserDropdown component

* refactor: move ChatSocialMessage component

* refactor: move Logo component

* refactor: move NotifyReminderPopup component

* refactor: move NameChangeModal component

* refactor: move FatalErrorStateModal component

* refactor: move ChatModeratorNotification component

* refactor: move ChatModerationActionMenu and ChatModerationDetailsModal components

* refactor: move CustomPageContent component

* refactor: move storybook Introduction file

* refactor: update storybook story import path

* refactor: move storybook preview styles

* refactor: move storybook doc pages

* refactor: move Color and ImageAsset components

* fix: bad import path

* fix: bad import path in story file
2022-09-03 11:38:52 -07:00
d5fa81f76e Draft: rough-ish draft of proposed color theme changes (#2067)
* color experimentation and troubleshooting

* create color scheme, assign colors, more ant overrides

* fun selection color

* Prettified Code!

* Correctly import opensans

* Prettified Code!

* Organize+standardize colors/names and update the app to use them

* Prettified Code!

* Use css var references instead of resolving value of vars in css files

* Prettified Code!

Co-authored-by: gingervitis <gingervitis@users.noreply.github.com>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
Co-authored-by: gabek <gabek@users.noreply.github.com>
2022-08-29 23:17:12 -07:00