Skip to content

feat(raw-data): Display file sizes in human-readable units within the Raw Data View#1424

Merged
sven1103 merged 1 commit intodevelopmentfrom
issue-1405--task--display-file-sizes-in-human-readable-units-within-the-raw-data-view
Apr 23, 2026
Merged

feat(raw-data): Display file sizes in human-readable units within the Raw Data View#1424
sven1103 merged 1 commit intodevelopmentfrom
issue-1405--task--display-file-sizes-in-human-readable-units-within-the-raw-data-view

Conversation

@sven1103
Copy link
Copy Markdown
Contributor

Summary

Display file sizes in the Raw Data View in human-readable format (B, KB, MB, GB) instead of raw byte values.

Changes

  • New utility class: FileSizeFormatter.java in application-commons

    • Converts bytes to human-readable format (e.g., 3221225472 -> 3.00 GB)
    • Rounds to 2 decimal places
    • Uses appropriate unit based on file size
  • Updated UI: RawDataDetailsComponent.java

    • Applied formatter in renderRawDataNgs() and renderRawDataPxp() methods

Acceptance Criteria

  • File sizes shown in human-readable format (B, KB, MB, or GB)
  • Values rounded to 2 decimal places
  • Lower bounds never begins with 0 (except Bytes range)
  • Upper bounds never surpasses 1000 (except GB range)

Files Modified

File Change
application-commons/src/main/java/life/qbic/application/commons/FileSizeFormatter.java New
datamanager-app/src/main/java/life/qbic/datamanager/views/projects/project/rawdata/RawDataDetailsComponent.java Modified

Links

Addresses #1405

@sven1103 sven1103 requested a review from a team as a code owner April 23, 2026 08:55
@sven1103 sven1103 force-pushed the issue-1405--task--display-file-sizes-in-human-readable-units-within-the-raw-data-view branch from 3a634bb to f40c75c Compare April 23, 2026 12:08
- Add FileSizeFormatter utility class for byte-to-human-readable conversion
- Update RawDataDetailsComponent to use formatted file sizes
- Display sizes as B, KB, MB, or GB with 2 decimal precision

Addresses #1405
@sven1103 sven1103 force-pushed the issue-1405--task--display-file-sizes-in-human-readable-units-within-the-raw-data-view branch from f40c75c to 001a822 Compare April 23, 2026 12:11
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Copy Markdown
Contributor

@KochTobi KochTobi left a comment

Choose a reason for hiding this comment

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

LGTM

@KochTobi
Copy link
Copy Markdown
Contributor

There are no tests for this class. Was this a conscious decision?

@sven1103
Copy link
Copy Markdown
Contributor Author

image

@sven1103 sven1103 merged commit 013dcb8 into development Apr 23, 2026
5 of 6 checks passed
@sven1103 sven1103 deleted the issue-1405--task--display-file-sizes-in-human-readable-units-within-the-raw-data-view branch April 23, 2026 13:59
KochTobi added a commit that referenced this pull request Apr 23, 2026
feat(raw-data): Display file sizes in human-readable format (#1424)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants