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

Move connection delete notice out of banner #14882

Merged
merged 2 commits into from
Jul 20, 2022
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 @@ -7,10 +7,6 @@
flex-direction: column;
}

.headerError {
padding-top: 25px;
}

.content {
overflow-y: auto;
padding-top: 17px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import classnames from "classnames";
import React from "react";

import styles from "./MainPageWithScroll.module.scss";
Expand All @@ -8,17 +7,15 @@ import styles from "./MainPageWithScroll.module.scss";
* @param pageTitle the title shown on the page
*/
interface MainPageWithScrollProps {
error?: React.ReactNode;
headTitle?: React.ReactNode;
pageTitle?: React.ReactNode;
children?: React.ReactNode;
}

const MainPageWithScroll: React.FC<MainPageWithScrollProps> = ({ error, headTitle, pageTitle, children }) => {
const MainPageWithScroll: React.FC<MainPageWithScrollProps> = ({ headTitle, pageTitle, children }) => {
return (
<div className={styles.page}>
{error}
<div className={classnames({ [styles.headerError]: !!error })}>
<div>
{headTitle}
{pageTitle}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { Suspense, useState } from "react";
import { Navigate, Route, Routes, useParams } from "react-router-dom";

import { LoadingPage, MainPageWithScroll } from "components";
import { AlertBanner } from "components/base/Banner/AlertBanner";
import HeadTitle from "components/HeadTitle";

import { getFrequencyConfig } from "config/utils";
Expand Down Expand Up @@ -70,9 +69,6 @@ const ConnectionItemPage: React.FC = () => {
onStatusUpdating={setStatusUpdating}
/>
}
error={
isConnectionDeleted ? <AlertBanner alertType="connectionDeleted" id="connection.connectionDeletedView" /> : null
}
>
<Suspense fallback={<LoadingPage />}>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@use "../../../../../scss/variables" as vars;

.connectionDeleted {
max-width: vars.$width-modal-md;
margin: vars.$spacing-lg auto;
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { faTrash } from "@fortawesome/free-solid-svg-icons";
import React from "react";
import { FormattedMessage } from "react-intl";
import styled from "styled-components";

import { H6 } from "components";
import { InfoBox } from "components/InfoBox";
import StepsMenu from "components/StepsMenu";

import { ConnectionStatus, DestinationRead, SourceRead, WebBackendConnectionRead } from "core/request/AirbyteClient";
import useRouter from "hooks/useRouter";

import { ConnectionSettingsRoutes } from "../ConnectionSettingsRoutes";
import ConnectionName from "./ConnectionName";
import styles from "./ConnectionPageTitle.module.scss";
import { StatusMainInfo } from "./StatusMainInfo";

interface ConnectionPageTitleProps {
Expand Down Expand Up @@ -74,6 +77,11 @@ const ConnectionPageTitle: React.FC<ConnectionPageTitleProps> = ({

return (
<Title>
{connection.status === ConnectionStatus.deprecated && (
<InfoBox className={styles.connectionDeleted} icon={faTrash}>
<FormattedMessage id="connection.connectionDeletedView" />
</InfoBox>
)}
<H6 center bold highlighted>
<FormattedMessage id="connection.title" />
</H6>
Expand Down