[Sugar-devel] [Feature] Start an activity from another activity

Sam P. sam.parkinson3 at gmail.com
Tue Apr 28 06:27:55 EDT 2015


Hi Gonzalo,

Removing the mime_type option sounds like a great idea.

I will look further into it tomorrow.

Thanks,
Sam

On Tue, Apr 28, 2015 at 6:51 AM Gonzalo Odiard <godiard at sugarlabs.org>
wrote:

> I was looking at the prs and the feature page. I proposed a simple
> implementation change
> in the pr, but to keep the discussion more open, I continue here with
> questions
> about the general design proposed in the feature page [1].
>
> The wiki say:
> "An activity can start other activity by:
> * knowing the activity ID - starts that specific activity
> * passing a datastore object - if the activity ID is also passed, starts
> the object with that specific activity. Otherwise starts the first activity
> that can handle the object.
> * passing a mime type - if the activity ID is not passed, start the first
> activity that can handle the mime type."
>
> If we only want open objects from the journal (as a book, a draw, etc)
> we need make the object_id mandatory. Right now, the code only require set
> one of the parameters.
> In this case also, do not have sense pass only a mime_type. Should the
> activity start with a empty object?
>
> As described in the wiki we can pass:
> 1) activity_id and object_id
> 2) object_id
> 3) object_id and mime_type (why we need this? the object in the journal
> should have the right mime)
> 4) activity_id (no object is open, the activity starts empty)
> 5) mime_type (no object is open, the activity starts empty)
> 6) activity_id, object_id and mime_type (should we ignore the mime
> associated to object_id?)
>
> I think the more basic use case, start a activity with a object from the
> journal
> from another activity only require implement the options 1) and 2)
>
> If we want implement start a activity without any object_id, the only use
> case I have in mind
> is a activity as Develop running a new instance of a activity. That would
> be the case 4)
>
> Then the question is:
> Do we need the other cases?
>
> If not, we can remove mime_type at all in the function, and simplify a
> little the logic.
>
>
> [1]
> http://wiki.sugarlabs.org/go/Features/Start_activity_from_another_activity
>
> On Wed, Apr 22, 2015 at 6:40 PM, Sam P. <sam.parkinson3 at gmail.com> wrote:
>
>> Hi Gonzalo,
>>
>> On Thu, Apr 23, 2015 at 4:14 AM Gonzalo Odiard <godiard at sugarlabs.org>
>> wrote:
>>
>>>
>>>> * It would be nice to have it integrate with the New ASLO and prompt
>>>> when the user doesn't have an activity and must download one.  The New ASLO
>>>> has data sorted by bundle ID and is collecting mime types for all
>>>> activities, meaning we have all the data required to make this work.  The
>>>> next question is probably UX.  Here is my mockup suggestion:
>>>> http://framebox.org/TbEd
>>>>
>>>
>>> I would prefer land a simple version first (more thinking we have a end
>>> for new features in May 18)
>>>
>>
>> Cool, so in order to get it merged:
>>
>> * Add a description to the commit
>> * PEP8
>> * "FIXME, move this to
>> registry.get_activities_for_type(with_parents=True) ?"
>>
>> Anything else?
>>
>>
>>>
>>>
>>>
>>>> * Does the design deal with all the security stuff?
>>>>
>>>
>>> Like what? This is just to start one activity from another with a object
>>> from the Journal.
>>>
>>
>> Ok, I was just checking.  Last discussion was very security orientated.
>>
>> Thanks,
>> Sam
>>
>>
>>>
>>> Gonzalo
>>>
>>
>
>
> --
> Gonzalo Odiard
>
> SugarLabs - Software for children learning
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20150428/8148ab09/attachment.html>


More information about the Sugar-devel mailing list