Closed Bug 912838 Opened 11 years ago Closed 11 years ago

Screenshots and app icons are missing from homepage/detail pages

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P1)

Avenir
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: cvan)

References

()

Details

(Keywords: regression, Whiteboard: [fromAutomation])

Attachments

(1 file)

No longer blocks: 912778
'icon' and 'previews' are missing from bug 901710. Disabling 'rocketfuel' switch brings them back.
Blocks: mkt-publishtool-api
No longer blocks: 912778
Summary: Screenshots and app icons are missing from Mobile-details pages → Screenshots and app icons are missing from homepage/detail pages
Keywords: regression
Priority: -- → P1
Assignee: nobody → charmston
So, the problem is that the endpoint is returning a list of all matching collections, rather than a list of the apps in those collections, which is what the client is expecting. After talking through this with cvan, we decided to leave the endpoint as is and fix this on the client side. Concatenating the collections to lists of apps would make for a simpler and smaller response, but it would also strip the metadata of all the matching collections, which is sometimes necessary (e.g. in the case of operator shelf names). This approach may not scale well—one alternative would be to only return the first collection containing apps—but we'll leave it as is for now and adjust as necessary. Handing bug off to :cvan for rocketfuel fixes.
Assignee: charmston → cvan
(In reply to Chuck Harmston [:chuck] from comment #2) > So, the problem is that the endpoint is returning a list of all matching > collections, rather than a list of the apps in those collections, which is > what the client is expecting. > > After talking through this with cvan, we decided to leave the endpoint as is > and fix this on the client side. Concatenating the collections to lists of > apps would make for a simpler and smaller response, but it would also strip > the metadata of all the matching collections, which is sometimes necessary > (e.g. in the case of operator shelf names). The **** part is that we have no smart way with our `defer` blocks of knowing whether the list of Featured Apps is going to be empty before we iterate over all of them in the template. Presently, everything the "featured" key contains a list of "app" objects which makes it super easy to know whether or not to hide the "Featured Apps" section: https://github.com/mozilla/fireplace/blob/master/hearth/templates/category/main.html#L45 I can't think of a sane way of iterating over this in the front end. While I agree we need the collection name (and logo/icon) for Operator Shelf collection, I'd rather we take those on in a separate object in the response - and have "featured" and "operator" be lists containing "app" objects and nothing else. While that's again more work for the API, I can't think of a better way of normalizing this data in Fireplace when we get it back from the server. Any suggestions? I'm all ears.
Basta, if you have a minute, could use your input re: comment 3 =)
Flags: needinfo?(mattbasta)
Ok, so I just looked at the output of /search/featured and almost had a heart attack. Holy crap, too much stuff. Some notes: - The /search/featured endpoint seems to be returning collections for all regions if no region is specified. It should instead default to whatever geoip decides. You wouldn't want a first-time visitor without a SIM to get literally every collection ever created. - The `featured` list definitely needs work, both on the client and the server. See below. - The `featured` list doesn't seem to be filtering by region. Sticking region=us in the URL still returns things set as "region":"co", which definitely isn't correct. The featured field in the /search/featured response should be following the fallback method that cvan and I put together: - Region + Carrier + Category - Carrier + Category - Region + Category - Category The idea is to pick the FAC that's most specific to the request. If that's applied properly, you should only be left with only a few collections, if not one collection (I thought Mat made it so that region/carrier/cat must be a unique combination?). If it's more than one, pick the first (there shouldn't be more than one, but whatever). The "featured" field should then be a collection object rather than a list. On the client side, we should use the defer block to cast the featured app field as a collection object rather than iterating blindly. We can then get rid of the /cat/<slug>/featured route and just use the collection route (why have both?). We should also add an onload hook to cast/uncast all of the apps in the featured app section to the model cache.
Flags: needinfo?(mattbasta)
- The /search/featured endpoint seems to be returning collections for all regions if no region is specified. It should instead default to whatever geoip decides. We need to file a bug about this, WithFeaturedResource should pass the region in the filters it builds when it calls CollectionFilterSetWithFallback and it doesn't already have a region in request.GET. - The `featured` list doesn't seem to be filtering by region Actually, it sort of does. There is featured Collection in the 'us' region, so the fallback mechanism is dropping the region filter to find more collections, and you end up with, well, everything. The filter fallback mechanism, currently doesn't match your method completely, that's bug 910311. However, even if it did, I believe the current behaviour would still apply: you only specify a region, there is no region, so it falls back to no filtering at all. If you add a category or a carrier it should be fine. If you think of any improvements to counter this, please add some info in bug 910311 and I'll implement them.
(In reply to Mathieu Pillard [:mat] from comment #6) > We need to file a bug about this https://bugzilla.mozilla.org/show_bug.cgi?id=913524 > Actually, it sort of does. There is featured Collection in the 'us' region, > so the fallback mechanism is dropping the region filter to find more > collections, and you end up with, well, everything. So the first thing that comes to mind is that we should never show a more specific featured app collection for a more generic query. For instance: US, Sprint, Homepage should only return FACs that match any of the following criteria: - US Sprint Homepage - Null Sprint Homepage - US Null Homepage - Null Null Homepage We should never show FACs for other carriers or other regions. > The filter fallback mechanism, currently doesn't match your method > completely, that's bug 910311. However, even if it did, I believe the > current behaviour would still apply: you only specify a region, there is no > region, so it falls back to no filtering at all. If you add a category or a > carrier it should be fine. In the situation above (US, Sprint, Homepage), if there were no FACs available, no results should be returned. I'll update 910311 with some notes.
https://github.com/mozilla/fireplace/commit/82798f54c13be30f40083926b281fb347d938c14 This is a jank fix. Once the filtering stuff gets done, we can refactor a lot of that away.
The filtering stuff should be done now, I'll have a look later today to get a more permanent fix in place.
This is fixed - yeah?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to Christopher Van Wiemeersch [:cvan] from comment #10) > This is fixed - yeah? Yeah! Verified, thanks.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: