Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #843 (closed enhancement: wontfix)

Opened 11 years ago

Last modified 8 years ago

Pagination for the widget browser

Reported by: alberto Owned by: anonymous
Priority: normal Milestone: 1.x
Component: Toolbox Version: 0.9a5
Severity: normal Keywords:
Cc:

Description

Now that the widget browser is pulling so much code for the syntax highlighter to highlight, my FF warns me that a script is taking too much to execute (giving me the option to stop it).

I think we could avoid this by paginating the widget browser. This will also make it scale better when many third-party widgets are installed.

Attachments

lazy_highlight.patch Download (2.5 KB) - added by roger.demetrescu 11 years ago.

Change History

comment:1 Changed 11 years ago by michele

It's strange with my implementation I wasn't getting any error but now I'm getting this:

unexpected end of XML source

Also, my implementation was using the lazy loading (if we can call it so of tabs) that looks nicer since it hides tabs until they are ready.

comment:2 Changed 11 years ago by alberto

Are you referring to the line where it said:

    <script type="text/javascript">
    <![CDATA[
    /* Optional: Temporarily hide the "tabber" class so it does not "flash"
       on the page as plain HTML. After tabber runs, the class is changed
       to "tabberlive" and it will appear. */
    document.write('<style type="text/css">.tabber{display:none;}<\/style>');
    ]]>
    </script>

If so, it's already included by the Tabber widget.

I've tried to keep your original implementation intact (just factoring the tabber into a sep. widget). I *believe* the error is related to the widget template as there's now loads of code for the highlighter to work on. I might be wrong though, I'm no JS expert

Alberto

comment:3 Changed 11 years ago by michele

Mmm, yes it's there but it's not working anymore, when the page loads you should see only a series of widgets name and modules, also it seems as there are two </script> tag closing.

The template thing? it could be, but I'm pretty sure I was not getting this error we I added the template to my first patch... :-/

I will take a closer look when I have time, now I really have to go!

Thanks anyway. ;-)

comment:4 Changed 11 years ago by alberto

You are right and I'm a too fast (not like Renaults ;) copy paster. Be fixing Tabber in a second plus a few polishes. Thanks for spotting it.

Alberto

P.S.

The FF warning persist though :(

comment:5 Changed 11 years ago by godoy

It doesn't come up here to me (the warning, I mean).

The looks of this is amazing! VERY nice work! :-) You're great with these tools.

comment:6 Changed 11 years ago by alberto

It doesn't come up here to me (the warning, I mean).

Lucky you ;) I still think we need some kind of pagination anyway... for the "scaling" issue.

The looks of this is amazing! VERY nice work! :-) You're great with these tools.

Thanks :) I should mention thouigh that the "real" job has been done by Matt at #840 and Michele at #841, I'm just the committer ;)

comment:7 Changed 11 years ago by alberto

Sorry, forgot to mention Roger's work on the Tabber at #653. Thanks all! :) Now, does anyone else want to be thanked effusively for closing this one? ;)

I'm going to stop my rampage for today, need to get some other work done... :(

comment:8 Changed 11 years ago by godoy

On further testing it here, I noticed that all AJAX widgets stopped working on the toolbox... Maybe there was some name change due to nesting that was not reflected on their "Desc" counterparts.

comment:9 Changed 11 years ago by michele

Strange, all Ajax widgets working fine here! ;-)

Ah, regarding the unexpected end of XML source this is popped up by firebug and is caused by the </script> tag.

comment:10 Changed 11 years ago by alberto

Everything fine here.... :/

No change was made to the widget code, The Tabber implementation is not a CompoundWidget? (like on #653) but just a widget that pulls css and js into the page, hence no new nesting whatsoever.

Can you provide some more info in case I *really* messed up something? ;)

Regarding "unexpected end of XML source" it should be fixed by [1421]

comment:11 Changed 11 years ago by godoy

It's fixed in 1424... Probably the script tag problem and I got it before you fix it.

comment:12 Changed 11 years ago by alberto

great :) Now I can safely quit Mail and get some work done before I get whipped by my bosses ;)

Alberto

comment:13 Changed 11 years ago by michele

All working perfectly now, the guilty was this </script> tag.

Regarding pagination, yes it could be useful but still here on my system the page using the hide tabs trick is pretty snappy, I would rather prefer to provide a TOC like the one I mentioned on #840.

Oh, keep in my mind that my laptop is powered by a genuine Ferrari/Schumy? engine and not a slow Reanult/Alonso? one. :P :P :P :P

Ops, couldn't resist...

comment:14 Changed 11 years ago by alberto

Grrrrr... just wait 'till I get myself a new MacBook? (and Renault's engieneers wake up, maybe in a couple of weeks...) :P

comment:15 Changed 11 years ago by roger.demetrescu

Hi guys,

What about if do synxtax highlight on demand ?

Please see attached patch... :)

Cheers

Roger

Changed 11 years ago by roger.demetrescu

comment:16 Changed 11 years ago by michele

I think it's a great idea Roger, I'm goig to try your patch... ;-)

comment:17 Changed 11 years ago by michele

Roger, this patch *rocks*, let's see what the others think since they had problems before... :P

comment:18 Changed 11 years ago by alberto

I'm sorry to spoil the party here... :( The patch is cool, and works for me, but I think the solution to the root of the problem would be to paginate the browser and split widgets by package with a TOC (as Michele suggested) for navigation.

The current all-widgets-in-one-page solution will not scale well IMO when people start contributing loads of third-party widgets.

Apart from this, great path Roger ;)

Alberto

comment:19 Changed 11 years ago by michele

Yes, your points still remains, we need sections, toc and paginate.

But this patch allows the browser to load fast and use syntax highlight *only* when needed in *all* situations so we should use it.

True fact: an all in one page doesn't scale well and becomes increasingly harder to use. ;-)

comment:20 Changed 11 years ago by alberto

I've just tried the patch and it's better than what I've thought... ;) My slow Ren.. Apple powerbook is happy with it and Firefox has stopped insulting me.

My vote goes for comitting it ASAP (too bad it couldn't make it to .9a6 :( ) but keep this ticket open to remind us we still need to paginate.

Great work Roger! ;)

Alberto

comment:21 Changed 11 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed

I committed this patch in [1477]. Thanks, Roger!

comment:22 Changed 11 years ago by kevin

  • Status changed from closed to reopened
  • Resolution fixed deleted

Of course, this ticket's not done yet though :)

comment:23 Changed 11 years ago by jorge.vargas

  • Milestone set to 1.0

does 1.0 seems ok for this? can't we use the pagination code to paginate the widgets?

comment:24 Changed 10 years ago by alberto

  • Milestone changed from 1.0 to 1.1

comment:25 Changed 10 years ago by alberto

  • Milestone changed from 1.1 to __unclassified__

Batch moved into unclassified from 1.1 to properly track progress on the later

comment:26 Changed 8 years ago by jorge.vargas

  • Milestone changed from __unclassified__ to 1.x

comment:27 Changed 8 years ago by Chris Arndt

  • Status changed from reopened to closed
  • Resolution set to wontfix

Cruft ticket. Frankly, I don't see much need for this. IMHO widget authors should provide a demo project to showcase their widget anyway. Also, it isn't like the widget browser is teeming with user contributed widgets three years after this ticket was opened.

Closing this as "wontfix".

Note: See TracTickets for help on using tickets.