Closed
Bug 503300
Opened 15 years ago
Closed 15 years ago
Add Personas integration to BYOB
Categories
(Websites Graveyard :: byob.mozilla.com, defect)
Websites Graveyard
byob.mozilla.com
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: kev, Assigned: lorchard)
Details
Attachments
(1 file)
620 bytes,
text/plain
|
Details |
As part of creating a customized installer with Build Your Own Browser, we'll be offering authors to include the Personas add-on and specify a default persona to use. If the author wishes to include the Personas add-on, the configuration wizard/editor should provide a method (i.e. checkbox) to include the personas extension. Optionally, the author should also be able to specify a default persona to be used with the installer. If an author includes Personas, the extracted Personas XPI (available from https://addons.mozilla.org/en-US/firefox/downloads/latest/10900/addon-10900-latest.xpi) should be placed in the installer directory under: <installer-parent>/extensions/personas@christopher.beard If an author specifies a default Persona, the "extensions.personas.initial" preference should be defined in the [Preferences] section of the installer's distribution.ini file, with the persona information as the value (will add specifics on the value shortly to this bug).
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → lorchard
Status: NEW → ASSIGNED
Reporter | ||
Comment 1•15 years ago
|
||
The value for extensions.personas.initial can be created using the personas id. From Myk (thanks, Myk!): the way is to construct a URL like the following: http://www.getpersonas.com/store/[second to last digit of ID]/[last digit of ID]/[ID]/index_1.json For example, the URL for the persona with ID 123 is: http://www.getpersonas.com/store/2/3/123/index_1.json The result of loading that URL is the JSON record to put into extensions.personas.initial.
Comment 2•15 years ago
|
||
I got this wrong once before so want to make double-sure. Toby: is the algorithm in comment 1 the correct way to construct a URL to a persona record?
Comment 3•15 years ago
|
||
You want http://www.getpersonas.com/static/2/3/123/index_1.json store is no longer supported. Otherwise all good.
Reporter | ||
Comment 4•15 years ago
|
||
Thanks Toby, thanks Myk. Appreciate the help!
Assignee | ||
Comment 5•15 years ago
|
||
So I think I'm fetching the JSON fine, but it seems not to work in my distribution.ini - any suggestions? Should this JSON be quoted somehow in the ini? ----- ; Partner distribution.ini file for "Mozilla Firefox for Mozilla" ; Author email: admin@decafbad.com ; UUID: 4a5b85f7-16d4-4af4-8890-008d7f000001 [Global] id=byob-admin-Q3Njg5MjE0OQ version=20091307210118 about=Mozilla Firefox for Mozilla [Preferences] app.partner.byobadmin=byobadmin startup.homepage_welcome_url="http://dev.byob2.mozilla.org/profiles/admin/browsers/Q3Njg5MjE0OQ/firstrun" extensions.personas.initial={"id":"34365","name":"A Web Browser Renaissance","accentcolor":"#f2d9b1","textcolor":"#000000","header":"6\/5\/34365\/ff35_header7.jpg","footer":"6\/5\/34365\/ff35_footer10. jpg"} #
Reporter | ||
Comment 6•15 years ago
|
||
taking this to review now. most likely the quotes need to be escaped, because distribution.ini expects the vale to be enclosed in quotes.
Assignee: lorchard → kev
Reporter | ||
Comment 7•15 years ago
|
||
Ok, I've got it working. Any of the double-quotes in the value for extensions.personas.initial need to be escaped, and the value itself must be quoted. For the example above, you'd use: extension.personas.initial="{\"id\":\"34365\",\"name\":\"A Web Browser Renaissance\",\"accentcolor\":\"#f2d9b1\",\"textcolor\":\"#000000\",\"header\":\"6/5/34365/ff35_header7.jpg\",\"footer\":\"6/5/34365/ff35_footer10.jpg\"}" Unfortunately, there's also an issue with the personas extension itself which will prevent this setting from ever being applied. per Thunder, the order of preferences application is: browser distribution.ini extensions userprefs The personas extension defines extension.personas.initial in /defaults/preferences/personas.js, so the extensions.personas.initial pref defined in distribution.ini will always be over-ridden. The text in personas.js seems to indicate that this was put in to allow for this behaviour (it's not a bug, it's by design), but to allow for partner builds to use it, the pref needs to be removed. Myk, can we get this addressed? I'd like to confirm that the intent of the pref was for use in partner builds and, if so, could we remove or remark that line out in a 1.2.2 version of personas? I'm not crazy about shipping a modified version of the extension, but it is a workaround provided the update process doesn't get broken (and the problem is corrected in the next release). I have made a sample installer available with the changes described here. You can grab it at: https://people.mozilla.com/~kneedham/fx35-personas-byob.exe Additionally, is there any way to disable the firstrun page for personas through a pref? On a default install, the personas first-run page has focus, and it really should be the default first-run.
Reporter | ||
Updated•15 years ago
|
Assignee: kev → lorchard
Assignee | ||
Comment 8•15 years ago
|
||
Implemented and working in r29790, but leaving this bug open until there's a resolution on the issues with the addon itself.
Comment 9•15 years ago
|
||
(In reply to comment #7) > Unfortunately, there's also an issue with the personas extension itself which > will prevent this setting from ever being applied. ... > I'd like to confirm that the intent of the pref was for use in partner builds > and, if so, could we remove or remark that line out in a 1.2.2 version of > personas? The pref was designed to be used in partner builds, but it's also being used to provide an initial persona for users who install the non-partner build of Personas. I suspect the solution here is for us to remove extensions.personas.initial from the extension, but apply it if present, so partner builds can set it for users who download a partner build of the extension; and then set extensions.personas.current to the Groovy Blue initial persona for users who download a non-partner build of the extension. In other words, the default prefs should look like this: non-partner build: extensions.personas.current: [Groovy Blue JSON] <-- /defaults/prefs/... extensions.personas.initial: [is not present] partner build: extensions.personas.current: [is not present] extensions.personas.initial: [partner persona JSON] <-- distribution.ini The last time I talked to Dan about it, though, there were some tricky issues involved, although I don't remember exactly what they were, so cc:ing him to verify that this is the right approach to be taking. > Additionally, is there any way to disable the firstrun page for personas > through a pref? On a default install, the personas first-run page has focus, > and it really should be the default first-run. Setting the extensions.personas.lastversion pref to the current version number of the extension would have this effect, although it might have other negative consequences. Hmm... this'll need some more thinking/investigating.
Assignee | ||
Comment 10•15 years ago
|
||
Bouncing this bug to :myk, since it works up to the point of modifying the addon. Feel free to throw it back at me
Assignee: lorchard → myk
Assignee | ||
Comment 11•15 years ago
|
||
I think this one is closed, no?
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 13•15 years ago
|
||
Hmm, I haven't checked in a fix for the issue raised in comment 7, so I'm not sure why it seems to work now. Les, Carsten: can you confirm that the initial persona now shows up when you install a build created with BYOB and specify an initial persona for the build? Also, what version of Personas is BYOB using?
Comment 14•15 years ago
|
||
I've confirmed that the issue raised in comment 7 still exists, per bug 513765, and I've also talked to Dan about it, and he helped me figure out the right solution. Let's track resolution of that specific issue in bug 513765, which I have reassigned to myself. Setting assignee of this bug back to Les, though, as he seems the most appropriate assignee for this bug as a whole (given that he's the one who fixed it).
Assignee: myk → lorchard
Updated•10 years ago
|
Product: Websites → Websites Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•