Skip to content

Commit e4e457f

Browse files
tweaks
1 parent 0980651 commit e4e457f

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

packages/components/modules/messages/CreateChatRoomList/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ const CreateChatRoomList: FC<CreateChatRoomListProps> = ({
102102
<Virtuoso
103103
data={profiles}
104104
itemContent={(_index, item) => renderItem(item)}
105-
style={{ scrollbarWidth: 'none' }}
105+
// TODO: look for a better way to calculate the height, it doesn't consider different types of headers
106+
style={{ scrollbarWidth: 'none', maxHeight: 'calc(100vh - 72px - 57px - 61px - 72px)' }}
106107
components={{
107108
Footer: renderLoadingState,
108109
}}

packages/components/modules/messages/CreateGroup/ConnectionsList/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const ConnectionsList: FC<ConnectionsListProps> = ({
4545
<Virtuoso
4646
data={profiles}
4747
itemContent={(_index, item) => renderItem(item)}
48-
style={{ scrollbarWidth: 'none' }}
48+
style={{ scrollbarWidth: 'none', maxHeight: '250px' }}
4949
components={{
5050
Footer: renderLoadingState,
5151
}}

packages/components/modules/messages/CreateGroup/index.tsx

+11-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ import {
3333
DEFAULT_IMAGE_MAX_SIZE,
3434
FORM_VALUE,
3535
} from './constants'
36-
import { HeaderContainer, SearchbarContainer, UploadProfileContainer } from './styled'
36+
import {
37+
HeaderContainer,
38+
ProfilesContainer,
39+
SearchbarContainer,
40+
UploadProfileContainer,
41+
} from './styled'
3742
import { CreatGroupUpload, CreateGroupProps } from './types'
3843
import { getImageUrl } from './utils'
3944

@@ -281,7 +286,7 @@ const CreateGroup: FC<CreateGroupProps> = ({
281286
/>
282287
</Box>
283288
</Box>
284-
<Box height="100%" width="100%" sx={{ overflowY: 'auto', scrollbarWidth: 'none' }}>
289+
<ProfilesContainer>
285290
<SearchbarContainer>
286291
<Searchbar
287292
name="search"
@@ -304,7 +309,9 @@ const CreateGroup: FC<CreateGroupProps> = ({
304309
>
305310
Members
306311
</Typography>
307-
{participants.map((member) => renderItem(member, true))}
312+
<Box maxHeight={250} overflow="auto" sx={{ scrollbarWidth: 'none' }}>
313+
{participants.map((member) => renderItem(member, true))}
314+
</Box>
308315
</Box>
309316
<Box
310317
role="list"
@@ -329,7 +336,7 @@ const CreateGroup: FC<CreateGroupProps> = ({
329336
{...ConnectionsListProps}
330337
/>
331338
</Box>
332-
</Box>
339+
</ProfilesContainer>
333340
</>
334341
)
335342
}

packages/components/modules/messages/CreateGroup/styled.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,14 @@ export const UploadProfileContainer = styled(Box)(({ theme }) => ({
2424
gap: theme.spacing(2),
2525
padding: theme.spacing(1.5),
2626
}))
27+
28+
export const ProfilesContainer = styled(Box)(({ theme }) => ({
29+
height: '100%',
30+
width: '100%',
31+
overflowY: 'auto',
32+
scrollbarWidth: 'none',
33+
[theme.breakpoints.down('sm')]: {
34+
// TODO: look for a better way to calculate the height, it doesn't consider different types of headers
35+
height: `calc(100vh - 72px - 57px - 305px)`,
36+
},
37+
}))

0 commit comments

Comments
 (0)