Open icarito opened 7 years ago
+1.
If it helps, https://github.com/zhirzh/sugarizer-activity-moon/issues/12 describes an issue with the Stop button when the Sugarizer Moon activity is tested on Sugar desktop.
Hi, James
Web activities would not respond to quit or to ctrl + q. it could only be terminated through the frame. I didn't keep good records because I assumed this was a Sugar issue, not an issue connected to the coding of the activity.
Tony
On 04/29/2017 08:44 AM, James Cameron wrote:
+1.
If it helps, zhirzh/sugarizer-activity-moon#12 https://github.com/zhirzh/sugarizer-activity-moon/issues/12 describes an issue with the Stop button when the Sugarizer Moon activity is tested on Sugar desktop.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sugarlabs/sugar-web/issues/127#issuecomment-298135831, or mute the thread https://github.com/notifications/unsubscribe-auth/AAULkkG57SK2BFg86L6VThQida1-khJLks5r0ofjgaJpZM4NLHjk.
But not all web activities. Gears-6.2 and FindWords-3.1 we ship on OLPC OS 16.04.2 do respond to Stop button and ctrl+q.
It isn't an issue with Sugar, it is an issue with some web activities. The web activities include within them a copy of sugar-web
(this repository), and so any fix will require new releases of affected activities.
A developer will be interested in a recursive diff (e.g. meld(1)
) of
https://github.com/llaske/sugarizer/tree/master/activities/Moon.activity/lib/sugar-web vs
https://github.com/sugarlabs/sugar-web ... I've done that, and the changes are extensive.
My guess is that Sugarizer has made changes to sugar-web
or has used other JavaScript libraries that accidentally block the feature on Sugar desktop; and they aren't testing their activities on Sugar desktop so they wouldn't have found out before release.
James @quozl, I believe this should be fixed with my embedded copy of sugar-web. In any case, I believe most if not all activities should work by just swapping sugar-web directory for a working one.
@icarito, yes, I think you're right. It will be interesting to hear the result.
Ah, missed to share the link https://github.com/somosazucar/artisan/blob/master/Jappy.activity/lib/sugar-web/env.js#L63 - I think this could be merged. I'll test moon with this.
Okay, with my patch to sugarizer's sugar-web the Activity properly colors the icon and the Stop button actually works in Sugar. There appears however to be an issue, I observed the javascript console complaining about the activity trying to save a non-text object (this stops the first display, but pushing toolbar icons makes it finally work).
I created an activity HelloWeb to provide a minimal sugar-web-activity corresponding to HelloWorld. Most of the additional code appears to come from require.js. It does not contain a reference to sugar-web. I tried it and it responds to quit as expected.
If 'sugar-web' something that was needed earlier but no longer?
Tony
On 04/29/2017 10:18 AM, Sebastian Silva wrote:
Ah, missed to share the link https://github.com/somosazucar/artisan/blob/master/Jappy.activity/lib/sugar-web/env.js#L63
- I think this could be merged. I'll test moon with this.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sugarlabs/sugar-web/issues/127#issuecomment-298141189, or mute the thread https://github.com/notifications/unsubscribe-auth/AAULkvdbsYFD1KVB1rEAhg0BGqCCWFwpks5r0p3-gaJpZM4NLHjk.
Tony, check HelloWorld.activity/lib/sugar-web
- it has to be there and is bundled with every web activity.
Hi, Sebastian,
You are right. The activity is HelloWeb (HelloWorld is the python counterpart).
On Ubuntu 16.04 0.106.1, the activity quits as expected.
Tony
On 04/29/2017 10:27 AM, Sebastian Silva wrote:
Tony, check |HelloWorld.activity/lib/sugar-web| - it has to be there and is bundled with every web activity.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sugarlabs/sugar-web/issues/127#issuecomment-298141608, or mute the thread https://github.com/notifications/unsubscribe-auth/AAULkttUzGy9kP8GXah-dXhseRQL2HBMks5r0qAtgaJpZM4NLHjk.
Hello @quozl , I have copied Moon.activity directory from llaske/sugarizer/activities and pasted in sugar/activities . The activity started well in sugar but stop-button did not work. So, I want to ask does sugar supports sugarizer activities?
It once worked. It doesn't now. You may have to recreate the missing support by fixing a bug or two. See also https://github.com/sugarlabs/GSoC/blob/5ac9c642ff8c307e9348c2d357d0241c51d2cab4/Ideas-2020.md#port-sugarizer-activities-to-sugar for a summary of the situation.
So , I need to modify lib/sugar-web of Moon.activity to be able to run in sugar.
I don't know. How do you know this? The stop button problem could easily be in the gwebsockets or Sugar API.
Sorry @quozl for making that guess. I thought we need to modify sugar-web of every activity individually.
We need to find where the problem is caused, and fix it. If a cause is in the JavaScript of sugar-web, then sure, we'll need to change sugar-web of every activity. But if a cause is in Sugar, we only need to change Sugar. I don't know where the cause is.
@quozl can't we use the builtin sugarizer presence.js for sugar too. This will only create the need to serve the index.html on a port, so using a webview, we may access the web-activities. This is just a intuition, but thats the easiest possible way it would work, probably :)
@srevinsaju, not sure I understand, sorry. Do you mean switching from Telepathy to presence.js for Python activities? Or do you mean using presence.js in Sugar Web activities to add collaboration instead of interoperating with Telepathy? As far as I can recall, presence.js was added because Sugarizer didn't have collaboration, even though Sugar did at the time, and using Telepathy was impossible because there was no way to execute it in the browser.
I guess @srevinsaju mentioned presence.js because in Sugar Web Sugarizer it's included in activity.js here and launched at activity setup. BTW it's possible to ignore it or implement it in another way on Sugar by doing a test at the beginning of the file like it's done in other Sugar Web files imported in Sugarizer like here for example. Regarding the need to change lib/sugar-web directory in all Sugarizer activities. Yes of course all lib/sugar-web directories should be change but if Sugar-Web Sugarizer is back-ported to Sugar, I will be happy to do that.
https://github.com/sugarlabs/gwebsockets/pull/10 fixes the Sugar Moon activity stop button and datastore on Sugar 0.116. It was a Port to Python 3 incomplete work. However, the Sugar Moon activity uses an older or different lib/sugar-web
than the Sugarizer Moon activity.
While similar, it would be good to keep track and avoid to diverge these two. Currently
env.isStandalone()
is different for Sugarizer and this breaks WebKit2 webactivities.