diff --git a/taxonomy-editor-frontend/src/pages/editentry/AccumulateAllComponents.jsx b/taxonomy-editor-frontend/src/pages/editentry/AccumulateAllComponents.jsx index b389bad6..ffecbe74 100644 --- a/taxonomy-editor-frontend/src/pages/editentry/AccumulateAllComponents.jsx +++ b/taxonomy-editor-frontend/src/pages/editentry/AccumulateAllComponents.jsx @@ -1,5 +1,6 @@ import { Alert, Box, Snackbar, Typography, Button } from "@mui/material"; import SaveIcon from "@mui/icons-material/Save"; +import CircularProgress from "@mui/material/CircularProgress"; import { useEffect, useState } from "react"; import useFetch from "../../components/useFetch"; import ListEntryParents from "./ListEntryParents"; @@ -76,11 +77,18 @@ const AccumulateAllComponents = ({ id, taxonomyName, branchName }) => { } // Loading... - if (isPending) { + if (isPending && !node) { return ( - - Loading.. - + + + ); } diff --git a/taxonomy-editor-frontend/src/pages/editentry/ListEntryChildren.jsx b/taxonomy-editor-frontend/src/pages/editentry/ListEntryChildren.jsx index 48589d39..14b897f1 100644 --- a/taxonomy-editor-frontend/src/pages/editentry/ListEntryChildren.jsx +++ b/taxonomy-editor-frontend/src/pages/editentry/ListEntryChildren.jsx @@ -16,6 +16,7 @@ import DialogContentText from "@mui/material/DialogContentText"; import DialogTitle from "@mui/material/DialogTitle"; import AddBoxIcon from "@mui/icons-material/AddBox"; import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline"; +import CircularProgress from "@mui/material/CircularProgress"; import ISO6391 from "iso-639-1"; import { ENTER_KEYCODE } from "../../constants"; import { greyHexCode } from "../../constants"; @@ -85,11 +86,11 @@ const ListEntryChildren = ({ url, urlPrefix, setUpdateNodeChildren }) => { ); } - if (isPending) { + if (isPending && !incomingData) { return ( - - Loading.. - + + + ); } return ( @@ -98,6 +99,11 @@ const ListEntryChildren = ({ url, urlPrefix, setUpdateNodeChildren }) => { Children + {!incomingData && ( + + + + )} { ); } - if (isPending) { + if (isPending && !data) { return ( - - Loading... - + + + ); } return ( - { - - Parents - - } + + Parents + + {!data && ( + + + + )} {relations.length === 0 ? ( diff --git a/taxonomy-editor-frontend/src/pages/errors/index.jsx b/taxonomy-editor-frontend/src/pages/errors/index.jsx index d2ea9739..72969df3 100644 --- a/taxonomy-editor-frontend/src/pages/errors/index.jsx +++ b/taxonomy-editor-frontend/src/pages/errors/index.jsx @@ -12,6 +12,7 @@ import { TableContainer, } from "@mui/material"; import MaterialTable from "@material-table/core"; +import CircularProgress from "@mui/material/CircularProgress"; import { useState, useEffect } from "react"; const Errors = ({ addNavLinks }) => { @@ -51,8 +52,15 @@ const Errors = ({ addNavLinks }) => { } if (isPending) { return ( - - Loading... + + ); } diff --git a/taxonomy-editor-frontend/src/pages/go-to-project/index.tsx b/taxonomy-editor-frontend/src/pages/go-to-project/index.tsx index 7d054e87..6693cba2 100644 --- a/taxonomy-editor-frontend/src/pages/go-to-project/index.tsx +++ b/taxonomy-editor-frontend/src/pages/go-to-project/index.tsx @@ -4,6 +4,7 @@ import { useNavigate } from "react-router-dom"; import { Typography, Box, Grid, Link as MuiLink } from "@mui/material"; import MaterialTable from "@material-table/core"; import EditIcon from "@mui/icons-material/Edit"; +import CircularProgress from "@mui/material/CircularProgress"; import useFetch from "../../components/useFetch"; import { API_URL } from "../../constants"; @@ -70,7 +71,11 @@ const GoToProject = ({ clearNavBarLinks }: Props) => { } if (isPending) { - return Loading..; + return ( + + + + ); } return ( diff --git a/taxonomy-editor-frontend/src/pages/root-nodes/index.tsx b/taxonomy-editor-frontend/src/pages/root-nodes/index.tsx index 58213b04..ee8d0d6b 100644 --- a/taxonomy-editor-frontend/src/pages/root-nodes/index.tsx +++ b/taxonomy-editor-frontend/src/pages/root-nodes/index.tsx @@ -18,6 +18,7 @@ import TableRow from "@mui/material/TableRow"; import EditIcon from "@mui/icons-material/Edit"; import AddBoxIcon from "@mui/icons-material/AddBox"; import Dialog from "@mui/material/Dialog"; +import CircularProgress from "@mui/material/CircularProgress"; import CreateNodeDialogContent from "../../components/CreateNodeDialogContent"; import useFetch from "../../components/useFetch"; @@ -80,8 +81,13 @@ const RootNodes = ({ if (isPending || !nodes) { return ( - - Loading... + + ); } diff --git a/taxonomy-editor-frontend/src/pages/search/SearchResults.tsx b/taxonomy-editor-frontend/src/pages/search/SearchResults.tsx index 65e5ee5d..f4c82a8b 100644 --- a/taxonomy-editor-frontend/src/pages/search/SearchResults.tsx +++ b/taxonomy-editor-frontend/src/pages/search/SearchResults.tsx @@ -1,3 +1,4 @@ +import CircularProgress from "@mui/material/CircularProgress"; import { useState } from "react"; import { Link } from "react-router-dom"; @@ -80,10 +81,19 @@ const SearchResults = ({ query, taxonomyName, branchName }: Props) => { direction="column" alignItems="center" justifyContent="center" + height="100%" > - - Loading.. - + + + ); } diff --git a/taxonomy-editor-frontend/src/pages/search/index.tsx b/taxonomy-editor-frontend/src/pages/search/index.tsx index 69eb7465..45b89f07 100644 --- a/taxonomy-editor-frontend/src/pages/search/index.tsx +++ b/taxonomy-editor-frontend/src/pages/search/index.tsx @@ -45,16 +45,15 @@ const SearchNode = ({ - - Search - + Search