<div dir="ltr"><div><div><div>Hi all,<br><br></div>Thanks a lot for your support to Sugarizer. Really appreciate.<br><br></div>To complete the technical explanation on the first prototype [1], here a technical overview of the new Sugarizer.<br>
<br></div>1) Settings: Sugarizer use HTML5 localStorage feature to store user settings [2]. The settings is set in a key name "sugar_settings". Settings include: buddy name (no way to change it from the GUI for the moment :-), buddy color (tip to change it: click/touch several time the XO buddy icon), current view (Circle, List or Journal) - to go back to last view at the end of an activity -, and current installed activities list with favorite choice.<br>
<br><div>2) Datastore: To ensure compatibility with Sugar Web Framework I've implemented datastore using the same interface than the current datastore.js. See it [3]. Once again HTML5 localStorage is used to store it. Each datastore entry is store in a key name "sugar_datastore_[UUID=ObjectId]". The key value has a property "metadata". I've set the same metadata values than in the "true" datastore (creation_time, file_size, time_stamp, ...). The key value has also a property "text" for the text content. Both value are set together.<br>
<br></div><div>3) Environment: The Sugarizer launcher need to transmit the context to the activity (activityId, name, objectId). I choose to use query_string to send these parameter. So all parameters are pass to the "index.html" page of the activity [4] after a "?". The values are set to the Sugar Web Framework "window.top.sugar" variable at first call of datastore [5]. I'm not very happy with that but don't find any other place to initialize the environment.<br>
<br></div><div>4) Sugar web framework upgrade: the drawback of the Sugar Web Framework is that it should be copied on each activity directory. For Sugarizer I've changed two files only in the framework (datastore.js and bus.js). Unfortunately I've found some issues in activities related to old version of palette.js and activitypalette.js so I choose to upgrade all the framework in all activities.<br>
<br></div><div>5) Activities issue: My philosophy with Sugarizer is "don't update activities". BTW I've decided to fix an issue in "WelcomeWeb" in activity.js. Most of the code seems to be pasted from the GetThingsDone Activity so I've commented a part of it [6] that don't work in the context of "WelcomeWeb".<br>
</div><div>The Paint activity has yet a HTML5 compatibility issue due to the use of CustomEvent feature - not supported on "old" browser version - in colorpalette.js [7] but I don't know how to update it.<br>
<br></div><div></div><div>6) GUI complexity: Of course because I've reproduced a part of Sugar home view I've discovered some subtle way of working in the interface (like the double-timer in the popup menu !). BTW the more specific issue I've had to solve was related to colorize icon. The current process in Sugar Web Framework is nice (put it as data an redraw it [8]) but time consuming in JavaScript. So I've created a local cache of colorized icon [9] to optimize the code when colorize need to be call multiple times (in activity popup or journal for example).<br>
<br></div><div>Hope that these explanations could let you have a better understanding of specific web issues.<br><br></div><div> Lionel.<br></div><div><br>[1] <a href="http://lists.sugarlabs.org/archive/sugar-devel/2013-November/045887.html">http://lists.sugarlabs.org/archive/sugar-devel/2013-November/045887.html</a><br>
[2] <a href="https://github.com/llaske/Sugarizer/blob/master/lib/settings.js#L43">https://github.com/llaske/Sugarizer/blob/master/lib/settings.js#L43</a><br>[3] <a href="https://github.com/llaske/Sugarizer/blob/master/lib/sugar-web/datastore.js">https://github.com/llaske/Sugarizer/blob/master/lib/sugar-web/datastore.js</a><br>
[4] <a href="https://github.com/llaske/Sugarizer/blob/master/lib/settings.js#L103">https://github.com/llaske/Sugarizer/blob/master/lib/settings.js#L103</a><br>[5] <a href="https://github.com/llaske/Sugarizer/blob/master/lib/sugar-web/datastore.js#L79">https://github.com/llaske/Sugarizer/blob/master/lib/sugar-web/datastore.js#L79</a><br>
[6] <a href="https://github.com/llaske/Sugarizer/blob/master/activities/WelcomeWeb.activity/js/activity.js#L17">https://github.com/llaske/Sugarizer/blob/master/activities/WelcomeWeb.activity/js/activity.js#L17</a><br>[7] <a href="https://github.com/llaske/Sugarizer/blob/master/activities/Paint.activity/js/colorpalette.js#L9">https://github.com/llaske/Sugarizer/blob/master/activities/Paint.activity/js/colorpalette.js#L9</a><br>
[8] <a href="https://github.com/llaske/Sugarizer/blob/master/lib/sugar-web/graphics/icon.js#L20">https://github.com/llaske/Sugarizer/blob/master/lib/sugar-web/graphics/icon.js#L20</a><br>[9] <a href="https://github.com/llaske/Sugarizer/blob/master/js/activityicon.js#L38">https://github.com/llaske/Sugarizer/blob/master/js/activityicon.js#L38</a><br>
<br></div></div>