Skip to content

Show warning for Alpha and Beta connectors #10319

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
merged 8 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from 7 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 @@ -35,7 +35,7 @@ const AdditionMessage = styled.span`
`;

const LabeledToggle: React.FC<IProps> = (props) => (
<ToggleContainer>
<ToggleContainer className={props.className}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Is this a left over, or something that is fixing something?

{props.checkbox ? (
<CheckBox {...props} id={`toggle-${props.name}`} />
) : (
Expand Down
3 changes: 2 additions & 1 deletion airbyte-webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"connector.releaseStage.beta": "beta",
"connector.releaseStage.custom": "custom",
"connector.releaseStage.generally_available": "generally available",

"connector.connectorsInDevelopment.alpha": "<b>Alpha connectors</b> are in development. We strongly discourage production use cases and do not offer support SLAs. The release may not be feature complete and breaking changes may be introduced.",
"connector.connectorsInDevelopment.beta": "<b>Beta connectors</b> are considered stable and reliable with no backwards incompatible changes but has yet to be used by a larger group of users so we expect there to be some small issues and bugs to iron out.",
"credits.credits": "Credits",
"credits.whatAreCredits": "What are credits?",
"credits.buyCredits": "+ Buy credits",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useField } from "formik";
import { components } from "react-select";
import { MenuListComponentProps } from "react-select/src/components/Menu";
import styled from "styled-components";
import WarningMessage from "../WarningMessage";

import {
ControlLabels,
Expand Down Expand Up @@ -214,6 +215,11 @@ const ConnectorServiceTypeControl: React.FC<{
documentationUrl={documentationUrl}
/>
)}
{selectedService &&
(selectedService.releaseStage === ReleaseStage.ALPHA ||
selectedService.releaseStage === ReleaseStage.BETA) && (
<WarningMessage stage={selectedService.releaseStage} />
)}
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from "react";
import { FormattedHTMLMessage } from "react-intl";
import styled from "styled-components";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons";

const Content = styled.div`
display: flex;
flex-direction: row;
padding: 13px 20px;
border: 1px solid ${({ theme }) => theme.redColor};
border-radius: 8px;
font-size: 12px;
line-height: 18px;
white-space: break-spaces;
margin-top: 16px;
`;

const Exclamation = styled(FontAwesomeIcon)`
font-size: 20px;
margin-right: 12px;
color: ${({ theme }) => theme.redColor};
`;

type WarningMessageProps = {
stage: string;
};

const WarningMessage: React.FC<WarningMessageProps> = ({ stage }) => {
return (
<Content>
<Exclamation icon={faExclamationCircle} />
<div>
<FormattedHTMLMessage
id={`connector.connectorsInDevelopment.${stage}`}
/>
</div>
</Content>
);
};

export default WarningMessage;