Skip to content

Commit

Permalink
chore: upgrade findable-ui to 14.0.0 (#431) (#450)
Browse files Browse the repository at this point in the history
Co-authored-by: Fran McDade <[email protected]>
  • Loading branch information
frano-m and Fran McDade authored Nov 8, 2024
1 parent d47a1ad commit 797a445
Show file tree
Hide file tree
Showing 29 changed files with 612 additions and 672 deletions.
2 changes: 1 addition & 1 deletion __tests__/api-refresh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import httpMocks from "node-mocks-http";
import { ProjectsResponse } from "../app/apis/azul/hca-dcp/common/responses";
import { METHOD } from "../app/common/entities";
import {
RefreshServicesStatuses,
REFRESH_ACTIVITY,
REFRESH_OUTCOME,
RefreshServicesStatuses,
} from "../app/services/common/entities";
import { endPgPool } from "../app/services/database";
import { Handler } from "../app/utils/api-handler";
Expand Down
2 changes: 1 addition & 1 deletion __tests__/api-tasks-cellxgene-in-progress.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import httpMocks from "node-mocks-http";
import {
HCAAtlasTrackerDBValidation,
ROLE,
TaskStatusesUpdatedByDOIResult,
TASK_STATUS,
TaskStatusesUpdatedByDOIResult,
VALIDATION_ID,
} from "../app/apis/catalog/hca-atlas-tracker/common/entities";
import { METHOD } from "../app/common/entities";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
OnTabChangeFn,
Tab as DXTab,
TabsProps as DXTabsProps,
OnTabChangeFn,
} from "@databiosphere/findable-ui/lib/components/common/Tabs/tabs";
import { Tab as MTab } from "@mui/material";
import { Tabs as SectionTabs } from "./tabs.styles";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { FormManager } from "../../../../hooks/useFormManager/common/entities";
import { ROUTE } from "../../../../routes/constants";
import { getAtlasComponentAtlasesTableColumns } from "../../../../viewModelBuilders/catalog/hca-atlas-tracker/common/viewModelBuilders";
import {
ButtonLink,
BUTTON_COLOR,
ButtonLink,
} from "../../../common/Button/components/ButtonLink/buttonLink";
import { Paper } from "../../../Table/components/TablePaper/tablePaper.styles";
import { TablePlaceholder } from "../../../Table/components/TablePlaceholder/tablePlaceholder";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { FormManager } from "../../../../hooks/useFormManager/common/entities";
import { ROUTE } from "../../../../routes/constants";
import { getAtlasSourceStudiesTableColumns } from "../../../../viewModelBuilders/catalog/hca-atlas-tracker/common/viewModelBuilders";
import {
ButtonLink,
BUTTON_COLOR,
ButtonLink,
} from "../../../common/Button/components/ButtonLink/buttonLink";
import { Paper } from "../../../Table/components/TablePaper/tablePaper.styles";
import { TablePlaceholder } from "../../../Table/components/TablePlaceholder/tablePlaceholder";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useAuthentication } from "@databiosphere/findable-ui/lib/hooks/useAuthe
import { TextField } from "@mui/material";
import { useCallback, useRef, useState } from "react";
import {
TaskStatusesUpdatedByDOIResult,
TASK_STATUS,
TaskStatusesUpdatedByDOIResult,
} from "../../../../../app/apis/catalog/hca-atlas-tracker/common/entities";
import { METHOD } from "../../../../../app/common/entities";
import {
Expand Down
4 changes: 2 additions & 2 deletions app/components/Forms/components/Refresh/refresh.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { METHOD } from "../../../../../app/common/entities";
import { fetchResource } from "../../../../../app/common/utils";
import { FormResponseErrors } from "../../../../../app/hooks/useForm/common/entities";
import {
RefreshServicesStatuses,
RefreshStatus,
REFRESH_ACTIVITY,
REFRESH_OUTCOME,
RefreshServicesStatuses,
RefreshStatus,
} from "../../../../../app/services/common/entities";

export const RefreshForm = (): JSX.Element => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import styled from "@emotion/styled";

export const AlertText = styled.div`
ul {
padding-left: 24px;
margin: 8px 0;
li {
margin: 4px 0;
&:last-child {
margin-bottom: 0;
}
}
}
*:last-child {
margin-bottom: 0;
}
`;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
StatusBadge,
STATUS_BADGE_COLOR,
StatusBadge,
} from "@databiosphere/findable-ui/lib/components/common/StatusBadge/statusBadge";
import { ATLAS_STATUS } from "../../../../../../../../apis/catalog/hca-atlas-tracker/common/entities";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { SubTitle } from "@databiosphere/findable-ui/lib/components/Layout/compo
import { ReactNode } from "react";
import { BackButton } from "./components/BackButton/backButton";
import {
DetailViewHero as DetailViewHeroLayout,
DetailViewHeroHeadline,
DetailViewHero as DetailViewHeroLayout,
HeroHeader,
HeroTitle,
Statuses,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Layout/components/Detail/detailView.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ReactNode } from "react";
import { DetailViewHero } from "./components/DetailViewHero/detailViewHero";
import {
DetailView as DetailViewLayout,
DetailViewContent,
DetailView as DetailViewLayout,
} from "./detailView.styles";

export interface DetailViewProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
ButtonLinkProps,
BUTTON_COLOR,
ButtonLinkProps,
} from "../../../../../common/Button/components/ButtonLink/buttonLink";
import { Button } from "./heroButton.styles";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ export const ButtonTextPrimaryCell = styled(DXButtonTextPrimary)`
flex: unset;
font-weight: 400;
text-align: left;
text-decoration: underline;
text-decoration-color: currentColor;
text-decoration-skip-ink: none;
text-underline-position: from-font;
`;
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { CheckedIcon } from "@databiosphere/findable-ui/lib/components/common/Cu
import { IndeterminateIcon } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/components/IndeterminateIcon/indeterminateIcon";
import { UncheckedIcon } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
import {
Checkbox as MCheckbox,
FormControlLabel as DXFormControlLabel,
Checkbox as MCheckbox,
} from "@mui/material";
import { Row, RowData, RowSelectionState, Table } from "@tanstack/react-table";
import { ChangeEvent, ReactNode, useCallback } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { CheckedIcon } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/components/CheckedIcon/checkedIcon";
import { UncheckedIcon } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
import {
Checkbox as MCheckbox,
FormControlLabel as DXFormControlLabel,
Checkbox as MCheckbox,
} from "@mui/material";
import { Row, RowData } from "@tanstack/react-table";
import { ReactNode } from "react";
Expand Down
4 changes: 2 additions & 2 deletions app/components/common/Form/components/Select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { FormControl } from "../FormControl/formControl.styles";
import { FormHelperText } from "../FormHelperText/formHelperText";
import { FormLabel } from "../FormLabel/formLabel";

export interface SelectProps extends MSelectProps {
export type SelectProps = MSelectProps & {
className?: string;
helperText?: ReactNode;
isFilled?: boolean;
isFullWidth?: boolean;
}
};

export const Select = forwardRef<HTMLInputElement, SelectProps>(function Select(
{
Expand Down
19 changes: 13 additions & 6 deletions app/components/common/MDXContent/confidentialNotice.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
Please note that this tracker contains confidential information that must not be distributed beyond the HCA Operations
and Ingest Teams and the Atlas Integration Leads. This tracker includes:
<Alert {...props}>
<AlertTitle>This tracker is confidential</AlertTitle>
<AlertText>
Please note that this tracker contains confidential information that must not be distributed beyond the HCA
Operations and Ingest Teams and the Atlas Integration Leads. This tracker includes:

- Sensitive details on unpublished studies, publications, and datasets.
- Provisional lists of potential data contributors who may not have been contacted by the HCA and may not be aware that their datasets have been selected for the atlas.
- Sensitive details on unpublished studies, publications, and datasets.
- Provisional lists of potential data contributors who may not have been contacted by the HCA and may not be aware
that their datasets have been selected for the atlas.

Please email or Slack Ellen Todres ([[email protected]](mailto:[email protected])) with any
questions.
Please email or Slack Ellen Todres ([[email protected]](mailto:[email protected])) with any
questions.

</AlertText>
</Alert>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Typography, TypographyProps as MTypographyProps } from "@mui/material";
import { TypographyProps as MTypographyProps, Typography } from "@mui/material";
import { ReactNode } from "react";

export interface TypographyNoWrapProps extends MTypographyProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TEXT_BODY_400 } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography, TypographyProps as MTypographyProps } from "@mui/material";
import { TypographyProps as MTypographyProps, Typography } from "@mui/material";
import { ReactNode } from "react";

export interface TypographyNoWrapProps extends MTypographyProps {
Expand Down
5 changes: 3 additions & 2 deletions app/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { FluidAlert } from "@databiosphere/findable-ui/lib/components/common/Alert/alert.styles";
export { AlertText } from "@databiosphere/findable-ui/lib/components/common/Alert/components/AlertText/alertText.styles";
export { Alert } from "@databiosphere/findable-ui/lib/components/common/Alert/alert";
export { SessionTimeout } from "@databiosphere/findable-ui/lib/components/common/Banner/components/SessionTimeout/sessionTimeout";
export { GitHubIcon } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/components/GitHubIcon/gitHubIcon";
export { UnLinkIcon } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon";
Expand All @@ -18,10 +17,12 @@ export { Link } from "@databiosphere/findable-ui/lib/components/Links/components
export { BasicCell } from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/BasicCell/basicCell";
export { NTagCell } from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/NTagCell/nTagCell";
export { RowDrawer } from "@databiosphere/findable-ui/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer";
export { AlertTitle } from "@mui/material";
export { IconButton } from "./common/IconButton/iconButton";
export { ViewSourceDataset } from "./Detail/components/ViewSourceDataset/viewSourceDataset";
export { EditTasks } from "./Index/components/ViewTasks/components/EditTasks/editTasks";
export { PreviewTask } from "./Index/components/ViewTasks/components/PreviewTask/previewTask";
export { AlertText } from "./Layout/components/Content/components/AlertText/alertText.styles";
export { HCABranding } from "./Layout/components/Footer/components/Branding/components/HCABranding/hcaBranding";
export { LabelIconMenuItem } from "./Layout/components/Header/components/Content/components/Navigation/components/NavigationMenuItems/components/LabelIconMenuItem/labelIconMenuItem";
export { Hero } from "./Layout/components/IndexPage/components/Hero/hero";
Expand Down
2 changes: 1 addition & 1 deletion app/hooks/useFormManager/useFormManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const useFormManager = <T extends FieldValues, R = undefined>(
);

useEffect(() => {
return () => {
return (): void => {
setPathRoute(undefined);
};
}, []);
Expand Down
2 changes: 1 addition & 1 deletion app/services/common/refresh-service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RefreshStatus, REFRESH_ACTIVITY, REFRESH_OUTCOME } from "./entities";
import { REFRESH_ACTIVITY, REFRESH_OUTCOME, RefreshStatus } from "./entities";

export interface RefreshInfo<TData, TRefreshParams = undefined> {
attemptingRefresh?: boolean;
Expand Down
6 changes: 3 additions & 3 deletions app/services/validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import {
HCAAtlasTrackerValidationResult,
PublicationInfo,
SYSTEM,
TaskStatusesUpdatedByDOIResult,
TASK_STATUS,
ValidationDBEntityOfType,
ValidationDifference,
TaskStatusesUpdatedByDOIResult,
VALIDATION_ID,
VALIDATION_STATUS,
VALIDATION_TYPE,
VALIDATION_VARIABLE,
ValidationDBEntityOfType,
ValidationDifference,
} from "../apis/catalog/hca-atlas-tracker/common/entities";
import { getDbEntityCitation } from "../apis/catalog/hca-atlas-tracker/common/utils";
import { ForbiddenError, NotFoundError } from "../utils/api-handler";
Expand Down
4 changes: 4 additions & 0 deletions mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { MDXComponents } from "mdx/types";
import { Link } from "./app/components/Layout/components/Content/components/Link/link";
import * as C from "./app/components/index";

export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
...components,
Alert: C.Alert,
AlertText: C.AlertText,
AlertTitle: C.AlertTitle,
a: Link,
};
}
Loading

0 comments on commit 797a445

Please sign in to comment.