Skip to content
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

fix: [M3-8740] - Convert Object Storage size from GiB to GB in frontend #11293

Conversation

hasyed-akamai
Copy link
Contributor

@hasyed-akamai hasyed-akamai commented Nov 20, 2024

Description 📝

  • This PR changes the Object Storage bucket size numbers from GiB to GB in the frontend to avoid confusion during migration.

  • Previously, the size numbers were displayed in GiB, and now they are displayed in GB.

Changes 🔄

  • Converts Object Storage bucket size display from GiB to GB in the frontend.

Target release date 🗓️

N/A

Preview 📷

Before After
Before After
Before After
Before After
Before @After

How to test 🧪

Prerequisites

  • Ensure you have the necessary permissions to create Object Storage Buckets.
  • Create a Object Storage Bucket and add a Object to the Bucket.

Reproduction steps

  • Landing:
    • Observe Object Storage bucket size display in Equivalent GB in the frontend.

Verification steps

  • After changes Observe Object Storage bucket size display in Equivalent GB in the frontend.

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@hasyed-akamai hasyed-akamai self-assigned this Nov 20, 2024
@hasyed-akamai hasyed-akamai added Object Storage deals with Object Storage Work in Progress labels Nov 20, 2024
Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hasyed-akamai You might need to adjust the broken unit tests w.r.t your changes.

@@ -93,7 +93,7 @@ export const FileUpload = React.memo((props: FileUploadProps) => {
})}
variant="body1"
>
{readableBytes(props.sizeInBytes).formatted}
{readableBytes(props.sizeInBytes, { base10: true }).formatted}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: You could add a comment to provide context for enabling base10.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: this comment is not super clear. Essentially what you are doing here is converting from binary units (GiB) to decimal units (GB).

@hasyed-akamai hasyed-akamai marked this pull request as ready for review November 22, 2024 08:49
@hasyed-akamai hasyed-akamai requested a review from a team as a code owner November 22, 2024 08:49
@hasyed-akamai hasyed-akamai requested review from carrillo-erik and abailly-akamai and removed request for a team November 22, 2024 08:49
Copy link

github-actions bot commented Nov 28, 2024

Coverage Report:
Base Coverage: 86.85%
Current Coverage: 86.85%

@@ -93,7 +93,7 @@ export const FileUpload = React.memo((props: FileUploadProps) => {
})}
variant="body1"
>
{readableBytes(props.sizeInBytes).formatted}
{readableBytes(props.sizeInBytes, { base10: true }).formatted}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: this comment is not super clear. Essentially what you are doing here is converting from binary units (GiB) to decimal units (GB).

@hasyed-akamai hasyed-akamai added the Add'tl Approval Needed Waiting on another approval! label Dec 3, 2024
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 466 passing tests on test run #8 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing466 Passing2 Skipped104m 54s

Copy link
Contributor

@harsh-akamai harsh-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good! Thanks @hasyed-akamai

@harsh-akamai harsh-akamai merged commit 2dc4dc6 into linode:develop Dec 5, 2024
23 checks passed
Copy link

cypress bot commented Dec 5, 2024

Cloud Manager E2E    Run #6923

Run Properties:  status check passed Passed #6923  •  git commit 2dc4dc6d1d: fix: [M3-8740] - Convert Object Storage size from `GiB` to `GB` in UI (#11293)
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #6923
Run duration 29m 54s
Commit git commit 2dc4dc6d1d: fix: [M3-8740] - Convert Object Storage size from `GiB` to `GB` in UI (#11293)
Committer hasyed-akamai
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 466
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add'tl Approval Needed Waiting on another approval! Object Storage deals with Object Storage Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants