forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Handling filename overflow in mobile viewports (twentyhq#7364)
Fixes twentyhq#7330 Fixes twentyhq#7516 <div style="display: flex"> <img style="max-width:50%" src="https://github.com/user-attachments/assets/51027a9d-8745-4cc7-9f17-4000e3615e44"/> <img style="max-width:50%" src="https://github.com/user-attachments/assets/827f69ba-c581-402f-9498-6b1a4dde7b69"/> </div> --------- Co-authored-by: sid0-0 <[email protected]> Co-authored-by: Lucas Bordeau <[email protected]>
- Loading branch information
1 parent
9320ac4
commit f1303a5
Showing
10 changed files
with
109 additions
and
102 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/twenty-front/src/modules/activities/components/ActivityList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Card } from '@/ui/layout/card/components/Card'; | ||
import styled from '@emotion/styled'; | ||
|
||
const StyledList = styled(Card)` | ||
& > :not(:last-child) { | ||
border-bottom: 1px solid ${({ theme }) => theme.border.color.light}; | ||
} | ||
width: calc(100% - 2px); | ||
overflow: auto; | ||
`; | ||
|
||
export const ActivityList = ({ children }: React.PropsWithChildren) => { | ||
return <StyledList>{children}</StyledList>; | ||
}; |
35 changes: 35 additions & 0 deletions
35
packages/twenty-front/src/modules/activities/components/ActivityRow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { CardContent } from '@/ui/layout/card/components/CardContent'; | ||
import styled from '@emotion/styled'; | ||
import React from 'react'; | ||
|
||
const StyledRowContent = styled(CardContent)<{ | ||
clickable?: boolean; | ||
}>` | ||
align-items: center; | ||
display: flex; | ||
gap: ${({ theme }) => theme.spacing(2)}; | ||
height: ${({ theme }) => theme.spacing(12)}; | ||
padding: ${({ theme }) => theme.spacing(0, 4)}; | ||
cursor: ${({ clickable }) => (clickable === true ? 'pointer' : 'default')}; | ||
`; | ||
|
||
export const ActivityRow = ({ | ||
children, | ||
onClick, | ||
disabled, | ||
}: React.PropsWithChildren<{ | ||
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void; | ||
disabled?: boolean; | ||
}>) => { | ||
const handleClick = (event: React.MouseEvent<HTMLDivElement>) => { | ||
if (disabled !== true) { | ||
onClick?.(event); | ||
} | ||
}; | ||
|
||
return ( | ||
<StyledRowContent onClick={handleClick} clickable={disabled !== true}> | ||
{children} | ||
</StyledRowContent> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.