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

Remove Right-Edge Gap in Table Cell Display #5992

Merged
merged 4 commits into from
Jun 24, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const StyledTable = styled.table<{
color: ${({ theme }) => theme.font.color.primary};
border-right: 1px solid ${({ theme }) => theme.border.color.light};

padding: 0;

text-align: left;

:last-child {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
.cell-base-container-soft-focus {
background: var(--twentycrm-background-transparent-secondary);
border-radius: var(--twentycrm-border-radius-sm);
outline: 1px solid var(--twentycrm-font-color-extra-light);
border: 1px solid var(--twentycrm-font-color-extra-light);
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
display: flex;
height: 100%;
overflow: hidden;
padding-left: 8px;
padding-right: 4px;
padding-left: 6px;
width: 100%;
}

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

.cell-display-inner-container {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const RecordTableCellDisplayContainer = ({
onClick={onClick}
className={clsx({
[styles.cellDisplayOuterContainer]: true,
[styles.cellDisplayOuterContainerSoftFocus]: softFocus,
[styles.cellDisplayWithSoftFocus]: softFocus,
})}
ref={scrollRef}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import { RecordTableCellDisplayContainer } from './RecordTableCellDisplayContain

export const RecordTableCellDisplayMode = ({
children,
}: React.PropsWithChildren<unknown>) => {
softFocus,
}: React.PropsWithChildren<{ softFocus?: boolean }>) => {
const isEmpty = useIsFieldEmpty();

if (isEmpty) {
return <></>;
}

return (
<RecordTableCellDisplayContainer>
<RecordTableCellDisplayContainer softFocus={softFocus}>
{children}
</RecordTableCellDisplayContainer>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const RecordTableCellSoftFocusMode = ({
<RecordTableCellDisplayContainer
onClick={handleClick}
scrollRef={scrollRef}
softFocus
>
{editModeContentOnly ? editModeContent : nonEditModeContent}
</RecordTableCellDisplayContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ export const SETTINGS_FIELD_CURRENCY_CODES: Record<
BRL: {
label: 'Brazilian real',
Icon: IconCurrencyReal,
}
},
};
Loading