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
Font Library: add progress-bar while uploading font assets #57463
Conversation
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.
Thanks for working on this, @hbhalodia!
Currently I'm seeing this in the isUploading
state:
I think it would be good to centre align the progress bar and add some vertical spacing, similar to the mockup from @jasmussen here.
Sure, @mikachan - I would look into this asap. Thanks. |
With this commit, we have centered the progress bar and added some vertical spacing to the progress bar so it look as in center.Also while uploading we have just shown the progress bar and no text before and after, because while uploading it is good to show only progress bar.
Hi @mikachan, I have revised the code and made the progress bar center aligned and added the vertical spacing. Also in addition to it, I had just showed the progress bar while uploading, since while upload it is good to show just a progress bar and nothing else. Let me know if we need the bottom text while uploading, I can revert that. Here is the screenshot how it would be while uploading. Thank You! |
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.
Thanks @hbhalodia!
Let me know if we need the bottom text while uploading, I can revert that.
After testing this out, I think we should leave this text in place, as it reduces the visual changes and layout shifts.
Maybe we should also move the Notice component below this text, to further reduce the visual changes, e.g.:
I've left an inline comment too, as I think we can re-use an existing CSS class rather than the Spacer components. Let me know what you think!
{ isUploading && ( | ||
<FlexItem> | ||
<Spacer margin={ 32 } /> | ||
<ProgressBar className="font-library-modal__upload-area__progress-bar" /> | ||
<Spacer margin={ 32 } /> | ||
</FlexItem> | ||
) } |
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 think we can achieve a more consistent layout by re-using the font-library-modal__upload-area
class, as this already has a fixed height. Something like this:
{ isUploading && ( | |
<FlexItem> | |
<Spacer margin={ 32 } /> | |
<ProgressBar className="font-library-modal__upload-area__progress-bar" /> | |
<Spacer margin={ 32 } /> | |
</FlexItem> | |
) } | |
{ isUploading && ( | |
<FlexItem> | |
<div className="font-library-modal__upload-area"> | |
<ProgressBar /> | |
</div> | |
</FlexItem> | |
) } |
We don't want the progress bar to have a grey background, so we could adjust the CSS so the background colour is specific to the upload button:
button.font-library-modal__upload-area {
background-color: #f0f0f0;
}
This should create a more consistent layout between the not-uploading is isUploading states:
Not-uploading | isUploading |
---|---|
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.
Sure would be looking onto this.
Thanks.
Sure, Would be keeping as is.
Yep, we can do it. Would update in the next commit. Also, would address the inline comment that you have mentioned. Thanks for the review! |
Added the consistent style for progress bar and also change the text position before any notice after uploading the fonts in order to reduce the layout shifts.
Hi @mikachan, have updated the PR with the required changes, Let me know if that works. Thanks.
|
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.
Looks great, thanks @hbhalodia! ✨
Thanks, @mikachan 👍. |
What?
ProgressBar
component while uploading the font assets.Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Font.Library.-.Progerss.Bar.webm