Consider adding .role to updateManifest (mini manifest in packaged app case)

NEW
Unassigned

Status

Core Graveyard
DOM: Apps
4 years ago
9 months ago

People

(Reporter: lightsofapollo, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
This came up in bug 1029329 again... The way gaia (at least but I suspect third party homescreens would have similar behavior) uses .role is much like how we use .name or .icon it is used during install time to determine what we should display on the homescreen. Right now we use this attribute primarily to "hide" things that we prefer not to display directly on the homescreen but somewhere else (like third-party homescreens, third-party keyboards).

Without having .role during install we don't know the difference between something we should show (like lets say a 60mb game) and something we should hide (third party keyboard). Currently this is worked around by not showing any text or icons until the entire app downloads.

How difficult would it be to add .role to the mini manifest and is there some reason why we should not?
I'm fine with adding role to the mini-manifest.

I guess this means that the marketplace needs to copy the role from the manifest when generating the update manifest? Chris, can you confirm?
Flags: needinfo?(cvan)
Sounds like a good idea to me. I don't think that we need to change anything in Gecko to make this happen. We just need to ask the marketplace guys to copy the .role from the app manifest to the minimanifest, and then start using it in Gaia.
(In reply to Jonas Sicking (:sicking) from comment #2)
> Sounds like a good idea to me. I don't think that we need to change anything
> in Gecko to make this happen. We just need to ask the marketplace guys to
> copy the .role from the app manifest to the minimanifest, and then start
> using it in Gaia.

Wouldn't we need to do a mini-manifest --> webapp manifest role check to ensure the values are the same? I think we've done that with a bunch of other properties that cross over between the mini-manifest & webapp manifest.
(In reply to Jason Smith [:jsmith] from comment #3)
> (In reply to Jonas Sicking (:sicking) from comment #2)
> > Sounds like a good idea to me. I don't think that we need to change anything
> > in Gecko to make this happen. We just need to ask the marketplace guys to
> > copy the .role from the app manifest to the minimanifest, and then start
> > using it in Gaia.
> 
> Wouldn't we need to do a mini-manifest --> webapp manifest role check to
> ensure the values are the same? I think we've done that with a bunch of
> other properties that cross over between the mini-manifest & webapp manifest.

Yes, we'll add that to the check we do with the app name and the author information at https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/AppsUtils.jsm#454
(Reporter)

Comment 5

4 years ago
@sicking- right this does work right now if we just add the .role
@jsmith- I think this makes sense it would be an easy addition to https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/AppsUtils.jsm#454 but it would break a whole lot of content which may not have .role in the minimanifest.
Let's just make sure this is a backwards-compatible change in Gecko. This is a trivial change to the Marketplace. We just need to know what the rules should be for the validator (i.e., what the valid roles are), and we will add this immediately.
Flags: needinfo?(cvan)

Updated

9 months ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.