Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ComposerBoxPopup Items alignment #29320

Merged
merged 2 commits into from
Jun 2, 2023
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
4 changes: 2 additions & 2 deletions apps/meteor/app/ui-message/client/popup/ComposerBoxPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ const ComposerBoxPopup = <

return (
<Box className='message-popup-position' position='relative'>
<Tile className='message-popup' padding={0} role='menu' mbe='x8' aria-labelledby={id}>
<Tile className='message-popup' padding={0} role='menu' mbe='x8' overflow='hidden' aria-labelledby={id}>
{title && (
<Box bg='tint' pi='x16' pb='x8' id={id}>
{title}
</Box>
)}
<Box pb='x8' maxHeight='x320'>
{!isLoading && itemsFlat.length === 0 && <Option>{t('No_results_found')}</Option>}
{isLoading && <OptionSkeleton />}
{itemsFlat.map((item, index) => {
return (
<Option
Expand All @@ -81,7 +82,6 @@ const ComposerBoxPopup = <
</Option>
);
})}
{isLoading && <OptionSkeleton />}
</Box>
</Tile>
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { OptionColumn, OptionContent } from '@rocket.chat/fuselage';
import { OptionColumn, OptionContent, OptionDescription, OptionInput } from '@rocket.chat/fuselage';

export type ComposerBoxPopupSlashCommandProps = {
_id: string;
Expand All @@ -10,10 +10,12 @@ export type ComposerBoxPopupSlashCommandProps = {
const ComposerPopupSlashCommand = ({ _id, description, params }: ComposerBoxPopupSlashCommandProps) => {
return (
<>
<OptionContent>
{_id} <OptionDescription>{params}</OptionDescription>
</OptionContent>
<OptionColumn>
<strong>{_id}</strong> {params}
<OptionInput>{description}</OptionInput>
</OptionColumn>
<OptionContent>{description}</OptionContent>
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from '@rocket.chat/ui-contexts';
import { OptionAvatar, OptionColumn, OptionContent } from '@rocket.chat/fuselage';
import { OptionAvatar, OptionColumn, OptionContent, OptionInput } from '@rocket.chat/fuselage';

import UserAvatar from '../../../../../../client/components/avatar/UserAvatar';
import ReactiveUserStatus from '../../../../../../client/components/UserStatus/ReactiveUserStatus';
Expand Down Expand Up @@ -42,8 +42,16 @@ const ComposerBoxPopupUser = ({ _id, system, username, name, nickname, outside,
</OptionContent>
)}

{outside && <OptionColumn>{t('Not_in_channel')}</OptionColumn>}
{suggestion && <OptionColumn>{t('Suggestion_from_recent_messages')}</OptionColumn>}
{outside && (
<OptionColumn>
<OptionInput>{t('Not_in_channel')}</OptionInput>
</OptionColumn>
)}
{suggestion && (
<OptionColumn>
<OptionInput>{t('Suggestion_from_recent_messages')}</OptionInput>
</OptionColumn>
)}
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ export const useComposerBoxPopup = <T extends { _id: string; sort?: number }>({
ariaActiveDescendant,
popup,
select,

suspended,

commandsRef,
callbackRef,
};
Expand Down