Skip to content

Commit 2e4ba9c

Browse files
Remove Right-Edge Gap in Table Cell Display (#5992)
fixes #5941 ![Screenshot from 2024-06-23 17-24-24](https://github.com/twentyhq/twenty/assets/59247136/ae67603a-824d-4e6b-b873-2d58e6296341) --------- Co-authored-by: Lucas Bordeau <[email protected]>
1 parent e8f386c commit 2e4ba9c

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

packages/twenty-front/src/modules/object-record/record-table/components/RecordTable.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ const StyledTable = styled.table<{
5353
color: ${({ theme }) => theme.font.color.primary};
5454
border-right: 1px solid ${({ theme }) => theme.border.color.light};
5555
56+
padding: 0;
57+
5658
text-align: left;
5759
5860
:last-child {

packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellContainer.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
.cell-base-container-soft-focus {
2828
background: var(--twentycrm-background-transparent-secondary);
2929
border-radius: var(--twentycrm-border-radius-sm);
30-
outline: 1px solid var(--twentycrm-font-color-extra-light);
30+
border: 1px solid var(--twentycrm-font-color-extra-light);
3131
}
3232

packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDisplayContainer.module.css

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
display: flex;
44
height: 100%;
55
overflow: hidden;
6-
padding-left: 8px;
7-
padding-right: 4px;
6+
padding-left: 6px;
87
width: 100%;
98
}
109

11-
.cell-display-outer-container-soft-focus {
12-
background: var(--twentycrm-background-transparent-secondary);
13-
border-radius: var(--twentycrm-border-radius-sm);
14-
outline: 1px solid var(--twentycrm-font-color-extra-light);
10+
.cell-display-with-soft-focus {
11+
margin: -1px;
1512
}
1613

1714
.cell-display-inner-container {

packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDisplayContainer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const RecordTableCellDisplayContainer = ({
2323
onClick={onClick}
2424
className={clsx({
2525
[styles.cellDisplayOuterContainer]: true,
26-
[styles.cellDisplayOuterContainerSoftFocus]: softFocus,
26+
[styles.cellDisplayWithSoftFocus]: softFocus,
2727
})}
2828
ref={scrollRef}
2929
>

packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDisplayMode.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import { RecordTableCellDisplayContainer } from './RecordTableCellDisplayContain
44

55
export const RecordTableCellDisplayMode = ({
66
children,
7-
}: React.PropsWithChildren<unknown>) => {
7+
softFocus,
8+
}: React.PropsWithChildren<{ softFocus?: boolean }>) => {
89
const isEmpty = useIsFieldEmpty();
910

1011
if (isEmpty) {
1112
return <></>;
1213
}
1314

1415
return (
15-
<RecordTableCellDisplayContainer>
16+
<RecordTableCellDisplayContainer softFocus={softFocus}>
1617
{children}
1718
</RecordTableCellDisplayContainer>
1819
);

packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellSoftFocusMode.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export const RecordTableCellSoftFocusMode = ({
159159
<RecordTableCellDisplayContainer
160160
onClick={handleClick}
161161
scrollRef={scrollRef}
162+
softFocus
162163
>
163164
{editModeContentOnly ? editModeContent : nonEditModeContent}
164165
</RecordTableCellDisplayContainer>

0 commit comments

Comments
 (0)