[2.8] WAAnchorTag>>onClick:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[2.8] WAAnchorTag>>onClick:

Boris Popov, DeepCove Labs (SNN)
This one took almost 20 minutes to track down. Previous version stuffed
'javascript:void(0)' into href-less anchors to make browsers respect it
as an anchor and apply styles, whereas 2.8 is not doing it anymore. What
was the reason for removal?

onClick: aString
 super onClick: aString.
 self attributes at: 'href' ifAbsentPut: ['javascript:void(0)']

Thanks!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: [2.8] WAAnchorTag>>onClick:

Boris Popov, DeepCove Labs (SNN)
With override back in place, recursion bug I posted earlier fixed and a
few changes I listed on my blog, everything does seem to work now. Quite
amazing actually, good job everyone! I'll do more testing next week and
let you know if anything else is amiss as far as our application is
concerned.

Cheers,

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Boris Popov
> Sent: Friday, July 06, 2007 5:28 PM
> To: Seaside - general discussion
> Subject: [Seaside] [2.8] WAAnchorTag>>onClick:
>
> This one took almost 20 minutes to track down. Previous version
stuffed
> 'javascript:void(0)' into href-less anchors to make browsers respect
it
> as an anchor and apply styles, whereas 2.8 is not doing it anymore.
What

> was the reason for removal?
>
> onClick: aString
>  super onClick: aString.
>  self attributes at: 'href' ifAbsentPut: ['javascript:void(0)']
>
> Thanks!
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [2.8] WAAnchorTag>>onClick:

Lukas Renggli
In reply to this post by Boris Popov, DeepCove Labs (SNN)
> This one took almost 20 minutes to track down. Previous version stuffed
> 'javascript:void(0)' into href-less anchors to make browsers respect it
> as an anchor and apply styles, whereas 2.8 is not doing it anymore. What
> was the reason for removal?

Note that Seaside 2.8 is still work in progress and that you just
discovered a place where refactorings are going on.

The initial reason for this change was WAPopupAnchorTag:

1. WAPopupAnchorTag produced invalid Javascript up to know.

2. The recent refactoring enables:
   - Search engines follow the link.
   - Anchors work even if Javascript is disabled.
   - Power user have a better control where the new window should be
opened (same window, new window, new tab).

3. Moreover the refactoring made WAPopupAnchorTag a real subtype of
WAAnchorTag, before it was just a hack that added some behavior of
WAAnchorTag but mostly destroyed functionality from its superclass.

4. Less code. Less magic.

This refactoring would not have been possible, if WAAnchorTag
automatically added javascript:void(0) to the on click event.

We are about to clean up WAAnchorTag (in a backward compatible way).
Some general ideas that drive these cleanups of the tag hierarchy are:

1. Dependencies in the order of configuration messages should be
avoided altogether (this was not the case with #onClick:). The only
thing people should need to know is that #with: has to be last.

2. Configuration messages should not have unpredictable side-effects
(again this was not the case with #onClick:).

3. URLs should be URL objects, not Strings. Only this allows to
properly encode the resulting response.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [2.8] WAAnchorTag>>onClick:

Lukas Renggli
In reply to this post by Boris Popov, DeepCove Labs (SNN)
> With override back in place, recursion bug I posted earlier fixed and a
> few changes I listed on my blog, everything does seem to work now. Quite
> amazing actually, good job everyone! I'll do more testing next week and
> let you know if anything else is amiss as far as our application is
> concerned.

Thanks, how is the recursion problem solved? I couldn't find on you
blog what you actually changed?

Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [2.8] WAAnchorTag>>onClick:

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Re: [Seaside] [2.8] WAAnchorTag>>onClick:

Fair enough, I do expect to find things and that's why I'm doing it. Whatever you decide to do I think its important to have href added automagically to anchors that are there for onclick alone so that anchor styling applied still. No?

Cheers!

-Boris
(Sent from an iPhone... Not!)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: Seaside - general discussion <[hidden email]>
Sent: Sat Jul 07 02:27:05 2007
Subject: Re: [Seaside] [2.8] WAAnchorTag>>onClick:

> This one took almost 20 minutes to track down. Previous version stuffed
> 'javascript:void(0)' into href-less anchors to make browsers respect it
> as an anchor and apply styles, whereas 2.8 is not doing it anymore. What
> was the reason for removal?

Note that Seaside 2.8 is still work in progress and that you just
discovered a place where refactorings are going on.

The initial reason for this change was WAPopupAnchorTag:

1. WAPopupAnchorTag produced invalid Javascript up to know.

2. The recent refactoring enables:
   - Search engines follow the link.
   - Anchors work even if Javascript is disabled.
   - Power user have a better control where the new window should be
opened (same window, new window, new tab).

3. Moreover the refactoring made WAPopupAnchorTag a real subtype of
WAAnchorTag, before it was just a hack that added some behavior of
WAAnchorTag but mostly destroyed functionality from its superclass.

4. Less code. Less magic.

This refactoring would not have been possible, if WAAnchorTag
automatically added javascript:void(0) to the on click event.

We are about to clean up WAAnchorTag (in a backward compatible way).
Some general ideas that drive these cleanups of the tag hierarchy are:

1. Dependencies in the order of configuration messages should be
avoided altogether (this was not the case with #onClick:). The only
thing people should need to know is that #with: has to be last.

2. Configuration messages should not have unpredictable side-effects
(again this was not the case with #onClick:).

3. URLs should be URL objects, not Strings. Only this allows to
properly encode the resulting response.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [2.8] WAAnchorTag>>onClick:

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Re: [Seaside] [2.8] WAAnchorTag>>onClick:

Oh sorry I emailed the list, quote,

I'm back in business with,

encodeOn: aDocument
 aDocument print: self displayString asString

Cheers!

-Boris
(Sent from an iPhone... Not!)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: Seaside - general discussion <[hidden email]>
Sent: Sat Jul 07 02:28:24 2007
Subject: Re: [Seaside] [2.8] WAAnchorTag>>onClick:

> With override back in place, recursion bug I posted earlier fixed and a
> few changes I listed on my blog, everything does seem to work now. Quite
> amazing actually, good job everyone! I'll do more testing next week and
> let you know if anything else is amiss as far as our application is
> concerned.

Thanks, how is the recursion problem solved? I couldn't find on you
blog what you actually changed?

Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside