Closed Bug 1071057 Opened 10 years ago Closed 10 years ago

[Top Sites] Once flashed "gaia" with a topsite in resources/topsites_movistar.json file, User can see this topsite

Categories

(Firefox OS Graveyard :: Gaia::System::Browser Chrome, enhancement)

ARM
Gonk (Firefox OS)
enhancement
Not set
normal

Tracking

(blocking-b2g:2.1+, b2g-v2.1 fixed, b2g-v2.2 fixed)

RESOLVED FIXED
2.1 S6 (10oct)
blocking-b2g 2.1+
Tracking Status
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed

People

(Reporter: lolimartinezcr, Assigned: daleharvey)

References

Details

(Keywords: regression, Whiteboard: [systemsfe])

Attachments

(2 files, 1 obsolete file)

2.1
flame
User
Gecko-bdd77c4
Gaia-b3f9b97

Pre-requisites:
Having a variant.json configured for our sim card with a line similar to: "topsites": "resources/topsites_movistar.json"

Having a file "resources/topsites_movistar.json" with at least a topsite configured

Having a configured sim card with pin

Without data connection.

STRs:
1. Completing the FTE with a configured sim with pin inserted
2. Open browser app
3. Open top sites tab

Actual result:
Only user can see default topside (about mozilla) and other about warning about "without connection". 

When user actives the connection and user can't see topside configured in "topsites_movistart.json"

Expected result: 
Operator Top sites are inserted and displayed in Top Sites list
Loli - Can you attach the topsites_movistar.json file you've used here?
Flags: needinfo?(lolimartinezcr)
I am thinking this is a feature request, sim customisation of topsites hasnt been implemented
(In reply to Dale Harvey (:daleharvey) from comment #2)
> I am thinking this is a feature request, sim customisation of topsites hasnt
> been implemented

Right, that makes sense. And it looks like from the bug description this was referencing the old browser.
Severity: normal → enhancement
Flags: needinfo?(lolimartinezcr)
This was tested with system browser. It was implemented in old browser app, and it should have been migrated to system browser like all other features, so in my opinion this a regression.
Component: Gaia::Browser → Gaia::System::Browser Chrome
Keywords: regression
Attached file topsites_movistar.json
[Blocking Requested - why for this release]: This is a regression, work well in 2.0, now broken in 2.1
blocking-b2g: --- → 2.1?
Assignee: nobody → dale
Feature regression.
blocking-b2g: 2.1? → 2.1+
Whiteboard: [systemsfe]
I am having problems building a distribution with customisations

https://gist.github.com/daleharvey/e81d199acae04db2f832 

is a lot with all the relevant files shown, there is no operatorvariant app in the build_stage, any ideas?

(same results with make production)
Flags: needinfo?(carmen.jimenezcabezas)
So there was was a console error in there, but mostly didnt realise you had to customise everything or nothing, it bailed out with a plain custimisation and modified the current one instead
So I meant to unneedinfo Carmen on the last comment, but now re needinfoing :)

So I am just testing with 

$ GAIA_DISTRIBUTION_DIR=/Volumes/firefoxos/gaia/customization/ make reset-gaia

which has a bunch of top sites there, my plan is to reuse that settings data from the original browser, however when I run that, topsitescustomiser never runs while I am going through the ftu, and the setting is never populated, any idea?
The variant.json file you linked to on comment 8 is wrong. Although on comment 9 you say you've fixed it, you haven't linked the new one so I can't really say what might be happening. In any case, you have a set of test files (a complete GAIA_DISTRIBUTION_DIR) on [1]. You can use that as base for your own tests.

If you don't want to use that one, there's another sample variant.json file on [2]

That said, I believe that what might be happening is that you fixed the build error just adding an apps object to the variant.json file, but that you haven't assigned the topsites to the correct mcc-mnc for your SIM card.

A basic variant.json file should look like: 

{
  "apps": {
   ...
  },
  "operators": [
    {
      "id": "mobizilla",
      "mcc-mnc": [
        "310-260"  <-- Important. Put here your operator mcc-mnc value/s
      ],
      "apps": [
       ...
      ],
      "topsites": "mobizilla/mobizilla_topsites.json"
    }
   ]
}

Also, you have documentation for the variant.json file on [3]


[1] https://github.com/telefonicaid/firefoxos-gaia-testsbuild
[2] https://github.com/mozilla-b2g/gaia/blob/master/customization/variant.json
[3] https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide#Other_single_variant_customizations
Flags: needinfo?(carmen.jimenezcabezas)
Thanks, the issue was I was forgetting to add my mnc / mcc to the customisation variant, cheers all working now and should have a patch up shortly
Reuses the existing custimisation files so should be all good for existing customisations (assets may need changed)
Attachment #8497978 - Flags: review?(kgrandon)
Attachment #8497978 - Flags: feedback?(marce)
Attachment #8497978 - Flags: feedback?(marce) → feedback?(alberto.crespellperez)
Redirected feedback to Albert
Attachment #8497978 - Flags: feedback?(alberto.crespellperez) → feedback+
Updated the PR to not do a runtime modification and use the new format only
Comment on attachment 8497978 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/24598

This looks fine to me. Thanks!
Attachment #8497978 - Flags: review?(kgrandon) → review+
IMHO we should be consistent about the format, bookmarks and topsites represent different concepts at high level but both have the same definition. And now with your last changes we have that bookmarks are defined as:

"bookmarks": [
  {
    "title": "Mozilla Marketplace",
    "uri": "https://marketplace.firefox.com",
    "iconPath": "mobizilla/mobizilla_market_icon.png"
  }
]

and topsites as:

"topSites": [
  {
    "title": "Mozilla Marketplace",
    "url": "https://marketplace.firefox.com",
    "tilePath": "mobizilla/mobizilla_market_icon.png"
  },
]

From my point of view, both should have the same format.
I would prefer so as well, however we already have topsites build customisations in the above topsites sim customisation in that format and its more important build / sim customisations to have the same format than bookmark vs topsites.
I do not understand well this change in top sites configuration. I think we should keep the same format as in version 2.0 [1], otherwise it would be confusing for OEMs to customize their builds. Is there any special reason to change format?

[1] https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide#Pre-populate_browser_top_sites
Its consistency and accuracy with the terms used in the internal implementation. The topSites build customisation changed a while ago and used more accurate terms (uri vs url) which also matches the internal representation of the places also using |tile| over |icon|, which again is more accurate.

The gaia/customization/* files contain documentation for the change and mdn will be updated. its a small change and I think its better to just update bookmarks to use url next time its touched (the tile vs icon difference is totally file)

We arent going to go back and change the entire implementation of places so we can keep |uri|, and having the customisation match up to its implementation that to be backwards compatible with previous customizations is more important imo
(In reply to Dale Harvey (:daleharvey) from comment #20)
> Its consistency and accuracy with the terms used in the internal
> implementation. The topSites build customisation changed a while ago and
> used more accurate terms (uri vs url) which also matches the internal
> representation of the places also using |tile| over |icon|, which again is
> more accurate.
> 
> The gaia/customization/* files contain documentation for the change and mdn
> will be updated. its a small change and I think its better to just update
> bookmarks to use url next time its touched (the tile vs icon difference is
> totally file)
> 
> We arent going to go back and change the entire implementation of places so
> we can keep |uri|, and having the customisation match up to its
> implementation that to be backwards compatible with previous customizations
> is more important imo

then is it possible to modify bookmarks in order to be consistent with topsites?
Carrying r+ from kevin, fixed a typo in the build test file and waiting for a green run (Gij failure looks unrelated)
Attachment #8497978 - Attachment is obsolete: true
Attachment #8498815 - Flags: review+
> then is it possible to modify bookmarks in order to be consistent with topsites?

Yup, I will file a follow up after this lands
(In reply to Dale Harvey (:daleharvey) from comment #23)
> > then is it possible to modify bookmarks in order to be consistent with topsites?
> 
> Yup, I will file a follow up after this lands

great, thank you
All green run, landed @ https://github.com/mozilla-b2g/gaia/commit/ca05b8a8020096c205dfe26b671eb1a2261360aa

Albert, thinking about it, calling the bookmark a 'uri' is fairly valid, places have to be a url, they are where someone has actually visited, but bookmarks can get sent elsewhere etc, and as previously mentioned topSites use tiles, bookmarks use icons, so that definitely shouldnt change.

If someone wanted to change uri to url in the bookmark customisation then I wouldnt complain, but I think they are actually fine being inconsistent here, they represent different things.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Please nominate this patch for Gaia v2.1 approval when you get a chance :)
Flags: needinfo?(dale)
Target Milestone: --- → 2.1 S6 (10oct)
Yup, just gonna give it a few hours to settle on master and make sure all is green first, will leave needinfo to remind me
Comment on attachment 8498815 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/24665

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): Missing feature regressed by system browser
[User impact] if declined: Carriers wont be able to do sim customisations in the browser
[Testing completed]: integration tests added and manual testing
[Risk to taking this patch] (and alternatives if risky): fairly low risk
[String changes made]: none
Attachment #8498815 - Flags: approval-gaia-v2.1?
Flags: needinfo?(dale)
Attachment #8498815 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: