Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions apps/meteor/client/views/room/body/LeaderBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,19 @@ const LeaderBar = ({ _id, name, username, visible, onAvatarClick, triggerProps }
}

const roomLeaderStyle = css`
position: absolute;
position: relative;
z-index: 9;
right: 0;
left: 0;

visibility: visible;

transition: transform 0.15s cubic-bezier(0.5, 0, 0.1, 1), visibility 0.15s cubic-bezier(0.5, 0, 0.1, 1);
display: flex;

&.animated-hidden {
visibility: hidden;

transform: translateY(-100%);
display: none !important;
}
`;

return (
<Box
display='flex'
backgroundColor='light'
color='default'
pi={24}
Expand Down
62 changes: 30 additions & 32 deletions apps/meteor/client/views/room/body/RoomBody.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IUser } from '@rocket.chat/core-typings';
import { Box, Margins } from '@rocket.chat/fuselage';
import { Box } from '@rocket.chat/fuselage';
import { useMergedRefs } from '@rocket.chat/fuselage-hooks';
import { usePermission, useRole, useSetting, useTranslation, useUser, useUserPreference } from '@rocket.chat/ui-contexts';
import type { MouseEventHandler, ReactElement, UIEvent } from 'react';
Expand Down Expand Up @@ -226,29 +226,37 @@ const RoomBody = (): ReactElement => {
<div className='messages-container-main' ref={wrapperBoxRefs} {...fileUploadTriggerProps}>
<DropTargetOverlay {...fileUploadOverlayProps} />
<Box position='absolute' w='full'>
<Margins block={8}>
<div className={['container-bars', uploads.length && 'show'].filter(isTruthy).join(' ')}>
{uploads.map((upload) => (
<UploadProgressIndicator
key={upload.id}
id={upload.id}
name={upload.name}
percentage={upload.percentage}
error={upload.error instanceof Error ? upload.error.message : undefined}
onClose={handleUploadProgressClose}
/>
))}
</div>
{Boolean(unread) && (
<UnreadMessagesIndicator
count={unread}
onJumpButtonClick={handleUnreadBarJumpToButtonClick}
onMarkAsReadButtonClick={handleMarkAsReadButtonClick}
{roomLeader ? (
<LeaderBar
_id={roomLeader._id}
username={roomLeader.username}
name={roomLeader.name}
visible={!hideLeaderHeader}
onAvatarClick={handleOpenUserCard}
triggerProps={triggerProps}
/>
) : null}
<div className={['container-bars', uploads.length && 'show'].filter(isTruthy).join(' ')}>
{uploads.map((upload) => (
<UploadProgressIndicator
key={upload.id}
id={upload.id}
name={upload.name}
percentage={upload.percentage}
error={upload.error instanceof Error ? upload.error.message : undefined}
onClose={handleUploadProgressClose}
/>
)}
))}
</div>
{Boolean(unread) && (
<UnreadMessagesIndicator
count={unread}
onJumpButtonClick={handleUnreadBarJumpToButtonClick}
onMarkAsReadButtonClick={handleMarkAsReadButtonClick}
/>
)}

<BubbleDate ref={bubbleRef} {...bubbleDate} />
</Margins>
<BubbleDate ref={bubbleRef} {...bubbleDate} />
</Box>

<div className={['messages-box', roomLeader && !hideLeaderHeader && 'has-leader'].filter(isTruthy).join(' ')}>
Expand All @@ -263,16 +271,6 @@ const RoomBody = (): ReactElement => {
<div>{t('You_must_join_to_view_messages_in_this_channel')}</div>
</div>
) : null}
{roomLeader ? (
<LeaderBar
_id={roomLeader._id}
username={roomLeader.username}
name={roomLeader.name}
visible={!hideLeaderHeader}
onAvatarClick={handleOpenUserCard}
triggerProps={triggerProps}
/>
) : null}
<div
className={[
'wrapper',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ type UnreadMessagesIndicatorProps = {
};

const indicatorStyle = css`
/* position: absolute;
top: 8px;
left: 50%;
translate: -50%; */
position: relative;
display: flex;
justify-content: center;
Expand All @@ -25,7 +21,7 @@ const UnreadMessagesIndicator = ({ count, onJumpButtonClick, onMarkAsReadButtonC
const t = useTranslation();

return (
<Box className={indicatorStyle}>
<Box className={indicatorStyle} mbs={8}>
<Bubble
onClick={onJumpButtonClick}
onDismiss={onMarkAsReadButtonClick}
Expand Down