-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CMM-761: add filesize to the media screen (wp.com sites) #22220
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
CMM-761: add filesize to the media screen (wp.com sites) #22220
Conversation
|
| App Name | WordPress |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22220-a2a1a50 | |
| Commit | a2a1a50 | |
| Direct Download | wordpress-prototype-build-pr22220-a2a1a50.apk |
|
| App Name | Jetpack |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22220-a2a1a50 | |
| Commit | a2a1a50 | |
| Direct Download | jetpack-prototype-build-pr22220-a2a1a50.apk |
libs/fluxc/src/main/java/org/wordpress/android/fluxc/model/MediaModel.java
Fixed
Show fixed
Hide fixed
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.
Pull Request Overview
This PR adds filesize display functionality specifically for WordPress.com sites in the media settings screen. For WP.com sites, the filesize comes pre-formatted as a string from the API, unlike self-hosted sites where raw numeric values need formatting.
- Adds a new database field
FILE_SIZE_FORMATTEDto store pre-formatted filesize strings - Updates the WP.com API response handling to capture the
sizefield - Modifies the media settings UI to display formatted filesize for WP.com sites
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| WellSqlConfig.kt | Increments database version and adds migration for new filesize formatted field |
| MediaWPComRestResponse.java | Adds size field to capture formatted filesize from WP.com API |
| MediaResponseUtils.kt | Updates response mapping logic with incomplete implementation |
| MediaWPRestResponse.kt | Fixes trailing comma in constructor call |
| MediaModel.java | Adds new field and getter/setter methods for formatted filesize |
| MediaSettingsActivity.java | Updates UI logic to display formatted filesize for WP.com sites |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
libs/fluxc/src/main/java/org/wordpress/android/fluxc/model/MediaModel.java
Outdated
Show resolved
Hide resolved
libs/fluxc/src/main/java/org/wordpress/android/fluxc/model/MediaModel.java
Outdated
Show resolved
Hide resolved
libs/fluxc/src/main/java/org/wordpress/android/fluxc/model/MediaModel.java
Outdated
Show resolved
Hide resolved
...uxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/media/MediaResponseUtils.kt
Outdated
Show resolved
Hide resolved
...uxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/media/MediaResponseUtils.kt
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #22220 +/- ##
=======================================
Coverage 39.22% 39.22%
=======================================
Files 2164 2164
Lines 103310 103310
Branches 15881 15881
=======================================
Hits 40522 40522
Misses 59193 59193
Partials 3595 3595 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dcalhoun
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.
Yes, if we are showing the field, it means that the field is returned that way from the server. Does it happen if you browse the file in the web app? |
…creen-(WP.COM-sites) # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/media/MediaSettingsActivity.java # libs/fluxc/src/main/java/org/wordpress/android/fluxc/model/MediaModel.java # libs/fluxc/src/main/java/org/wordpress/android/fluxc/persistence/WellSqlConfig.kt
|







Description
This PR is adding the filesize information to the media setting activity for WP.COM sites.
Note that the feature was already added for Application Password supported sites here. However, for dotcom sites, the filesize is already formatted in a string format. So, the same field cannot be reused. A new field has been added for that purpose.
Testing instructions
Screen.Recording.2025-09-18.at.14.53.12.mov