From 8ee38ee64461c2bea367ac9781550813ade4c87b Mon Sep 17 00:00:00 2001 From: Veronica Dip Date: Mon, 17 Jul 2023 06:39:16 -0300 Subject: [PATCH] MM-53564 : Multi-line channel header preview is narrow on web (#24029) --- .../channel_header.test.tsx.snap | 32 ------------------- .../channel_header/channel_header.tsx | 11 +------ 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap b/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap index 876556517dd09..98705ab87d825 100644 --- a/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap +++ b/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap @@ -191,7 +191,6 @@ exports[`components/ChannelHeader should match snapshot with last active display > { @@ -122,7 +121,6 @@ class ChannelHeader extends React.PureComponent { this.headerOverlayRef = React.createRef(); this.state = { - popoverOverlayWidth: 0, showChannelHeaderPopover: false, leftOffset: 0, topOffset: 0, @@ -246,12 +244,6 @@ class ChannelHeader extends React.PureComponent { } }; - setPopoverOverlayWidth = () => { - const headerDescriptionRect = this.headerDescriptionRef.current?.getBoundingClientRect(); - const ellipsisWidthAdjustment = 10; - this.setState({popoverOverlayWidth: (headerDescriptionRect?.width ?? 0) + ellipsisWidthAdjustment}); - }; - handleFormattedTextClick = (e: MouseEvent) => handleFormattedTextClick(e, this.props.currentRelativeTeamUrl); renderCustomStatus = () => { @@ -536,7 +528,7 @@ class ChannelHeader extends React.PureComponent { id='header-popover' popoverStyle='info' popoverSize='lg' - style={{maxWidth: `${this.state.popoverOverlayWidth}px`, transform: `translate(${this.state.leftOffset}px, ${this.state.topOffset}px)`}} + style={{transform: `translate(${this.state.leftOffset}px, ${this.state.topOffset}px)`}} placement='bottom' className={classNames('channel-header__popover', {'chanel-header__popover--lhs_offset': this.props.hasMoreThanOneTeam})} > @@ -604,7 +596,6 @@ class ChannelHeader extends React.PureComponent { rootClose={true} target={this.headerDescriptionRef.current as React.ReactInstance} ref={this.headerOverlayRef} - onEnter={this.setPopoverOverlayWidth} onHide={() => this.setState({showChannelHeaderPopover: false})} > {popoverContent}