Skip to content

Conversation

@hafizrahman
Copy link
Contributor

@hafizrahman hafizrahman commented Jan 14, 2025

Closes: #13298

Description

In the Blaze Campaigns dashboard card, the "Total" column might disappear if the combination of font size and display size setting on the device makes everything big.

The fix proposed in the PR makes use of FlowRow to make the two columns responsive. They remain the same on smaller font and display size, but on bigger ones, the "Total" field will be pushed on its own row, keeping it readable at all sizes.

Previously:

example 1: Total column is squished example 2: Total column disappears
Image Image

With this PR:

example 1 example 2
Screenshot_1736850084 Screenshot_1736850069

Additionally, due to the FlowRow usage, this now brings a change in landscape/wider mode in general, where the two items will now be separated. I feel this should not be an issue since they are still readable:

before after
Screenshot_1736850473 Screenshot_1736850559

Steps to reproduce

  1. Test with a site that is Blaze eligible and has existing or finished campaigns,
  2. Enable the Blaze Campaigns card on Dashboard,
  3. In the device Setting, play around with Font Size and Display Size. Both "Click-throughs" and "Total" column should be visible even at the largest size setting. Compare with screenshots above.

Testing information

n/a

The tests that have been performed

I tested the above in landscape and portait mode on API 35

Images/gif

Included above.

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 14, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit372fcfc
Direct Downloadwoocommerce-wear-prototype-build-pr13300-372fcfc.apk

@hafizrahman hafizrahman changed the base branch from trunk to release/21.4 January 14, 2025 10:31
@hafizrahman hafizrahman marked this pull request as ready for review January 14, 2025 10:36
@hafizrahman hafizrahman added type: bug A confirmed bug. feature: blaze Related to the Blaze project feature: dashboard Related to home screen project labels Jan 14, 2025
@hafizrahman hafizrahman added this to the 21.4 ❄️ milestone Jan 14, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 14, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit372fcfc
Direct Downloadwoocommerce-prototype-build-pr13300-372fcfc.apk

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 41.10%. Comparing base (888b2e9) to head (372fcfc).
Report is 8 commits behind head on trunk.

Files with missing lines Patch % Lines
...rce/android/ui/blaze/campaigs/BlazeCampaignItem.kt 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13300      +/-   ##
============================================
- Coverage     41.10%   41.10%   -0.01%     
+ Complexity     6421     6420       -1     
============================================
  Files          1321     1321              
  Lines         77177    77177              
  Branches      10643    10644       +1     
============================================
- Hits          31722    31721       -1     
  Misses        42646    42646              
- Partials       2809     2810       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JorgeMucientes JorgeMucientes self-assigned this Jan 14, 2025
Copy link
Contributor

@JorgeMucientes JorgeMucientes left a comment

Choose a reason for hiding this comment

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

Nicely done @hafizrahman, good use of FlowRow.

I left a minor suggestion and also have a question. Is this really a beta fix? I feel its not that critical, but not sure if this was discussed elsewhere.

@hafizrahman
Copy link
Contributor Author

I left a minor suggestion and also have a question. Is this really a beta fix? I feel its not that critical, but not sure if this was discussed elsewhere.

My thought was that:

  1. This is discovered during beta testing (even though not related to any new code added during the sprint),
  2. I would also consider a missing text/information to be an important bug

I'm fine with adding this to the next version, though, I just thought it'd be nice to ship it earlier and I suppose it won't be too time consuming to test before release.

hafizrahman and others added 2 commits January 15, 2025 11:43
@JorgeMucientes
Copy link
Contributor

JorgeMucientes commented Jan 15, 2025

Thanks for sharing your thoughts @hafizrahman 🙂. My 2 cents around that:

  • This is discovered during beta testing (even though not related to any new code added during the sprint),
  • To me, the fact that it is discovered in beta testing is not super relevant to consider it a beta fix.
  • I would also consider a missing text/information to be an important bug
  • I'd say this is the main point, impact. Missing information is important, I agree. However, if we think how many users will be impacted by this, I feel it would be a really low number. Users that have created a Blaze campaign && have increased font size significantly && have a smaller screen (in my pixel Pro I had to set font size and display size to the max value to reproduce the bug). So, my overall feeling is that the impact is low enough to fix it in trunk.

That being said, the change is small and safe. I don't want to block this PR or anything, so I'm good if you prefer merging this on the release branch 👍🏼.

@hafizrahman
Copy link
Contributor Author

So, my overall feeling is that the impact is low enough to fix it in trunk.

Yeah, good point actually. Let's just bring it for the next release 👍🏼

@hafizrahman hafizrahman changed the base branch from release/21.4 to trunk January 15, 2025 07:38
@hafizrahman hafizrahman modified the milestones: 21.4 ❄️, 21.5 Jan 15, 2025
@hafizrahman hafizrahman merged commit e777cc7 into trunk Jan 15, 2025
15 checks passed
@hafizrahman hafizrahman deleted the fix/13298-blaze-dashboard-responsive branch January 15, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: blaze Related to the Blaze project feature: dashboard Related to home screen project type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Blaze] Campaign card has large space at bottom when display size is large

5 participants