Skip to content

Commit

Permalink
fix: Adds spinners to all loading place holders
Browse files Browse the repository at this point in the history
Except for the one on the index.html page as that is a static page and
does not load in the react spinner that we are currently using.
  • Loading branch information
neomorphic committed Nov 4, 2024
1 parent 229da5d commit 6915833
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 14 deletions.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAtCAYAAADvCDbXAAAO2UlEQVRoge1afXBUVZY/9311ul+STndCAiRN8x0BUcygxHGkilFUKEZxhQyOOn7tAoOO4rjuzjC1Va3OOIiIIOoINYPM6KhEt1xh11VmJEApCgZXMpNACN2kO6HTTX93v9fvvX7v3rt/QKea0J10QKOz66+qq/q98zvnnnvq3nvOu/cCfIuCmPXKyvFTX1l+SSE5M5LO/D2h4fWHL+tk/O5uLtBx6dZ7F+XjfBu8AgjpkbsyLGJ0hkGnhfQT+TjfBq8AbKj0D6LBBi2YUaup+V/zcbiRdurrwKrmVaVxGm6sFsa2brx1Y3wovnP982siftLbeMWkSYFO5rYqvqoDYPt5vLwjj1LKqKp6kyzLiyVJqrl494ePnp6eO3t7e3/yxRdf1J71Z1EwGLwzEAhUD8fO/e/fb4+Y/AcUMfXnAOPbPRjX5XIx9c9veYiw/KWjbeY3dt/4mJym5QmvIq/Mx8878jo6Orhp06Y1I4TKNE27GQB2DcfhLwPV1dXreJ4fI8ty3+HDh3c3NDTsGjVqFESj0cUA8G6xdhQpXmmYtHGIUtCRdtl3tmzhu6PKLLOJ+K+uqwu81dSEt7TcXoU5xfnp6THlyW5jySx+wvz/XrFQBwCwIvK3Hp0+AwD/NtB23uBNnz7diMfjv8QYl7Ms+9cLDcDFAiEEAAAej0ebOHHizwkhnCzLw/JHJ4ynTLf9Pskl7ivD1k2H+/rwuJKKegkz2/5y8nTJlS+uuzYFe1sNUGsbqt7vm/gPl9e50AMkq3/4oRVu5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elia.org">
<img src="/static/media/janelia_logo.2e1f9dd4.png" alt="Janelia Research Campus">
<img src="/janelia_logo.png" alt="Janelia Research Campus">
</a>
</div>
</header>
<p>NeuronBridge is loading...</p>
<p>Loading...</p>
</div>
<noscript>You need to enable JavaScript to run this app.</noscript>
<!--
Expand Down
Binary file added public/janelia_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/Routes.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Suspense } from "react";
import { Route, Switch } from "react-router-dom";
import PropTypes from "prop-types";
import { Spin } from "antd";
import AuthenticatedRoute from "./components/AuthenticatedRoute";
import UnauthenticatedRoute from "./components/UnauthenticatedRoute";
// cant lazy load this as it breaks the AWS APIs
Expand Down Expand Up @@ -74,7 +75,7 @@ export default function Routes({ appProps }) {
config.UNDER_MAINTENANCE && !appProps.isAdmin
);
return (
<Suspense fallback={<div>loading...</div>}>
<Suspense fallback={<div><Spin tip="loading..." size="large" />Loading...</div>}>
<Switch>
<Route path="/" exact>
<Landing isAuthenticated={appProps.isAuthenticated} />
Expand Down
5 changes: 4 additions & 1 deletion src/components/CustomSearchList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ export default function CustomSearchList() {
/>
<Divider dashed />
<Title level={3}>Your Searches ({searches.length}{nextToken ? '+' : null})</Title>
{isLoading ? <Spin size="large" /> : <SearchList searches={searches} showMore={Boolean(nextToken)} showMoreHandler={showMoreHandler}/>}
{isLoading ? (
<div>
<Spin size="large" /> Loading...
</div>) : <SearchList searches={searches} showMore={Boolean(nextToken)} showMoreHandler={showMoreHandler}/>}
</div>
);
}
3 changes: 2 additions & 1 deletion src/components/MatchReferences.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from "react";
import PropTypes from "prop-types";
import { Auth, API } from "aws-amplify";
import { Spin } from "antd";

export default function MatchReferences({ library, publishedName }) {
const [publication, setPublication] = useState();
Expand All @@ -24,7 +25,7 @@ export default function MatchReferences({ library, publishedName }) {
if (!publication) {
return (
<ul>
<li>loading...</li>
<li><Spin tip="Loading..." size="large" /> Loading...</li>
</ul>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/MatchesLoader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function fixUrls(matches, stores) {
}

export default function MatchesLoader({ searchAlgorithm }) {
const [isLoading, setLoading] = useState(false);
const [isLoading, setLoading] = useState(true);
const [matchMeta, setMatchMeta] = useState(null);
const { appState } = useContext(AppContext);
const { matchId } = useParams();
Expand Down Expand Up @@ -97,7 +97,7 @@ export default function MatchesLoader({ searchAlgorithm }) {
if (isLoading) {
return (
<div className="searchLoader">
<Spin size="large" />
<Spin size="large" tip="Loading..." /> Loading...
</div>
);
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/Results.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState, useContext } from "react";
import PropTypes from "prop-types";
import { Storage, API, graphqlOperation } from "aws-amplify";
import { Divider, message } from "antd";
import { Spin, Divider, message } from "antd";
import Matches from "./Matches";
import CustomInputSummary from "./CustomInputSummary";
import ImageWithModal from "./ImageWithModal";
Expand Down Expand Up @@ -114,7 +114,10 @@ export default function Results({ match }) {
}

if (!searchMeta || !searchResults) {
return <p>...loading</p>;
return (
<div>
<Spin tip="Loading..." size="large" />...loading
</div>);
}

// we need information from both of these objects further down
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function Search() {
{!searchTerm && !searchResult && <NoSearch searchType={searchType} />}
{isLoading && (
<div className="searchLoader">
<Spin size="large" />
<Spin size="large" /> Loading...
</div>
)}
{!isLoading && searchResult && searchType && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function SearchResults(props) {
}
return (
<div className="results">
<Spin tip="Loading..." size="large" />
<Spin tip="Loading..." size="large" /> Loading...
</div>
);
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/UnifiedSearch.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect, useContext } from "react";
import { useLocation, Link } from "react-router-dom";
import { Storage, Auth, API } from "aws-amplify";
import { message, Typography } from "antd";
import { Spin, message, Typography } from "antd";

import SearchInput from "./SearchInput";
import UnifiedSearchResults from "./UnifiedSearchResults";
Expand Down Expand Up @@ -275,7 +275,10 @@ export default function UnifiedSearch() {
<div>
<SearchInput searchTerm={searchTerm} />
{!searchTerm ? <NoSearch /> : ""}
{(lineLoading || bodyLoading) && !loadError ? <p>loading...</p> : ""}
{(lineLoading || bodyLoading) && !loadError ? (
<div>
<Spin tip="Loading..." size="large" /> Loading...
</div>) : ""}
{loadError ? searchError : ""}
{byLineResult && byBodyResult && !lineLoading && !bodyLoading ? (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/UnifiedSearchResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default function UnifiedSearchResults(props) {
}
return (
<div className="results">
<Spin tip="Loading..." size="large" />
<Spin tip="Loading..." size="large" /> Loading...
</div>
);
}
Expand Down

0 comments on commit 6915833

Please sign in to comment.