Conversation
Generated by 🚫 dangerJS |
WordPress/Classes/ViewRelated/Stats/Period Stats/SiteStatsPeriodViewModel.swift
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Stats/Shared Views/Stats Detail/SiteStatsDetailsViewModel.swift
Outdated
Show resolved
Hide resolved
| "images" : [ | ||
| { | ||
| "idiom" : "universal", | ||
| "filename" : "AC.png", |
There was a problem hiding this comment.
Do we have vector or higher-resolution versions of these assets available?
There was a problem hiding this comment.
It appears that these images are 72px square, effectively 24pts on larger devices.
There was a problem hiding this comment.
That's a great question!
@SylvesterWilmott do you know if we have those somewhere and if so, how could I obtain them?
|
Would it be possible to add tests to ensure that these asset catalog entries can all be loaded successfully? |
| @@ -8719,6 +8722,7 @@ | |||
| 98B11B8B2216536C00B7F2D7 /* StatsChildRowsView.xib in Resources */, | |||
| 2FAE970C0E33B21600CA8540 /* xhtml1-transitional.dtd in Resources */, | |||
| 4058F41A1FF40EE1000D5559 /* PluginDetailViewHeaderCell.xib in Resources */, | |||
| 406A0EF0224D39C50016AD6A /* Flags.xcassets in Resources */, | |||
There was a problem hiding this comment.
Should this diff also be accompanied by 258 deletions, reflecting removal of the standalone PNGs from WordPressComStatsiOS?
There was a problem hiding this comment.
Not yet, since we're gonna ship the new stats in the next release and those are required to remain in place for the "old" Stats to continue to work.
Great point. |
ghost
left a comment
There was a problem hiding this comment.
Hi @jklausa - I left a few comments. I think this is headed in the right direction, but there are a few things that give me pause.
- It appears that we've moved (copied) assets, essentially doubling the footprint of our image assets.
- It appears that a "hack" method mentioned in the comments can be removed in favor of the correct solution.
At a minimum, I'd like to see that either (a) these items are addressed before we merge the PR; or (b) we create new issues that allow us to track & address them subsequently.
I also think there's an opportunity to work with design to create higher-resolution assets that will enable to put our best foot forward once our refreshed Stats feature launches, but acknowledge that that may be outside the scope of this PR.
cc: @SylvesterWilmott - do we have these image assets (i.e., country flags) available at higher resolutions?
|
I updated this, removing the "hack" and adding tests to make sure that the images can be loaded correctly. I think removing the "old" assets is captured by #10975 — when we remove I'm happy to let this PR wait here for a while if @SylvesterWilmott can point us to a higher-resolution assets. |
|
@stevebaranski is there a reason we need higher resolution flags? The flag icons should only ever appear at 24pt size so the 72pt icons are perfect for 3x displays. I would actually even encourage Android to adopt the flag icons we use in iOS @planarvoid |
@SylvesterWilmott I appreciate that the dimension specified in Zeplin is 24pt square. If we'd like to afford ourselves flexibility in the future, now is the time to make such a change. I'd rather ask now than never! 😄 I was most concerned about the manner with which they were imported into the asset catalog. For example: Note that the base image was imported into the "1x" cell within the asset catalog. This has implications when a build is created for the App Store, and then thinned for each device, especially when we're vending raster assets. @jklausa - based on Sylvester's input here, I think these images should be placed in the 3x cell for each asset. Agreed? |
|
@jklausa once this is merged, we might want to advise our platform counterparts that we anticipate a slight uptick in the app footprint due to these extra images. |
|
@stevebaranski argh, I forgot about this PR to death. I managed to wrangle a neat vim macro that let me update all the files in one go and I added a test to make sure the images are loading in a correct size/scale. I think we should be good to ship this now :) |

Fixes #11361.
This moves (well, copies.) all the flags images back to the main app.
Long-term goal is to get rid of
WPStatsiOSframework entirely, so we don't want to rely on those images living in the framework when switching to the new data architecture.To test:
Go to Stats > Period.
Verify that the flags are still displayed correctly.