Skip to content

Commit e589a84

Browse files
frano-mFran McDade
and
Fran McDade
authored
chore: update findable-ui to v14.0.0 (#4235) (#4255)
* chore: update findable-ui to v14.0.0 (#4235) * fix: anvil catalog consortium description anchor style (#4235) --------- Co-authored-by: Fran McDade <[email protected]>
1 parent e2f7f9d commit e589a84

File tree

59 files changed

+499
-613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+499
-613
lines changed

app/components/Detail/components/Consortium/components/ConsortiumDescription/components/ConsortiumDescriptionFallback/consortiumDescriptionFallback.tsx

-27
This file was deleted.

app/components/Detail/components/Consortium/components/ConsortiumDescription/consortiumDescription.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
MdxMarkdown,
33
MDXSerializeResult,
44
} from "../../../../../common/MDXMarkdown/mdxMarkdown";
5-
import { ConsortiumDescriptionFallback } from "./components/ConsortiumDescriptionFallback/consortiumDescriptionFallback";
65
import { SectionText } from "./consortiumDescription.styles";
76

87
interface ConsortiumDescriptionProps {
@@ -14,10 +13,7 @@ export const ConsortiumDescription = ({
1413
}: ConsortiumDescriptionProps): JSX.Element => {
1514
return (
1615
<SectionText component="div">
17-
<MdxMarkdown
18-
fallback={<ConsortiumDescriptionFallback />}
19-
source={source}
20-
/>
16+
<MdxMarkdown fallback="None" source={source} />
2117
</SectionText>
2218
);
2319
};

app/components/Detail/components/GeneratedMatricesTables/generatedMatricesTables.styles.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { Alert as DXAlert } from "@databiosphere/findable-ui/lib/components/common/Alert/alert";
21
import {
32
sectionMargin,
43
sectionMarginSm,
54
} from "@databiosphere/findable-ui/lib/components/common/Section/section.styles";
6-
import { textBody500 } from "@databiosphere/findable-ui/lib/styles/common/mixins/fonts";
5+
import {
6+
textBody4002Lines,
7+
textBody500,
8+
} from "@databiosphere/findable-ui/lib/styles/common/mixins/fonts";
79
import { TABLET } from "@databiosphere/findable-ui/lib/theme/common/breakpoints";
810
import styled from "@emotion/styled";
11+
import { Alert } from "@mui/material";
912

1013
export const SectionTitle = styled("h4")`
1114
${textBody500}
@@ -15,7 +18,11 @@ export const SectionTitle = styled("h4")`
1518
}
1619
`;
1720

18-
export const Alert = styled(DXAlert)`
21+
export const StyledAlert = styled(Alert)`
22+
.MuiAlert-message {
23+
${textBody4002Lines};
24+
}
25+
1926
${sectionMargin}
2027
${({ theme }) => theme.breakpoints.up(TABLET)} {
2128
${sectionMarginSm}

app/components/Detail/components/GeneratedMatricesTables/generatedMatricesTables.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { ALERT_PROPS } from "@databiosphere/findable-ui/lib/components/common/Alert/constants";
12
import { GridPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
23
import { Table } from "@databiosphere/findable-ui/lib/components/Detail/components/Table/table";
34
import { Divider } from "@mui/material";
45
import { ColumnDef } from "@tanstack/react-table";
56
import { Fragment } from "react";
67
import { GenusSpecies } from "../../../../viewModelBuilders/azul/hca-dcp/common/projectMatrixMapper/constants";
78
import { ProjectMatrixTableView } from "../../../../viewModelBuilders/azul/hca-dcp/common/projectMatrixMapper/entities";
8-
import { Alert, SectionTitle } from "./generatedMatricesTables.styles";
9+
import { SectionTitle, StyledAlert } from "./generatedMatricesTables.styles";
910

1011
interface GeneratedMatricesTablesProps<T extends object> {
1112
columns: ColumnDef<T>[];
@@ -42,9 +43,9 @@ export const GeneratedMatricesTables = <T extends object>({
4243
}
4344
)
4445
) : (
45-
<Alert icon={false} severity="info" variant="neutral">
46+
<StyledAlert {...ALERT_PROPS.FILLED_SMOKE} icon={false}>
4647
There are currently no DCP generated matrices for this project.
47-
</Alert>
48+
</StyledAlert>
4849
)}
4950
</>
5051
);

app/components/Layout/components/Content/components/Link/link.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { TypographyWordBreak } from "@databiosphere/findable-ui/lib/components/c
22
import { Link as DXLink } from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
33
import { useConfig } from "@databiosphere/findable-ui/lib/hooks/useConfig";
44
import { replaceParameters } from "@databiosphere/findable-ui/lib/utils/replaceParameters";
5+
import { useRouter } from "next/router";
56
import { SiteConfig } from "../../../../../../../site-config/common/entities";
67

78
/**
@@ -14,12 +15,14 @@ export const Link = ({
1415
}): JSX.Element => {
1516
const { children, href, ...linkProps } = props;
1617
const { config } = useConfig();
18+
const { asPath } = useRouter();
1719
const { browserURL, portalURL = "{portalURL}" } = config as SiteConfig;
1820
return (
1921
<DXLink
2022
label={<TypographyWordBreak>{children}</TypographyWordBreak>}
2123
url={encodeURI(
2224
replaceParameters(decodeURI(href), {
25+
asPath,
2326
browserURL,
2427
portalURL,
2528
})

app/components/Layout/components/Content/content.styles.ts

+5-24
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@ import styled from "@emotion/styled";
1212
const muiAlert = (props: ThemeProps) => css`
1313
.MuiAlert-root {
1414
margin: 24px 0;
15-
16-
&.MuiAlert-standardWarning {
17-
margin: 16px 0;
18-
}
15+
padding: 24px;
1916
2017
&:last-child {
2118
margin-bottom: 0;
2219
}
2320
24-
.MuiAlert-message {
25-
${textBodyLarge4002Lines(props)};
21+
.MuiAlert-icon {
22+
padding: 4px 0;
2623
}
2724
28-
.MuiAlert-message:first-of-type {
25+
.MuiAlert-message {
26+
${textBodyLarge4002Lines(props)};
2927
gap: 16px;
3028
3129
.MuiAlertTitle-root {
@@ -42,14 +40,6 @@ const muiBreadcrumbs = () => css`
4240
.MuiBreadcrumbs-li {
4341
margin: 0;
4442
45-
.MuiLink-root {
46-
text-decoration: none;
47-
48-
&:hover {
49-
text-decoration: underline;
50-
}
51-
}
52-
5343
.MuiTypography-root {
5444
margin: 0;
5545
}
@@ -58,15 +48,6 @@ const muiBreadcrumbs = () => css`
5848
`;
5949

6050
export const Content = styled.div`
61-
a {
62-
color: inherit;
63-
text-decoration: underline;
64-
65-
&:hover {
66-
text-decoration: none;
67-
}
68-
}
69-
7051
h1 {
7152
${textHeadingLarge};
7253
margin: 0 0 16px;

app/components/common/Banner/components/Announcements/announcements.tsx

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1+
import { Banner } from "@databiosphere/findable-ui/lib/components/common/Banner/banner";
12
import { useSessionTimeout } from "@databiosphere/findable-ui/lib/hooks/useSessionTimeout";
23
import { useSystemStatus } from "@databiosphere/findable-ui/lib/hooks/useSystemStatus";
3-
import { ElementType, Fragment } from "react";
4-
import { SessionTimeout } from "./components/SessionTimeout/sessionTimeout";
5-
import { SystemIndexing as SystemIndexingBanner } from "./components/SystemIndexing/systemIndexing";
6-
import { SystemStatus as SystemStatusBanner } from "./components/SystemStatus/systemStatus";
4+
import { Fragment, ReactNode } from "react";
75

86
interface AnnouncementsProps {
9-
GeneralAnnouncement?: ElementType;
10-
SystemIndexing?: ElementType;
11-
SystemStatus?: ElementType;
7+
generalAnnouncement: ReactNode;
128
}
139

1410
export const Announcements = ({
15-
GeneralAnnouncement,
16-
SystemIndexing = SystemIndexingBanner,
17-
SystemStatus = SystemStatusBanner,
11+
generalAnnouncement,
1812
}: AnnouncementsProps): JSX.Element => {
1913
const sessionTimeout = useSessionTimeout();
2014
const systemStatus = useSystemStatus();
@@ -25,13 +19,22 @@ export const Announcements = ({
2519
return (
2620
<Fragment>
2721
{isSessionTimeout ? (
28-
<SessionTimeout onClose={clearSessionTimeout} />
22+
<Banner onClose={clearSessionTimeout}>
23+
For your security, you have been logged out due to 15 minutes of
24+
inactivity.
25+
</Banner>
2926
) : isSystemUnavailable ? (
30-
<SystemStatus />
27+
<Banner>
28+
One or more of the system components are currently unavailable.
29+
Functionality may be degraded.
30+
</Banner>
3131
) : isSystemIndexing ? (
32-
<SystemIndexing />
32+
<Banner>
33+
Data indexing in progress. Downloads and exports are disabled as
34+
search results may be incomplete.
35+
</Banner>
3336
) : (
34-
GeneralAnnouncement && <GeneralAnnouncement />
37+
generalAnnouncement
3538
)}
3639
</Fragment>
3740
);

app/components/common/Banner/components/Announcements/components/BetaAnnouncement/betaAnnouncement.styles.ts

-20
This file was deleted.

app/components/common/Banner/components/Announcements/components/BetaAnnouncement/betaAnnouncement.tsx

-10
This file was deleted.

app/components/common/Banner/components/Announcements/components/SessionTimeout/sessionTimeout.tsx

-10
This file was deleted.

app/components/common/Banner/components/Announcements/components/SystemIndexing/systemIndexing.tsx

-10
This file was deleted.

app/components/common/Banner/components/Announcements/components/SystemStatus/systemStatus.tsx

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Banner {...props}>
2+
Welcome to our BETA release. Please see the [Beta
3+
Announcement](/beta-announcement) to learn more.
4+
</Banner>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Alert component={props.component} severity={props.severity}>
2+
For datasets with a 'Required' access status, {props.entityName} are not
3+
listed.
4+
</Alert>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Alert component={props.component} severity={props.severity} size={props.size}>
2+
<AlertTitle>
3+
Files from datasets with access "required" will be excluded from this
4+
export.
5+
</AlertTitle>
6+
{props.content}
7+
</Alert>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Alert {...props}>
2+
Access to data explorer is limited for unauthorized users. To view all
3+
available data please [sign in](/login).
4+
</Alert>

app/components/common/MDXContent/anvil-cmg/betaAnnouncement.mdx

-1
This file was deleted.

app/components/common/MDXContent/anvil-cmg/index.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
export { Section } from "../../MDXMarkdown/components/Section/mdxSection.styles";
2+
export { default as Alert } from "../common/alert.mdx";
23
export { default as ExportToTerraStart } from "../common/exportToTerraStart.mdx";
34
export { default as ExportToTerraSuccess } from "../common/exportToTerraSuccess.mdx";
4-
export { default as BetaAnnouncement } from "./betaAnnouncement.mdx";
5+
export { default as AlertBetaAnnouncement } from "./alertBetaAnnouncement.mdx";
6+
export { default as AlertEntityListWarning } from "./alertEntityListWarning.mdx";
7+
export { default as AlertExportWarning } from "./alertExportWarning.mdx";
8+
export { default as AlertExportWarningContent } from "./alertExportWarningContent.mdx";
9+
export { default as AlertLoginReminder } from "./alertLoginReminder.mdx";
510
export { default as DataReleasePolicy } from "./dataReleasePolicy.mdx";
6-
export { default as ExportWarning } from "./exportWarning.mdx";
7-
export { default as LoginReminder } from "./loginReminder.mdx";
811
export { default as LoginTermsOfService } from "./loginTermsOfService.mdx";
912
export { default as LoginText } from "./loginText.mdx";
1013
export { default as LoginWarning } from "./loginWarning.mdx";

app/components/common/MDXContent/anvil-cmg/loginReminder.mdx

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Alert component={props.component} severity={props.severity}>
2+
{props.content}
3+
</Alert>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Alert {...props}>
2+
<AlertTitle>Please note</AlertTitle>
3+
4+
Data normalization and batch correction may differ between projects and processing methods.
5+
For details see [Matrix Normalization and Batch Correction]({portalURL}/guides/consumer-vignettes/matrices#matrix-normalization-and-batch-correction).
6+
7+
</Alert>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Alert component={props.component} severity={props.severity} size={props.size}>
2+
<AlertTitle>
3+
Files from projects with access "required" will be excluded from this
4+
export.
5+
</AlertTitle>
6+
{props.content}
7+
</Alert>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Alert {...props}>
2+
Access to data explorer is limited for unauthorized users. To view all
3+
available data please [sign in](/login).
4+
</Alert>

app/components/common/MDXContent/hca-dcp/batchCorrectionWarning.mdx

-1
This file was deleted.

app/components/common/MDXContent/hca-dcp/index.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
export { Section } from "../../MDXMarkdown/components/Section/mdxSection.styles";
2+
export { default as Alert } from "../common/alert.mdx";
23
export { default as ExportToTerra } from "../common/exportToTerraStart.mdx";
34
export { default as ExportToTerraSuccess } from "../common/exportToTerraSuccess.mdx";
4-
export { default as BatchCorrectionWarning } from "./batchCorrectionWarning.mdx";
5+
export { default as AlertBatchCorrectionWarning } from "./alertBatchCorrectionWarning.mdx";
6+
export { default as AlertExportWarning } from "./alertExportWarning.mdx";
7+
export { default as AlertExportWarningContent } from "./alertExportWarningContent.mdx";
8+
export { default as AlertLoginReminder } from "./alertLoginReminder.mdx";
59
export { default as ContributorGeneratedMatrices } from "./contributorGeneratedMatrices.mdx";
610
export { default as DataReleasePolicy } from "./dataReleasePolicy.mdx";
711
export { default as DCPGeneratedMatrices } from "./dcpGeneratedMatrices.mdx";
@@ -10,8 +14,6 @@ export { default as DownloadCurlCommandStart } from "./downloadCurlCommandStart.
1014
export { default as DownloadCurlCommandSuccess } from "./downloadCurlCommandSuccess.mdx";
1115
export { default as ExportToTerraStart } from "./exportToTerraStart.mdx";
1216
export { default as ExportToTerraSuccessWithWarning } from "./exportToTerraSuccessWithWarning.mdx";
13-
export { default as ExportWarning } from "./exportWarning.mdx";
14-
export { default as LoginReminder } from "./loginReminder.mdx";
1517
export { default as LoginTermsOfService } from "./loginTermsOfService.mdx";
1618
export { default as LoginText } from "./loginText.mdx";
1719
export { default as ManifestDownloadStart } from "./manifestDownloadStart.mdx";

app/components/common/MDXContent/hca-dcp/loginReminder.mdx

-1
This file was deleted.

0 commit comments

Comments
 (0)