-
Notifications
You must be signed in to change notification settings - Fork 4.6k
🪟 🎨 Streams table design pass [with fix] #19431
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
Merged
teallarson
merged 9 commits into
master
from
revert-19397-revert-18908-teal/streams-table-design-pass
Nov 16, 2022
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f8692d9
Revert "Revert "🪟 🎨 Streams table design pass (#18908)" (#19397)"
teallarson 182ad35
remove min-width 0 that broke the table
teallarson 277d12e
Update airbyte-webapp/src/components/connection/CatalogTree/next/Cata…
teallarson fe83949
fix styling for master table with (padding)
teallarson 0a10b86
fix alignment somewhat on master view
teallarson 11ac54a
fix padding differences between old/new tables
teallarson 4989c35
fix icon alignment in new table rows
teallarson 5179c21
Merge branch 'master' into revert-19397-revert-18908-teal/streams-tab…
teallarson 9d916f5
update snapshots
teallarson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra div is because i fixed some bad alignment in the header