Skip to content

Conversation

@urmauur
Copy link
Member

@urmauur urmauur commented Jun 19, 2025

Describe Your Changes

This pull request introduces functionality to display file sizes for downloadable assets in the CardDownload and DropdownDownload components, along with a new utility function to format file sizes. The changes enhance the user experience by providing additional information about the download files.

Enhancements to CardDownload and DropdownDownload components:

  • File size property added to SystemType: Updated the SystemType type to include an optional size property to store the formatted file size.
  • File size retrieval logic: Implemented logic to find the corresponding asset for each system and calculate its size using the new formatFileSize utility function.
  • UI updates to display file sizes: Added conditional rendering to display the file size in the CardDownload and DropdownDownload components, ensuring the size is shown alongside the system name.

New utility function:

  • formatFileSize function: Added a utility function in docs/src/utils/format.ts to convert file sizes from bytes to a human-readable format (e.g., KB, MB, GB).

Fixes Issues

Screenshot 2025-06-19 at 10 53 58 Screenshot 2025-06-19 at 10 54 07

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Enhances CardDownload and DropdownDownload components to display file sizes using a new formatFileSize utility function.

  • Enhancements to Components:
    • CardDownload.tsx and DropdownDownload/index.tsx now display file sizes next to download options.
    • Added logic to retrieve and format file sizes using formatFileSize.
  • Utility Function:
    • Added formatFileSize in format.ts to convert bytes to human-readable format.
  • Misc:
    • Updated SystemType to include optional size property.
    • Minor description change in Feature/index.tsx.

This description was created by Ellipsis for 4b75640. You can customize this summary. It will automatically update as commits are pushed.

@urmauur urmauur added this to the v0.6.0 milestone Jun 19, 2025
@urmauur urmauur self-assigned this Jun 19, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 1ecce1e in 1 minute and 34 seconds. Click for details.
  • Reviewed 172 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/src/components/Download/CardDownload.tsx:130
  • Draft comment:
    Consider using a instead of a
    for displaying the file size to ensure proper inline semantics.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. docs/src/components/Download/CardDownload.tsx:85
  • Draft comment:
    The asset lookup and file size formatting logic is duplicated across components. Consider extracting this into a shared helper function.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
3. docs/src/components/DropdownDownload/index.tsx:134
  • Draft comment:
    The use of 'await' on lastRelease.assets[0]?.name is unnecessary since it's not a promise. Please remove 'await'.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_HsrnCoh0ybqmchAV

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 19, 2025

Preview URL: https://b9c07a3a.docs-9ba.pages.dev

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 4b75640 in 1 minute and 5 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/src/components/Home/Feature/index.tsx:47
  • Draft comment:
    The diff only updates the feature description for 'Chat with your files'—it doesn't include the changes for showing app download sizes (CardDownload/DropdownDownload and formatFileSize utility) as described in the PR. Please include those changes to fully resolve issue #4863.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. docs/src/components/Home/Feature/index.tsx:46
  • Draft comment:
    Typo: 'experimantal' appears to be misspelled. It should likely be 'experimental'.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_qa612dY9pfEy893z

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@david-menloai david-menloai left a comment

Choose a reason for hiding this comment

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

LGTM

@urmauur urmauur merged commit 85d32a4 into dev Jun 19, 2025
1 check passed
@urmauur urmauur deleted the enhancement/show-size-app branch June 19, 2025 05:04
@github-project-automation github-project-automation bot moved this to QA in Jan Jun 19, 2025
samhvw8 pushed a commit that referenced this pull request Jun 19, 2025
* ✨enhancement: show app size on download dropdown

* Update docs/src/utils/format.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* chor: update copy

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@david-menloai david-menloai moved this from QA to Done in Jan Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

idea: Add download and install size estimates

3 participants