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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

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

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

Coverage Report:
Base Coverage: 86.95%
Current Coverage: 86.95%

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 462 passing tests on test run #6 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing462 Passing2 Skipped101m 27s

@@ -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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Object Storage deals with Object Storage Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants