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

Fix table alignment issues in new streams table #21425

Merged
merged 5 commits into from
Jan 18, 2023
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 @@ -2,6 +2,7 @@
max-height: 600px;
overflow: unset;
min-width: fit-content;
padding-right: 15px;

--webkit-overlay: true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,21 @@ $icon-size: 15px;
flex: 2 1 547px;
}

.destination {
.destinationSection {
display: flex;
flex: 1 1 120px;
}

.destination {
display: flex;
flex: 2 1 217px;
}

.icon {
width: $icon-size;
height: $icon-size;
}

.arrowContainer {
flex: 0 0 20px;
flex: 1 0 20px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { Heading } from "components/ui/Heading";

import { useNewTableDesignExperiment } from "hooks/connection/useNewTableDesignExperiment";
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService";
import { useDestinationDefinition } from "services/connector/DestinationDefinitionService";
import { useSourceDefinition } from "services/connector/SourceDefinitionService";
import { getIcon } from "utils/imageUtils";

import styles from "./StreamConnectionHeader.module.scss";
Expand All @@ -18,26 +16,23 @@ export const StreamConnectionHeader: React.FC = () => {
const {
connection: { source, destination },
} = useConnectionFormService();
const sourceDefinition = useSourceDefinition(source.sourceDefinitionId);
const destinationDefinition = useDestinationDefinition(destination.destinationDefinitionId);
const isNewTableDesignEnabled = useNewTableDesignExperiment();
const sourceStyles = classnames(styles.connector, styles.source);
const destinationStyles = classnames(styles.connector, styles.destination);

return (
<div className={classnames(styles.container, { [styles.newTableContainer]: !!isNewTableDesignEnabled })}>
<div className={sourceStyles}>
{renderIcon(sourceDefinition.icon)}{" "}
{renderIcon(source.icon)}{" "}
<Heading as="h5" size="sm">
<FormattedMessage id="connectionForm.sourceTitle" />
</Heading>
</div>
<div className={styles.destination}>
<div className={styles.destinationSection}>
<div className={styles.arrowContainer}>
<ArrowRightIcon />
</div>
<div className={destinationStyles}>
{renderIcon(destinationDefinition.icon)}{" "}
<div className={classnames(styles.connector, styles.destination)}>
{renderIcon(destination.icon)}{" "}
<Heading as="h5" size="sm">
<FormattedMessage id="connectionForm.destinationTitle" />
</Heading>
Expand Down