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

Remove datasource and links to docs #13

Merged
merged 2 commits into from
Apr 12, 2024
Merged
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
96 changes: 4 additions & 92 deletions packages/studio-base/src/components/DataSourceDialog/Start.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ const useStyles = makeStyles()((theme) => ({
recentSourceSecondary: {
color: "inherit",
},
featureList: {
paddingLeft: theme.spacing(1.5),

"li:not(:last-of-type)": {
marginBottom: theme.spacing(0.5),
},
},
}));

type DataSourceOptionProps = {
Expand Down Expand Up @@ -167,7 +160,7 @@ function SidebarItems(props: {
onSelectView: (newValue: DataSourceDialogItem) => void;
}): JSX.Element {
const { onSelectView } = props;
const { currentUserType, signIn } = useCurrentUser();
const { currentUserType } = useCurrentUser();
const analytics = useAnalytics();
const { classes } = useStyles();
const { t } = useTranslation("openDialog");
Expand Down Expand Up @@ -197,6 +190,7 @@ function SidebarItems(props: {
href="https://docs.foxglove.dev/docs/connecting-to-data/introduction"
target="_blank"
className={classes.button}
disabled
onClick={() => {
void analytics.logEvent(AppEvent.DIALOG_CLICK_CTA, {
user: currentUserType,
Expand Down Expand Up @@ -292,64 +286,7 @@ function SidebarItems(props: {
const sidebarItems: SidebarItem[] = useMemo(() => {
switch (currentUserType) {
case "unauthenticated":
return [
...freeUser,
{
id: "collaborate",
title: t("collaborateTitle"),
text: (
<ul className={classes.featureList}>
<li>{t("secureStorageOfData")}</li>
<li>{t("convenientWebInterface")}</li>
<li>{t("canBeShared")}</li>
</ul>
),
actions: signIn ? (
<>
<Button
className={classes.button}
variant="outlined"
onClick={() => {
void analytics.logEvent(AppEvent.DIALOG_CLICK_CTA, {
user: currentUserType,
cta: "create-account",
});
signIn();
}}
>
{t("createAFreeAccount")}
</Button>
<Button
className={classes.button}
onClick={() => {
void analytics.logEvent(AppEvent.DIALOG_CLICK_CTA, {
user: currentUserType,
cta: "sign-in",
});
signIn();
}}
>
{t("signIn")}
</Button>
</>
) : (
<Button
href="https://foxglove.dev/data-platform"
target="_blank"
className={classes.button}
variant="outlined"
onClick={() => {
void analytics.logEvent(AppEvent.DIALOG_CLICK_CTA, {
user: currentUserType,
cta: "create-account",
});
}}
>
{t("learnMore")}
</Button>
),
},
];
return [...freeUser];
case "authenticated-free":
return [
{
Expand Down Expand Up @@ -389,16 +326,7 @@ function SidebarItems(props: {
case "authenticated-enterprise":
return teamOrEnterpriseUser;
}
}, [
analytics,
classes.button,
classes.featureList,
currentUserType,
freeUser,
signIn,
teamOrEnterpriseUser,
t,
]);
}, [analytics, classes.button, currentUserType, freeUser, teamOrEnterpriseUser, t]);

return (
<>
Expand Down Expand Up @@ -444,21 +372,6 @@ export default function Start(): JSX.Element {
void analytics.logEvent(AppEvent.DIALOG_SELECT_VIEW, { type: "local" });
},
},
{
key: "open-url",
text: t("openUrl"),
secondaryText: t("openUrlDescription"),
icon: (
<SvgIcon fontSize="large" color="primary" viewBox="0 0 2048 2048">
<path d="M256 1920h512v128H128V0h1115l549 549v91h-640V128H256v1792zM1280 512h293l-293-293v293zm128 256q133 0 249 50t204 137 137 203 50 250q0 133-50 249t-137 204-203 137-250 50q-133 0-249-50t-204-137-137-203-50-250q0-133 50-249t137-204 203-137 250-50zm0 1152q21 0 37-14t28-38 21-53 15-57 9-53 6-41h-230q2 14 5 39t10 53 16 58 21 52 27 39 35 15zm126-384q1-32 1-64t1-64q0-63-3-128h-250q-3 65-3 128 0 64 3 128h251zm-638-128q0 32 4 64t12 64h243q-3-64-3-128 0-63 3-128H912q-8 32-12 64t-4 64zm512-512q-19 0-34 15t-27 39-21 53-15 57-10 53-6 39h225q-2-13-6-37t-11-53-16-58-20-54-27-39-32-15zm253 384q3 65 3 128v64q0 32-2 64h242q8-32 12-64t4-64q0-32-4-64t-12-64h-243zm190-128q-43-75-108-131t-145-88q21 52 32 107t19 112h202zm-637-218q-78 32-142 88t-107 130h200q13-111 49-218zm-249 730q42 73 106 129t142 88q-21-51-31-106t-17-111H965zm642 215q77-32 139-87t105-128h-198q-5 51-15 109t-31 106z" />
</SvgIcon>
),
iconProps: { iconName: "FileASPX" },
href: "https://console.foxglove.dev/recordings",
onClick: () => {
void analytics.logEvent(AppEvent.DIALOG_SELECT_VIEW, { type: "data-platform" });
},
},
{
key: "open-connection",
text: t("openConnection"),
Expand Down Expand Up @@ -494,7 +407,6 @@ export default function Start(): JSX.Element {
secondaryText={item.secondaryText}
icon={item.icon}
onClick={item.onClick}
href={item.href}
target="_blank"
/>
))}
Expand Down
Loading