Skip to content

Conversation

@rachelmcr
Copy link
Contributor

@rachelmcr rachelmcr commented Dec 5, 2022

Closes: #8243

Description

This updates the Analytics Hub to use a gray color (instead of red) for stats with a 0% change from the previous period:

  • 0% delta tag has a light gray background with black text.
  • 0% chart has a dark gray line.

Changes

  • The colors are now computed properties on DeltaPercentage.Direction, since they are inherently linked to the delta direction.
  • Each of the three colors (delta background color, delta text color, and chart color) are set on the relevant cards in the Analytics Hub.

Note: The original idea behind DeltaPercentage was to just be a representation of the formatted string/direction in StatsDataTextFormatter. Given that so many report card values depend on the DeltaPercentage, I think it makes sense to extract that struct from the formatter as its own entity. Then, we can pass the DeltaPercentage itself to the analytics card view models (rather than passing each of the values separately). I'll open a separate PR so we can review that idea.

Testing

  1. Ensure you have at least one stat in the Analytic Hub with 0% change from the previous period.
  2. Build and run the app.
  3. Tap "See more" on the My Store dashboard.
  4. Confirm the 0% stat uses gray colors for the delta tag and chart.

Screenshots

Before After
Simulator Screen Shot - iPhone 14 Pro - 2022-12-05 at 22 05 36 Simulator Screen Shot - iPhone 14 Pro - 2022-12-05 at 22 04 08
Simulator Screen Shot - iPhone 14 Pro - 2022-12-05 at 22 07 24 Simulator Screen Shot - iPhone 14 Pro - 2022-12-05 at 22 10 21

Submitter Checklist

Update release notes:

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@rachelmcr rachelmcr added the category: tracks Related to analytics, including Tracks Events. label Dec 5, 2022
@rachelmcr rachelmcr added this to the 11.6 milestone Dec 5, 2022
@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8317-f7334be on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@rachelmcr rachelmcr marked this pull request as ready for review December 6, 2022 11:19
@ealeksandrov ealeksandrov self-assigned this Dec 6, 2022
Copy link
Contributor

@ealeksandrov ealeksandrov left a comment

Choose a reason for hiding this comment

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

:shipit:

@ealeksandrov ealeksandrov removed their assignment Dec 6, 2022
@rachelmcr rachelmcr merged commit 52e2593 into trunk Dec 6, 2022
@rachelmcr rachelmcr deleted the issue/8243-zero-delta-color branch December 6, 2022 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tracks Related to analytics, including Tracks Events.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Analytics Hub] Update colors to match designs for 0% change

4 participants