FrankerFaceZ / Add-Ons

Add-Ons are additional modules for FrankerFaceZ that provide new behaviors and ways to customize Twitch.
68 stars 58 forks source link

[FS Chat] Chat input glitches #217

Open Tai-Mai opened 6 months ago

Tai-Mai commented 6 months ago

Describe the bug This issue is really hard to describe but I hope this recording can give you a good enough idea.

Screencast_20240505_120318.webm

To reproduce I hope it's clear from the recording.

Expected behavior I expect input in FS Chat to behave the same as in a normal non-FS chat.

Environment

FFZ Logs (via FFZ Control Center > Home > Feedback >> Log):

initialization
-------------------------------------------------------------------------------
[12:02:25] info | core: FrankerFaceZ v4.72.0 (s:twitch f:main b:null c:38e557e8093ad5fd529086940a3515ad8a9dc4fb)
[12:02:25] info | core: Initial URL: https://www.twitch.tv/wirtual
[12:02:25] info | site: Using: Twilight
[12:02:25] info | site.web_munch: Found and wrapped webpack's loader after 0ms.
[12:02:25] info | settings: Using Provider: LocalStorageProvider
[12:02:25] info | site.web_munch: require() grabbed in 2.00000ms.
[12:02:25] info | core: Loaded descriptions of 0 modules.
[12:02:25] info | settings: Initialization complete after 14.00000ms -- Values: 106 -- Profiles: 2
[12:02:25] info | site.fine: Installing MutationObserver.
[12:02:25] info | site: Loaded descriptions of 17 modules.
[12:02:25] info | site.elemental: Installing MutationObserver.
[12:02:25] info | site: Navigation user /wirtual
[12:02:25] info | main_menu: Built Tree in 14.00000ms with 187 structure nodes and 323 settings nodes.
[12:02:25] info | experiments: Loaded information on 4 experiments.
[12:02:26] info | site.player: Skipping visibility hooks. Picture-in-Picture is not available.
[12:02:26] info | site.chat: Chat Types have changed from static mappings for categories: CHAT_TYPES
[12:02:26] info | core: Initialization complete in 667.00000ms.

settings
-------------------------------------------------------------------------------
i18n.debug.capture: false
i18n.format.date: "default"
i18n.format.time: "short"
i18n.format.datetime: "medium"
i18n.debug.transform: null
i18n.locale: "en"
data.use-staging: false
addons.dev.server: false
pubsub.use-cluster: null
metadata.modview.hide-info: false
layout.side-nav.hide-viewers: false
metadata.uptime: 2
metadata.uptime.no-native: true
metadata.viewers: false
metadata.viewers.no-native: false
layout.swap-sidebars: false
layout.portrait: false
layout.portrait-threshold: 1.25
layout.use-portrait: false
chat.width: null
chat.use-width: false
layout.use-chat-fix: false
layout.is-theater-mode: false
layout.theatre-navigation: false
layout.minimal-navigation: false
layout.side-nav.show-avatars: true
layout.side-nav.show: 1
layout.side-nav.hide-offline: false
layout.hide-discover-luna: false
layout.prime-offers: false
channel.hide-unfollow: false
chat.hype.show-pinned: true
channel.round-avatars: true
channel.hide-live-indicator: false
layout.side-nav.rerun-style: 1
layout.side-nav.show-rec-channels: 1
layout.side-nav.show-friends: 1
whispers.show: true
channel.show-celebrations: true
layout.subtember: true
layout.theme.global-font: ""
layout.turbo-cta: true
layout.portrait-invert: false
layout.portrait-min-chat: false
layout.inject-portrait: false
layout.use-portrait-swapped: false
player.theatre.metadata: false
layout.use-portrait-meta: false
layout.use-portrait-meta-top: false
layout.portrait-extra-width: 5
player.theatre.no-whispers: false
layout.portrait-extra-height: 14
theme.disable-high-contrast: false
theme.high-contrast-tweaks: false
theme.disable-auto-dark: false
theme.can-dark: true
theme.is-dark: true
theme.color.background: ""
theme.color.text: ""
theme.legacy-dark-input: false
theme.color.accent: ""
theme.color.tooltip.background: "#464649"
theme.color.tooltip.text: ""
theme.color.chat-background: ""
theme.color.chat-text: ""
theme.color.chat-accent: ""
theme.font.size: 13
directory.show-channel-avatars: undefined
directory.hide-live: false
directory.hidden.reveal: false
directory.hidden.style: 2
channel.panel-tips: false
channel.auto-click-chat: true
player.gain.enable: false
player.gain.no-volume: false
player.volume-always-shown: true
player.ext-interaction: true
player.hide-mouse: true
player.fade-pause-buffer: true
player.ext-hide: 0
player.captions.font-size: ""
player.captions.font-family: ""
player.compressor.enable: true
player.compressor.shortcut: null
player.no-autoplay: false
player.home.autoplay: false
player.disable-content-warnings: true
player.button.reset: true
player.gain.min: 0
player.gain.max: 2
player.compressor.default: false
player.allow-catchup: true
player.hide-event-bar: false
ffz.show-new-settings: true
directory.block-titles: []
__filter:directory.block-titles: null
channel.extra-links: true
chat.bits.show: false
layout.display-bits-button: false
player.theatre.auto-enter: false
smokemotes.pinned_mentions: true
addon.unread-mentions-counter.counter-location: "icon"
addon.seventv_emotes.animated_avatars: true
addon.seventv_emotes.badges: true
addon.seventv_emotes.global_emotes: true
addon.seventv_emotes.channel_emotes: true
addon.fs-chat.bg.blur: 10
addon.fs-chat.height: "550"
addon.fs-chat.width: null
addon.fs-chat.bg.color: "rgba(0, 0, 0, 0.25)"
addon.fs-chat.automatic: true
addon.fs-chat.shortcut: "alt+c"
addon.inlinetab.no_mentions: true
addon.inlinetab.no_commands: true
addon.inlinetab.tips: true
addon.seventv_emotes.unlisted_emotes: false
addon.pronouns.border: false
addon.pronouns.color: "rgba(34, 255, 0, 0)"
addon.pronouns.color.aeaer: "rgba(34, 255, 0, 0)"
addon.pronouns.color.any: "rgba(34, 255, 0, 0)"
addon.pronouns.color.eem: "rgba(34, 255, 0, 0)"
addon.pronouns.color.faefaer: "rgba(34, 255, 0, 0)"
addon.pronouns.color.hehim: "rgba(34, 255, 0, 0)"
addon.pronouns.color.itits: "rgba(34, 255, 0, 0)"
addon.pronouns.color.other: "rgba(34, 255, 0, 0)"
addon.pronouns.color.perper: "rgba(34, 255, 0, 0)"
addon.pronouns.color.sheher: "rgba(34, 255, 0, 0)"
addon.pronouns.color.theythem: "rgba(34, 255, 0, 0)"
addon.pronouns.color.vever: "rgba(34, 255, 0, 0)"
addon.pronouns.color.xexem: "rgba(34, 255, 0, 0)"
addon.pronouns.color.ziehir: "rgba(34, 255, 0, 0)"
first_message_highlight.first_time_chatter_only_moderated_channels: false
first_message_highlight.enabled: false
addon.seventv_emotes.nametag_paints: true
sub-button.prime-notice: true
addon.seventv_emotes.personal_emotes: true
metadata.clip-download: true
metadata.featured-follow: true
addon.pronouns.streamer: true
metadata.player-stats: true
metadata.stream-delay-warning: 0
addon.unread-mentions-counter.ping-types: ["mention"]
addon.unread-mentions-counter.browser-notifications.icon-photo: "channel"
first_message_highlight.first_time_chatter_priority: 0
first_message_highlight.first_time_chatter_color: "#C832C866"
smokemotes.pinned_reasons: ["mention","user"]
addon.inlinetab.tip-count: true
player.volume-scroll: false
player.gain.scroll: false
player.single-click-pause: false
player.mute-click: true
player.fullscreen.auto-chat: false
addon.fs-chat.metadata: 0
addon.fs-chat.round: true
addon.fs-chat.no-input: false
addon.fs-chat.minimal: true
addon.fs-chat.hide-scroll: false
debug.link-resolver.source: {"title":"Cloudflare Test Worker","value":"https://link-service.workers.frankerfacez.com"}
ffz.search.matches-only: true

experiments
-------------------------------------------------------------------------------
Unique ID: gGEsce1jlThKSFtaETu7Fe9FEQAHr5mZ

FFZ | EMQX MQTT-Based PubSub: false (r:0.75)
Twitch | liverecs_holdout_v2: holdout (r:0.02, t:user_id)
Twitch | ltd_experiment_v2: GroupE-150s (r:0.16, t:channel_id, c:wirtual)
Twitch | support_panel_simplification: treatment_1b (r:0.2, t:user_id)
Twitch | percolite-shelf-reranking-logged-in: variant2b (r:0.24, t:user_id)
Twitch | ivs_player_web_gpu_transform: treatment_useRenderSurface+config=eyJ1c2VSZW5kZXJTdXJmYWNlIjp0cnVlfQ== (r:0.25, t:device_id)
Twitch | percolite-shelf-reranking-logged-out: variant1a (r:0.25, t:device_id)
Twitch | turbo_and_sub_upsell_during_ads: treatment2 (r:0.3333333333333333, t:user_id)
Twitch | Devsite_create_apps_form_recaptcha: variant1 (r:0.5, t:user_id)
Twitch | auto_increment_goal: treatment (r:0.5, t:channel_id, c:wirtual)
Twitch | auto_pinned_cheers: control (r:0.5, t:channel_id, c:wirtual)
Twitch | bits_custom_amount: control (r:0.5, t:user_id)
Twitch | creator_follow_cue: chat (r:0.5, t:user_id)
Twitch | gift_and_sub_button: variant_1 (r:0.5, t:user_id)
Twitch | giftcard_redemption_in_checkout: control (r:0.5, t:device_id)
Twitch | icon_cheer: variant (r:0.5, t:user_id)
Twitch | manage_to_upgrade_subscription: control (r:0.5, t:user_id)
Twitch | sda_post_fill_drop: control (r:0.5, t:device_id)
Twitch | seg_mented_signup: variant_3 (r:0.5, t:device_id)
Twitch | subscriber_recap: control (r:0.5, t:channel_id, c:wirtual)
Twitch | toad_experiment: control (r:0.6, t:channel_id, c:wirtual)
Twitch | disco_bpli: control (r:0.75, t:user_id)
Twitch | Twilight amazon-ivs-web-broadcast NPM Distribution: variant-wb-a (r:0.95, t:device_id)
Twitch | global_commerce_upsell_holdout: treatment (r:0.95, t:user_id)
Twitch | liverecs_holdout_device: control (r:0.98, t:device_id)
Twitch | community_insights: treatment (r:0.99, t:channel_id, c:wirtual)
Twitch | disco_carousel_shelf: control (r:0.99, t:user_id)
Twitch | guest_star_left_nav_online_channel_augmentation: allowed (r:0.99, t:device_id)
Twitch | mse_in_workers: treatment (r:0.99, t:device_id)

addons
-------------------------------------------------------------------------------
Known
unread-mentions-counter | enabled | UnreadMentionsCounter v1.1.2
twir | disabled | Twir v1.0.1
smokemotes | enabled | smokeys_utils v1.2.1
smm2-links | disabled | SMM2 Links v1.2.0
screenshoter | disabled | screenshoter v1.1.1
repetition-detector | disabled | repetition_detector v1.1.0
ragnarok-database | disabled | rodb v1.0.1
pronouns | enabled | pronouns v1.2.0
prattlenot | disabled | PrattleNot v0.9.0
poll-shim | disabled | poll_shim v0.2.2
no-bad-emotes | disabled | NoBadEmotes v1.1.0
new-account-highlighter | disabled | New Account Highlighter v1.1.1
inline-tab-completion | enabled | Inline Tab v1.2.5
fs-chat | enabled | fs-chat v1.5.2
first-message-highlighter | enabled | first_msg_highlight v1.1.3
ffzap-liriklive | disabled | FFZ:AP LirikLIVE v3.2.2
ffzap-core | enabled | FFZ:AP Core v3.3.11
ffzap-bttv | enabled | FFZ:AP BTTV v3.3.21
emoteless | disabled | emote_less_chat v1.0.6
emote-side-panel | disabled | EmoteSidePanel v1.0.0
declutter | disabled | declutter v1.0.0
deck | disabled | Deck v2.7.0
clip-confirm | disabled | ClipConfirm v1.0.5
chatterino-badges | disabled | Chatterino v1.0.0
brcm | disabled | brcm v1.0.0
aplatypuss-emotes | disabled | Aplatypuss Emotes v1.0.0
ModTools | disabled | Mod Tools v1.0.1
7tv-emotes | enabled | 7TV v1.4.22

Modules
loaded   | enabled  | 
loaded   | enabled  | core
loaded   | enabled  | settings
loaded   | enabled  | experiments
loaded   | enabled  | i18n
loaded   | enabled  | staging
loaded   | enabled  | load_tracker
loaded   | enabled  | socket
loaded   | enabled  | pubsub
loaded   | enabled  | site.web_munch
loaded   | enabled  | site.fine
loaded   | enabled  | site.elemental
loaded   | enabled  | site.router
loaded   | enabled  | site.apollo
loaded   | enabled  | site.twitch_data
loaded   | enabled  | site.subpump
loaded   | enabled  | site
loaded   | enabled  | addons
loaded   | enabled  | vue
loaded   | enabled  | tooltips
loaded   | enabled  | chat.badges
loaded   | enabled  | chat.emotes
loaded   | enabled  | chat.emoji
loaded   | enabled  | chat.actions
loaded   | enabled  | chat.overrides
loaded   | enabled  | chat
loaded   | enabled  | emote_card
loaded   | enabled  | link_card
loaded   | enabled  | main_menu
loaded   | enabled  | site.bits_button
loaded   | enabled  | metadata
loaded   | enabled  | site.bttv_compat
loaded   | enabled  | site.css_tweaks
loaded   | enabled  | site.channel
unloaded | disabled | translation_ui
loaded   | enabled  | site.chat.scroller
loaded   | enabled  | site.chat.chat_line.rich_content
loaded   | enabled  | site.chat.chat_line
loaded   | enabled  | site.chat.settings_menu
loaded   | enabled  | site.chat.emote_menu
loaded   | enabled  | site.chat.input
loaded   | enabled  | site.chat.viewer_cards
loaded   | enabled  | site.chat
loaded   | enabled  | site.compat_emote_menu
loaded   | enabled  | site.dashboard
loaded   | enabled  | site.directory.game
loaded   | enabled  | site.directory
loaded   | enabled  | site.featured_follow
loaded   | enabled  | site.layout
loaded   | enabled  | site.loadable
loaded   | enabled  | site.menu_button
loaded   | enabled  | site.mod-view
loaded   | enabled  | site.player
loaded   | enabled  | site.sub_button
loaded   | enabled  | site.theme
loaded   | enabled  | site.video_chat
loaded   | enabled  | addon.ffzap-core
loaded   | enabled  | addon.pronouns
loaded   | enabled  | addon.smokemotes
loaded   | enabled  | addon.unread-mentions-counter
loaded   | enabled  | addon.7tv-emotes
loaded   | enabled  | addon.7tv-emotes.api.user
loaded   | enabled  | addon.7tv-emotes.api.emotes
loaded   | enabled  | addon.7tv-emotes.api.cosmetics
loaded   | enabled  | addon.7tv-emotes.api
loaded   | enabled  | addon.7tv-emotes.avatars
loaded   | enabled  | addon.7tv-emotes.badges
loaded   | enabled  | addon.7tv-emotes.emotes
loaded   | enabled  | addon.7tv-emotes.nametag-paints
loaded   | enabled  | addon.7tv-emotes.personal-emotes
loaded   | enabled  | addon.7tv-emotes.socket
loaded   | enabled  | addon.ffzap-bttv
loaded   | enabled  | addon.fs-chat
loaded   | enabled  | addon.first-message-highlighter
loaded   | enabled  | addon.inline-tab-completion

chat
-------------------------------------------------------------------------------
chat settings
-------------------------------------------------------------------------------
chat.effects.enable: true
chat.effects.FlipX: true
chat.effects.FlipY: true
chat.effects.ShrinkX: true
chat.effects.GrowX: true
chat.emotes.animated: 1
chat.effects.Slide: true
chat.effects.Appear: true
chat.effects.Leave: true
chat.effects.Rotate: true
chat.effects.Rainbow: true
chat.effects.HyperRed: true
chat.effects.Shake: true
chat.effects.Photocopy: true
chat.effects.Jam: true
chat.effects.Bounce: true
chat.badges.fix-colors: true
theme.can-dark: true
theme.is-dark: true
chat.badges.style: 1
chat.badges.clickable: 2
chat.badges.media-queries: true
chat.badges.version: 2
chat.filtering.all-mentions: false
chat.filtering.color-mentions: true
chat.filtering.need-colors: true
chat.actions.inline: [{"action":"ban","appearance":{"type":"icon","icon":"ffz-i-block"},"options":{},"display":{"mod":true,"mod_icons":true,"deleted":false},"ctx":"inline"},{"action":"unban","appearance":{"type":"icon","icon":"ffz-i-ok"},"options":{},"display":{"mod":true,"mod_icons":true,"deleted":true},"ctx":"inline"},{"action":"timeout","appearance":{"type":"icon","icon":"ffz-i-clock"},"display":{"mod":true,"mod_icons":true},"ctx":"inline"},{"action":"msg_delete","appearance":{"type":"icon","icon":"ffz-i-trash"},"options":{},"display":{"mod":true,"mod_icons":true},"ctx":"inline"}]
chat.actions.hover: [{"action":"copy_message","appearance":{"type":"icon","icon":"ffz-i-docs"},"ctx":"hover","options":{"format":"{{message.text}}"},"display":{}},{"action":"reply","appearance":{"type":"dynamic"},"ctx":"hover"}]
chat.scroller.freeze-requires-hover: true
chat.scroller.hover-delay: 750
chat.scroller.freeze: 9
chat.scroller.smooth-scroll: 0
chat.input.hide-identity: false
chat.emote-menu.enabled: true
chat.emote-menu.icon: false
chat.emoji.style: "twitter"
chat.inline-preview.enabled: true
chat.tab-complete.emotes-without-colon: true
chat.emotes.2x: 0
chat.emotes.limit-size: true
chat.banners.last-events: true
chat.input.show-mod-view: true
chat.input.show-highlight: true
chat.input.show-shield: true
chat.lines.padding: false
chat.bits.show: false
chat.filtering.deleted-style: 0
chat.filtering.clickable-mentions: true
chat.filtering.bold-mentions: true
chat.hide-community-highlights: false
chat.lines.alternate: true
chat.filtering.highlight-mentions: true
chat.filtering.highlight-tokens: true
chat.filtering.mention-color: ""
chat.input.show-elevate-your-message: true
chat.disable-handling: false
chat.adjustment-mode: 1
chat.adjustment-contrast: 4.5
theme.color.chat-background: ""
theme.color.background: ""
theme.color.chat-text: ""
theme.color.text: ""
chat.lines.borders: 0
chat.width: null
chat.effective-width: 340
chat.actions.size: 16
chat.actions.hover-size: 30
chat.timestamp-size: null
chat.font-size: 13
chat.lines.emote-alignment: 0
chat.font-family: ""
chat.delay: 0
chat.scrollback-length: 150
chat.filtering.remove-deleted: 1
chat.banners.charity: true
chat.hype.display-input: true
chat.actions.room-above: false
chat.emote-menu.combine-tabs: false
chat.emote-menu.stay-loaded: false
chat.emote-menu.show-quick-nav: false
chat.emote-menu.show-heading: 1
chat.emote-menu.tall: false
chat.emote-menu.reduced-padding: false
chat.emote-menu.show-search: true
chat.emote-menu.clear-search: false
chat.emote-menu.sort-emotes: 0
chat.emote-menu.sort-tiers-last: true
chat.emotes.enabled: 2
chat.emote-menu.effect-tab: true
chat.emote-menu.show-emoji: false
chat.subs.gift-banner: true
chat.banners.hype-train: true
chat.banners.prediction: true
chat.banners.polls: true
chat.banners.pinned-message: true
chat.banners.drops: true
chat.actions.room: []
chat.bits.animated: false
theme.tooltips-dark: false
chat.filtering.blocked-types: {}
ffzap.core.highlight_sound: "https://cdn.ffzap.com/sounds/default_wet.mp3"
ffzap.core.highlight_sound_types: ["mention","badge","term"]
ffzap.core.enable_highlight_sound: true
ffzap.core.message_deletion: 0
ffzap.core.highlight_sound_volume: 30
smokemotes.keep_hd_video: true
smokemotes.mod_keybinds: false
ffzap.betterttv.global_emoticons: true
ffzap.betterttv.pro_badges: true
ffzap.betterttv.channel_emoticons: true
ffzap.betterttv.arbitrary_emoticons: true
chat.update-when-loaded: true
chat.fix-bad-emotes: true
chat.filtering.debug: false
chat.filtering.highlight-basic-users-blocked: []
__filter:block-users: null
chat.filtering.highlight-basic-blocked: []
__filter:block-terms: null
chat.filtering.highlight-basic-badges: []
__filter:highlight-badges: null
chat.filtering.highlight-basic-badges-blocked: []
__filter:block-badges: null
chat.filtering.highlight-basic-users: [{"v":"munzu","t":"text","c":"","s":false,"h":false,"w":true,"p":0,"remove":false},{"v":"mastersyphilis","t":"text","c":"","s":false,"h":false,"w":true,"p":0,"remove":false}]
__filter:highlight-users: [[0,null,{}]]
chat.filtering.highlight-basic-terms: [{"v":"munzu","t":"text","c":"","remove":false}]
__filter:highlight-terms: {"hl":[[0,null,[null,{}]]],"non":null}
chat.emoji.replace-joiner: 1
first_message_highlight.first_time_chatter: true
first_message_highlight.returning_chatter: false
chat.filtering.mention-priority: 0
ffzap.core.remove_spaces: false
chat.filtering.display-deleted: "DETAILED"
chat.replies.style: 1
chat.filtering.show-reasons: false
chat.rich.enabled: true
chat.rich.minimum-level: 0
chat.rich.want-mid: true
chat.name-format: 0
chat.timestamp-format: "h:mm"
chat.badges.hidden: {}
chat.badges.custom-mod: true
chat.badges.custom-vip: true
chat.filtering.hidden-tokens: {}
chat.rich.hide-tokens: false
tooltip.images: true
tooltip.link-images: true
tooltip.link-nsfw-images: true
chat.points.show-button: true
layout.portrait: false
layout.portrait-threshold: 1.25
layout.use-portrait: false
layout.portrait-min-chat: false
chat.points.show-rewards: true
chat.bits.show-pinned: false
chat.emote-menu.shortcut: false
chat.mru.enabled: true
ffzap.core.highlight_sound_prevent_own_channel: false
chat.subs.show: 3
chat.subs.compact: false
chat.extra-timestamps: true
chat.tab-complete.limit-results: false
chat.tab-complete.matching: 1
chat.tab-complete.ffz-emotes: true
chat.tab-complete.emoji: true
chat.tab-complete.prioritize-favorites: false
chat.tab-complete.prioritize-prefix-matches: true
tooltip.emote-images.animated: true
tooltip.emote-images: true
tooltip.emote-sources: true
tooltip.badge-images: true
chat.rich.all-links: true
chat.subs.merge-gifts: 1000
chat.subs.merge-gifts-visibility: false
chat.filtering.display-mod-action: 0
tooltip.rich-links: true
tooltip.link-interaction: true
ffzap.betterttv.pro_emoticons: true
chat.points.auto-rewards: true
chat.bits.stack: 0
chat.bits.cheer-notice: false
Itchyfantastico commented 6 months ago

Same issue here since a few weeks. It happens with Opera GX and with Brave Browser too.

Furthermore nothing happens if I click on the emote icon to the right.

RYJASM commented 6 months ago

I have also been having this issue for a few weeks. Fullscreen chat is basically UN-useable for chatting. Colon auto complete doesn't work for emotes. Pressing enter adds a new line instead of sending the message. It's a broken mess.

RYJASM commented 5 months ago

The emote menu, emote autocomplete and messaging is still broken. Mac OS and Windows 11, Chrome latest versions on both.

krompus commented 1 month ago

Still unusable, Firefox and Chrome, Windows and Linux.

RYJASM commented 1 month ago

Can confirm. Full screen chat is still utterly broken.

SirStendec commented 1 month ago

I wanted to comment on this, since it's been open for a while.

This happened because of a change to the version of React. Previously, React was perfectly happy with letting me move a DOM node to a new parent element while maintaining its reactivity.

That no longer works, which is why pretty much everything ends up breaking.

To fix this, I need to either switch to a pure-CSS solution for making chat appear, which isn't feasible since it isn't within the fullscreen root. Alternatively, React has a portal system to allow you to re-render an element into another element. I have been experimenting with this, but something about the chat tree keeps breaking whenever I try.

Just haven't gotten it working yet, though not for lack of trying.

RYJASM commented 1 month ago

I wanted to comment on this, since it's been open for a while.

This happened because of a change to the version of React. Previously, React was perfectly happy with letting me move a DOM node to a new parent element while maintaining its reactivity.

That no longer works, which is why pretty much everything ends up breaking.

To fix this, I need to either switch to a pure-CSS solution for making chat appear, which isn't feasible since it isn't within the fullscreen root. Alternatively, React has a portal system to allow you to re-render an element into another element. I have been experimenting with this, but something about the chat tree keeps breaking whenever I try.

Just haven't gotten it working yet, though not for lack of trying.

Thank you for looking into this. If you could override the fullscreen button to use a different element, below is a proof of concept for that, minus dragging controls and probably some other clean up. I full screen the div containing both the main element (video) and right sidebar (chat) and apply some styles to overlay the right sidebar over the other layers.

image


<script>
// generic full screen handler
function fullScreen(element) {
    if(element.requestFullScreen) {
      element.requestFullScreen();
    } else if(element.webkitRequestFullScreen ) {
      element.webkitRequestFullScreen();
    } else if(element.mozRequestFullScreen) {
      element.mozRequestFullScreen();
    }
}
// full screen the div containing both the video container and chat container
fullScreen(document.querySelector("div:has(> main)"));
</script>

<style>
// max top layer the divs that contain the right column, may not be needed, could need to be changed
:has(.right-column) {
    z-index: 9000 !important;
}
// position the right column (chat) over the window area
// could position/size this using javascript applied inline style css variables for top/left, etc
.right-column {
   position: fixed;
   top: 200px !important;
   left: calc(80% - 30rem);
   right: auto !important;
   height: 70rem !important;
   max-height: 80%;
   display: block;
}
// hide everything else
.side-nav,
.channel-root__info,
.channel-root__info--with-chat,
[data-a-target="top-nav-container"] {
   display: none !important;
}
// make the video and video containers fill the window
.persistent-player,
.video-player__container--resize-calc {
   position: fixed !important;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   max-height: 100% !important;
   max-width: 100% !important;
   height: 100% !important;
   width: 100% !important;
   z-index: 5000 !important;
}
</style>
SirStendec commented 1 month ago

I haven't looked into changing the fullscreenElement target yet, but that's probably not an awful approach. Just depends on how well I can convince the player that yes, it's really in fullscreen mode.

RYJASM commented 1 month ago

I haven't looked into changing the fullscreenElement target yet, but that's probably not an awful approach. Just depends on how well I can convince the player that yes, it's really in fullscreen mode.

Unless something else depends on knowing the player is fullscreen, you could just scope those rules by toggling a class on the html element when the overridden fullscreen function runs. Seems to work as if it's full screen with those rules.