-
Notifications
You must be signed in to change notification settings - Fork 51
Studio: Show sync selection size (e.g. 1.2 GB / 2 GB) in site push dialog #2125
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
Conversation
| trackColor?: string; | ||
| }; | ||
|
|
||
| export function TwoColorProgressBar( { |
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 tried to achieve this with ProgressBar but that component is too simple so I opted for this custom simple implementation.
|
|
||
| const getBottomPadding = () => { | ||
| if ( type === 'pull' ) { | ||
| return 'pb-[70px]'; // Original padding for pull |
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 left these comments for the ease of reading the function. They could be removed if they seem self-explanatory
| </div> | ||
| ) } | ||
| { type === 'push' && isPushSelectionOverLimit && ( | ||
| <Notice status="warning" isDismissible={ false } className="mb-4"> |
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.
📊 Performance Test ResultsComparing ced4f24 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
@katinthehatsite the bar looks great. What if we added 2 GB on the right and changed 0 bytes to 0 B, to make it consistent with elements used in the Hosting Dashboard? |
@wojtekn this should be taken care of, let me know what you think |
|
@katinthehatsite I haven't reviewed the code, but the UI looks great. I just noticed one bug, as it looks it takes into the account everything even when I select one file?
|
…ze-display-for-sync
sejas
left a comment
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.
Works pretty good. Thanks for adding the progress bar showing the size of file selection.
I found the issue mentioned by Wojtek. The calculation only goes two levels deep, so for uploads it shows the total of the folder. I'll commit the fix to this branch.
sejas
left a comment
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.
|
Nice, thanks for making adjustments and bringing this PR over the finish line ❤️ |







Related issues
Closes STU-908
Proposed Changes
This PR adds the bar that displays the size of the Studio site when the user is trying to perform the
Pushoperation:If the size is over the limit, the user is seeing the following warning:
Testing Instructions
cd wp-content/uploadsanddd if=/dev/zero of=dummyfile.dat bs=1M count=2048to inflate the site size if needed)SynctabPushoption to open the sync dialogPre-merge Checklist