-
Notifications
You must be signed in to change notification settings - Fork 34
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
Standardizing spinner placement and adding missing spinners, Fixes #689 #3226
Changes from all commits
a95f7f5
f368211
85dfdae
dfbdf0a
548a616
f691686
a0a8bc4
248bb9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,8 @@ export default function SimpleReview({ | |
console.error(ex); | ||
} | ||
} | ||
} else { | ||
setRecords({ oldRecords: [], newRecords: [], loading: false }); | ||
} | ||
} | ||
getRecords(); | ||
|
@@ -137,11 +139,7 @@ export default function SimpleReview({ | |
Not authenticated | ||
</div> | ||
); | ||
} else if ( | ||
session.authenticating || | ||
session.busy || | ||
(records.loading && signoffSource && signoffDest) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't recall why we had this condition There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we were just having one spinner for any of the conditions. In this case if we're waiting for auth, waiting for session info to load, waiting for the records to load, or waiting for the signoff info to load just show a spinner. But now we've broken it up. If we have enough context to render the tabs (auth and session) we do so. And then we show a spinner under the tabs if we're waiting for the records or signoff info still. |
||
) { | ||
} else if (session.authenticating || session.busy) { | ||
return <Spinner />; | ||
} | ||
const handleRollback = (text: string) => { | ||
|
@@ -212,7 +210,7 @@ export default function SimpleReview({ | |
capabilities={capabilities || {}} | ||
totalRecords={collection?.totalRecords || 0} | ||
> | ||
<SignoffContent /> | ||
{records.loading ? <Spinner /> : <SignoffContent />} | ||
</CollectionTabs> | ||
</div> | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier, why do you like unnecessary parenthesis?