-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 [with fix] (#19431)
* Revert "Revert "🪟 🎨 Streams table design pass (#18908)" (#19397)" This reverts commit ebbe5a9. * remove min-width 0 that broke the table * Update airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss Co-authored-by: Edmundo Ruiz Ghanem <168664+edmundito@users.noreply.github.com> * fix styling for master table with (padding) * fix alignment somewhat on master view * fix padding differences between old/new tables * fix icon alignment in new table rows * update snapshots Co-authored-by: Edmundo Ruiz Ghanem <168664+edmundito@users.noreply.github.com>
- Loading branch information
1 parent
88da35c
commit f0d331c
Showing
22 changed files
with
260 additions
and
97 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
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
13 changes: 13 additions & 0 deletions
13
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
@extend %catalogHeader; | ||
|
||
padding-top: 10px; | ||
margin-left: 155px; | ||
} | ||
|
||
.readonlyCatalogSubheader { | ||
|
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-md; | ||
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
Oops, something went wrong.