-
Notifications
You must be signed in to change notification settings - Fork 27
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
add loading animation to upload doc modal #654
base: Development
Are you sure you want to change the base?
Changes from 1 commit
092cb5d
8ece8ab
7318a3f
2de29d8
d16d7db
def5a78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,15 @@ const LoadingAnimation = ({ loadingItem, children }) => ( | |
padding: '20px' | ||
}} | ||
> | ||
<Paper elevation={2} sx={{ display: 'inline-block', mx: '2px', padding: '20px' }}> | ||
<Paper | ||
elevation={2} | ||
sx={{ | ||
display: 'inline-block', | ||
mx: '2px', | ||
padding: '20px', | ||
backgroundColor: 'background.tint' | ||
}} | ||
> | ||
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. While this works for this animation, it consequently affects other uses of this animation as well, such as when loading contacts or documents. The box is now gray rather than white. Not a huge deal or anything, just an unintended side effect. Best practice would be to carve out an exception for this. However, I'd like to do #643, which would refactor animations a tad anyway. |
||
<Typography variant="h5" component="h2" mb={2} align="center"> | ||
Loading {loadingItem}... | ||
</Typography> | ||
|
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.
Rather than it being condition within the FormSection component, I think it should be wrapping it as part of a ternary:
Screen.Recording.2024-06-26.at.12.54.50.AM.mov
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.
So it would fully replace all of the content with the animation?
I prefer to stay with the Figma design. I think it looks a bit nicer and is less jarring than taking over the whole modal.
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.
The previous animation that's dangling at the bottom of the modal does not seem any better either. Might want to use a different kind of animation if not the full content
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.
Maybe we could look at a solution where the size of the modal does not change, which is jarring, and the loading animation displays over top of the modal with the content greyed out or removed. I don't mind the content being removed as long as the size of the modal doesn't change.
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.
We could try that. Or else the animation could temporarily replace one of the buttons (while retaining the size). Maybe "Upload File".
Thinking farther ahead, in #642 I mention possibly breaking down this whole process into several steps. That may or may not affect what we decide here.
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.
@andycwilliams @leekahung this is the clip I tried to post. I'm not sure why it wasn't working before.
Screen.Recording.2024-06-28.at.7.08.32.PM.mov
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.
Ah, well that's pretty different! I'll take a closer look tomorrow.
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.
I like this one 👍
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.
I don't know why, but it's still displaying the way it does in my screenshot. It's not appearing as an overlay in either desktop or mobile modes even after pulling the latest version of the branch.
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.
@andycwilliams Apologies - I did not push the changes I made to the code until just now.