-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪟 🎨 Streams table design pass (#18908)
* typography * wip * continued progress * merge cleanup * table item alignment * row styling * remove extra item * continued styling * alignment works with scrollbar * headings align with or without scrollbars * stream connection header alignment * cleanup * pill-select justify * cleanup * fix ternary logic for disabled streams rows * streams table design tweaks * make table rows flush with card edge * review cleanup, fix scroll overflow for firefox * use gap not padding * add scrollbar-gutter to rows too * use ellipsis for cell text, not wrap * fix alignment of syncCatalogField * fix text ellipses and syncmode cell width * use a div to make this col static 200px * remove debug border * scss variables cleanup
- Loading branch information
1 parent
bfa3b5c
commit a72deb1
Showing
16 changed files
with
233 additions
and
94 deletions.
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.module.scss
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
29 changes: 29 additions & 0 deletions
29
airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.module.scss
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,29 @@ | ||
@use "scss/_colors"; | ||
@use "scss/_variables"; | ||
|
||
.cellText { | ||
color: colors.$grey; | ||
} | ||
|
||
.headerContainer { | ||
margin: variables.$spacing-md variables.$spacing-md variables.$spacing-sm variables.$spacing-sm; | ||
gap: variables.$spacing-sm; | ||
overflow: hidden; | ||
scrollbar-gutter: stable; | ||
min-height: 33px; | ||
} | ||
|
||
.checkboxCell { | ||
margin-right: variables.$spacing-sm; | ||
max-width: 43px; | ||
font-size: 10px; | ||
line-height: 13px; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: flex-end; | ||
padding-left: calc(#{variables.$spacing-xl} + #{variables.$spacing-sm}); | ||
} | ||
|
||
.arrowPlaceholder { | ||
width: 20px; | ||
} |
65 changes: 36 additions & 29 deletions
65
airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.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 |
---|---|---|
@@ -1,70 +1,77 @@ | ||
import React from "react"; | ||
import { FormattedMessage } from "react-intl"; | ||
|
||
import { Cell, Header } from "components/SimpleTableComponents"; | ||
import { CheckBox } from "components/ui/CheckBox"; | ||
import { Text } from "components/ui/Text"; | ||
import { InfoTooltip, TooltipLearnMoreLink } from "components/ui/Tooltip"; | ||
|
||
import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService"; | ||
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; | ||
import { links } from "utils/links"; | ||
|
||
import styles from "./CatalogTreeTableHeader.module.scss"; | ||
|
||
const TextCell: React.FC<React.PropsWithChildren<{ flex?: number }>> = ({ flex, children }) => { | ||
return ( | ||
<Cell flex={flex}> | ||
<Text size="sm" className={styles.cellText}> | ||
{children} | ||
</Text> | ||
</Cell> | ||
); | ||
}; | ||
|
||
export const CatalogTreeTableHeader: React.FC = () => { | ||
const { mode } = useConnectionFormService(); | ||
const { onCheckAll, selectedBatchNodeIds, allChecked } = useBulkEditService(); | ||
|
||
return ( | ||
<Header> | ||
<Cell> | ||
<Header className={styles.headerContainer}> | ||
<div className={styles.checkboxCell}> | ||
{mode !== "readonly" && ( | ||
<CheckBox | ||
onChange={onCheckAll} | ||
indeterminate={selectedBatchNodeIds.length > 0 && !allChecked} | ||
checked={allChecked} | ||
/> | ||
)} | ||
</Cell> | ||
<Cell> | ||
</div> | ||
<TextCell flex={0.5}> | ||
<FormattedMessage id="sources.sync" /> | ||
</Cell> | ||
<Cell> | ||
</TextCell> | ||
{/* <TextCell> | ||
<FormattedMessage id="form.fields" /> | ||
</Cell> | ||
<Cell> | ||
</TextCell> */} | ||
<TextCell flex={1}> | ||
<FormattedMessage id="form.namespace" /> | ||
</Cell> | ||
<Cell> | ||
</TextCell> | ||
<TextCell flex={1}> | ||
<FormattedMessage id="form.streamName" /> | ||
</Cell> | ||
<Cell> | ||
</TextCell> | ||
<TextCell flex={2}> | ||
<FormattedMessage id="form.syncMode" /> | ||
<InfoTooltip> | ||
<FormattedMessage id="connectionForm.syncType.info" /> | ||
<TooltipLearnMoreLink url={links.syncModeLink} /> | ||
</InfoTooltip> | ||
</Cell> | ||
<Cell> | ||
</TextCell> | ||
<TextCell flex={1}> | ||
<FormattedMessage id="form.cursorField" /> | ||
<InfoTooltip> | ||
<FormattedMessage id="connectionForm.cursor.info" /> | ||
</InfoTooltip> | ||
</Cell> | ||
<Cell> | ||
</TextCell> | ||
<TextCell flex={1}> | ||
<FormattedMessage id="form.primaryKey" /> | ||
</Cell> | ||
<Cell /> | ||
<Cell> | ||
</TextCell> | ||
<div className={styles.arrowPlaceholder} /> | ||
<TextCell flex={1}> | ||
<FormattedMessage id="form.namespace" /> | ||
</Cell> | ||
<Cell> | ||
</TextCell> | ||
<TextCell flex={1}> | ||
<FormattedMessage id="form.streamName" /> | ||
</Cell> | ||
<Cell> | ||
<FormattedMessage id="form.syncMode" /> | ||
<InfoTooltip> | ||
<FormattedMessage id="connectionForm.syncType.info" /> | ||
<TooltipLearnMoreLink url={links.syncModeLink} /> | ||
</InfoTooltip> | ||
</Cell> | ||
</TextCell> | ||
</Header> | ||
); | ||
}; |
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.