-
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.
New Streams Table Column Sizing Fix (#20141)
* Better flex handling * flex scaling off * flex! * Added comment * Cleanup Cell props * Re-adding the padding for most use cases. This "fixes" the old table. * Fixing bold table header * Move scrolling to the correct level * Further styling fixes * Everything is working * Added new table cell so we don't use the old one * cleanup * Everything is working on the new table??? * Fixing header * Snapshots * Consolidate checkbox styles * Cleanup * Fixing old table * Don't want padding on new table * Overflow and padding changes
- Loading branch information
1 parent
23a1110
commit 045323d
Showing
18 changed files
with
483 additions
and
427 deletions.
There are no files selected for viewing
286 changes: 143 additions & 143 deletions
286
...e-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
6 changes: 2 additions & 4 deletions
6
airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeBody.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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
.container { | ||
margin-bottom: 29px; | ||
max-height: 600px; | ||
overflow-y: auto; | ||
overflow: unset; | ||
min-width: fit-content; | ||
|
||
--webkit-overlay: true; | ||
|
||
width: 100%; | ||
} |
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
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
27 changes: 27 additions & 0 deletions
27
airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableCell.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,27 @@ | ||
$xsmall: 20px; | ||
$small: 50px; | ||
$medium: 120px; | ||
$large: 200px; | ||
|
||
.tableCell { | ||
flex: 1 0 $medium; | ||
min-width: $medium; | ||
word-break: break-word; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
|
||
&.xsmall { | ||
flex-basis: $xsmall; | ||
min-width: $xsmall; | ||
} | ||
|
||
&.small { | ||
flex-basis: $small; | ||
min-width: $small; | ||
} | ||
|
||
&.large { | ||
flex-basis: $large; | ||
min-width: $large; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableCell.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import classNames from "classnames"; | ||
import React from "react"; | ||
|
||
import styles from "./CatalogTreeTableCell.module.scss"; | ||
|
||
type Sizes = "xsmall" | "small" | "medium" | "large"; | ||
|
||
interface CatalogTreeTableCellProps { | ||
size?: Sizes; | ||
className?: string; | ||
} | ||
|
||
// This lets us avoid the eslint complaint about unused styles | ||
const sizeMap: Record<Sizes, string> = { | ||
xsmall: styles.xsmall, | ||
small: styles.small, | ||
medium: styles.medium, | ||
large: styles.large, | ||
}; | ||
|
||
export const CatalogTreeTableCell: React.FC<React.PropsWithChildren<CatalogTreeTableCellProps>> = ({ | ||
size = "medium", | ||
className, | ||
children, | ||
}) => { | ||
return <div className={classNames(styles.tableCell, className, sizeMap[size])}>{children}</div>; | ||
}; |
20 changes: 7 additions & 13 deletions
20
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 |
---|---|---|
@@ -1,29 +1,23 @@ | ||
@use "scss/_colors"; | ||
@use "scss/_variables"; | ||
@forward "./CatalogTreeTableRow.module.scss"; | ||
|
||
.cellText { | ||
color: colors.$grey; | ||
} | ||
|
||
.headerContainer { | ||
margin: variables.$spacing-md variables.$spacing-md variables.$spacing-sm variables.$spacing-md; | ||
margin: variables.$spacing-md 0 variables.$spacing-sm 0; | ||
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}); | ||
&.newTable { | ||
overflow: unset; | ||
} | ||
} | ||
|
||
.arrowPlaceholder { | ||
width: 20px; | ||
.checkboxCell { | ||
@extend %streamRowCheckboxCell; | ||
} |
Oops, something went wrong.