Fwd: Thumbnail preview in Capture

Boyan Sheytanov boyan.sheytanov at asteasolutions.com
Thu Dec 3 07:26:43 UTC 2009


It's terrible to have four e-mails and choose the right one for the
message you want to send. See below for the original message.


---------- Forwarded message ----------
From:  <fluid-work-owner at fluidproject.org>
Date: 2009/12/3
Subject: Re: Thumbnail preview in Capture
To: bsheytanov at gmail.com


Thank you for posting to the fluid-work mailing list. Unfortunately,
we are unable to post your message because you are not a member of the
list. Please join the fluid-work mailing list
(http://fluidproject.org/mailman/listinfo/fluid-work) and repost your
message, or contact the list administrators
fluid-work-owner at fluidproject.org for help.




---------- Forwarded message ----------
From: Boyan Sheytanov <bsheytanov at gmail.com>
To: Michelle <michelle.dsouza at utoronto.ca>
Date: Thu, 3 Dec 2009 09:21:10 +0200
Subject: Re: Thumbnail preview in Capture
Hi again!

Look inline for my comments.

2009/12/2 Michelle <michelle.dsouza at utoronto.ca>:
> Hi Boyan,
>
> I've replied inline below.
>
>
> On 2009-12-01, at 5:43 AM, Boyan Sheytanov wrote:
>
>>
>> 1. Is there a way to prevent the default action of an event without
>> having the event itself? I am listening for the "onSelect" event of
>> the Reorderer, which has a single argument - the item selected. I do
>> not want to follow the link but couldn't find a way to prevent the
>> default action since I do not have the event object (I had changed the
>> href to "#" in order to stay on the same page).
>
> Returning 'false' from your event listener should stop the default action. Try that and let me know if it works - if not I'll need to dig into the code a little.
>

Returning false from the event listener didn't stop the default action.

>
>> 2. How do you approach error handling? I receive the item that is
>> selected in the Reorderer and look for an image tag. What if due to
>> some reason there is no such tag (or there are two)? I added a check
>> for that, invoking fluid.fail, but since I didn't see many similar
>> calls in other components so I am wondering if I have done the right
>> thing.
>

I'm currently keeping the fluid.fail so that we know there's a special
case that needs to be handled. However, this is not an error that
would be caused by the user. Rather than that, a change in the
reorderer would trigger it (e.g. if the movable item contains two
images). So I expect this won't be an error that is likely to show up
at all. It's just kind of defensive programming. Not sure if it is a
designer decision, but Jonathan, what's your opinion about it?

> I think we should bring in a designer to decide how to deal with errors. 'fluid.fail' is a hard failure - I'm not certain you want to do that. You likely want to give a helpful message and recover the best you can. Perhaps a conversation with Jonathan is in order.
>
>> 3. I am using primarily jQuery to extract and substitute the source
>> from the image tag. Should I try to use the model of the component
>> (the list of images instead)? This would require to add some indexing
>> (probably a hidden input field) and synchronization of the model after
>> reordering.
>
> Can you let me know a little more about about this? Why are you changing the source? Is it when the user selects a thumbnail?

Yes, I am changing the source of the preview when the user selects a
thumbnail. I'll be leaving it with jQuery for now, but we can always
change it later.

>
> I'll be online early tomorrow morning so we could talk about these things in the channel or on Skype if that's easier.
>

My university schedule this week is a bit messed up (a lot of projects
there need my attention), so my availability is changing rapidly on
the run. I'll try to be online though, so that we can have some
discussion on these.

> Michelle
>
>
>
>
> ------------------------------------------------------
> Michelle D'Souza
> Software Developer, Fluid Project
> Adaptive Technology Resource Centre
> University of Toronto
>
>
>
>

Greetings, Boyan



More information about the fluid-work mailing list