Last Comment Bug 453268 - Move to YUI 3.x (latest stable yui3 release)
: Move to YUI 3.x (latest stable yui3 release)
Status: RESOLVED WONTFIX
:
Product: Bugzilla
Classification: Server Software
Component: User Interface (show other bugs)
: 3.2
: All All
: P1 enhancement (vote)
: ---
Assigned To: Ishitva Goel
: default-qa
Mentors:
http://yuilibrary.com/download/yui3/
Depends on:
Blocks: 504164
  Show dependency treegraph
 
Reported: 2008-09-02 02:20 PDT by Max Kanat-Alexander
Modified: 2014-10-27 04:34 PDT (History)
20 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Max Kanat-Alexander 2008-09-02 02:20:42 PDT
As soon as the final version of YUI 3 comes out, we should move to it.

We should already start writing a patch that fixes the current stuff to use the new syntax, because I doubt it'll be that different between now and 3.0 final.
Comment 1 Albert Ting 2008-09-03 11:56:05 PDT
Looking forward to it!
Comment 2 Frédéric Buclin 2009-12-30 17:52:10 PST
YUI 3 has been released on September 2009.
Comment 3 Frédéric Buclin 2009-12-30 18:02:07 PST
Note that widgets in YUI 3 will only be available in 2010.
Comment 4 Max Kanat-Alexander 2009-12-31 02:28:09 PST
(In reply to comment #3)
> Note that widgets in YUI 3 will only be available in 2010.

  Yeah, we're waiting for it to contain a Calendar widget before we move over. I've used YUI 3 in another project, though, and it's pretty nice and I think that it will be a good idea to move as soon as we can.
Comment 5 David Lawrence [:dkl] 2011-01-20 22:31:56 PST
Might be useful when doing the work of porting from 2 to 3, http://www.yvoschaap.com/yui2yui3/

Dave
Comment 6 Frédéric Buclin 2011-07-17 15:47:48 PDT
(In reply to comment #4)
>   Yeah, we're waiting for it to contain a Calendar widget

Looks like this is doable now:

  http://developer.yahoo.com/yui/3/examples/yui/yui-compat.html
  http://yuilibrary.com/gallery/show/calendar
Comment 7 Max Kanat-Alexander 2011-07-19 16:11:20 PDT
(In reply to comment #6)
>   http://developer.yahoo.com/yui/3/examples/yui/yui-compat.html

  Yeah, we would do it that way. :-)

>   http://yuilibrary.com/gallery/show/calendar

  I think that's just a gallery component, and not an official YUI component; if we switch the calendar away from YUI 2, I'd want to use whatever official YUI component comes out.
Comment 8 Frédéric Buclin 2011-07-27 11:47:12 PDT
I think we should wait a bit and move to YUI 3.4.0, which will have the Calendar widget back, see http://www.yuiblog.com/blog/2011/07/25/yui-open-hours-thurs-july-28st/.
Comment 9 Max Kanat-Alexander 2011-08-02 16:00:12 PDT
Woot! Agreed. :-)
Comment 10 Frédéric Buclin 2011-08-18 05:11:21 PDT
YUI 3.4.0 has been released earlier this week. Any volunteer to do the upgrade? :)

Direct download link: http://yui.zenfs.com/releases/yui3/yui_3.4.0.zip
Comment 11 Frédéric Buclin 2012-04-12 04:00:56 PDT
YUI 3.5.0 has been released this week, which deprecates some API in 3.4.1. So we should jump to 3.5.0 directly to avoid using already deprecated code.
Comment 12 Frédéric Buclin 2012-08-18 16:37:06 PDT
We are too close to branching for 4.4 to do the move now. We have to wait for the 4.5 dev cycle.
Comment 13 Frédéric Buclin 2012-08-18 17:50:13 PDT
pyrzak raised a good point on IRC: YUI 2 and YUI 3 are *very* different languages. It's like moving from Perl 5 to Perl 6. And so the question is: wouldn't it make more sense to shift to jQuery instead? I think YUI2 is mostly EOL, and shiny new features will only be implemented in YUI3. On the other hand, jQuery is very popular, and would help to get more contributors, compared to YUI3 which is probably an unknown library to most of us.
Comment 14 David Marshall 2012-08-18 18:17:43 PDT
I volunteer to work on this as my time permits and assuming that our open-source group doesn't object. If I can, I'll try to interest other folks at Yahoo! and try to get more cycles working on this.

I don't have an estimate for when this might be done. Our own Bugzilla is characterized by a YUI mishmash, and I need to learn more about YUI for our own needs.
Comment 15 Koosha KM 2012-08-19 01:16:13 PDT
I definitely vote for jQuery--the most popular JavaScript library.
Comment 16 mail 2012-08-19 15:46:22 PDT
(In reply to Koosha Khajeh Moogahi [:koosha] from comment #15)
> I definitely vote for jQuery--the most popular JavaScript library.

+1
Comment 17 David Lawrence [:dkl] 2012-08-19 21:02:56 PDT
My vote for YUI3. From what I have done with YUI3 the syntax is not that different from jQuery and having Yahoo on our side should help with the migration as well as any future work/help needed by Bugzilla. 

dkl
Comment 18 ferg2k 2012-08-20 10:59:28 PDT
+1 for YUI.  Healthier namespace control + dmarshal already has most of the work in hand.
Comment 19 evan 2012-08-20 13:42:41 PDT
Hi all,

I'm a colleague of David Marshall's at Yahoo! and the author of the YUI 3 Cookbook. I am not a core YUI team member, but I work with them very closely. I've also been a heavy Y! Bugzilla end-user for over seven years now. :)

First off, jQuery is great within its domain: DOM, events, animations, and Ajax. The wrinkle is that by itself, jQuery does not help you separate concerns, factor code into modules, or write extensible code. By its nature, jQuery is a powerful DOM/event/Ajax abstraction layer. Period. Of course, experienced developers successfully build sophisticated apps with jQuery all the time, but they don't do it with *just* jQuery. They succeed by developing their own conventions & structure, and by assembling a stack of additional helper libraries: for utility methods, for module loading, for models and views, etc.

By contrast, YUI 3 is not so much a classic "JS library" as it is a modular toolkit, with extra structural support for organizing widgets and apps. If you look at widgets like Calendar and DataTable and AutoComplete, you'll notice they all have similar behaviors around configuration and rendering. All YUI widgets offer the same clear extension points. All YUI widgets have at least some notion of separating behavior & presentation. For full fledged Apps with a capital A, this means that YUI has consistent notions of how to build and extend Models, Routers, and Views, and how these components are all supposed to work together.

TL;DR -- YUI 3 comes with built-in notions of modularity and structure, while jQuery has no opinion about the rest of the stack. That could be a good or bad thing, depending on what the Bugzilla community wants to do!

If you want to research YUI 3 further, there's a really friendly IRC community in #yui on freenode.net where the core YUI team and other experienced frontend engineers hang out. They would love to answer further questions (as would I).

As for learning YUI 3 -- in all seriousness, I wouldn't worry about that. YUI 3's DOM APIs are (by design) fairly similar to jQuery's, as illustrated by http://jsrosettastone.com. Any frontend engineer worth their salt should be able to wrap their head around YUI's conventions with little trouble.
Comment 20 Guy Pyrzak 2012-08-23 19:56:01 PDT
since I didn't see it in the bug, David Marshall's fork that has a lot of YUI3 work done it in already:

https://code.launchpad.net/~dmarshal/bugzilla/yui3

I haven't looked at this yet myself but I figured it should be in the bug instead of an email thread.
Comment 21 David Marshall 2012-08-23 20:09:19 PDT
(In reply to Guy Pyrzak from comment #20)
> since I didn't see it in the bug, David Marshall's fork that has a lot of
> YUI3 work done it in already:
> 
> https://code.launchpad.net/~dmarshal/bugzilla/yui3
> 

If there's any YUI3 in that, it's because of previous efforts - I haven't done anything there yet. I talked a bit with Evan Goer about this today, and we're getting the word out to other YUI folks who might be able/willing to contribute.
Comment 22 David Marshall 2012-08-24 12:09:08 PDT
When I noticed that Launchpad's mirror of bzr.mozilla.org wasn't actually mirroring (and asked about it), they moved the branch, so I had to recreate lp:~dmarshal/bugzilla/yui3. Guy was the only person subscribed to the old branch, anyhow. I don't expect that anyone had the old branch checked out, but if you did and it's munged now, I apologize.
Comment 23 Frédéric Buclin 2012-11-04 06:03:27 PST
And now YUI 3.7.3 is out with improved support for IE10. David: any progress on the migration to YUI3?
Comment 24 Frédéric Buclin 2012-11-04 06:19:49 PST
Another good reason to leave YUI2 asap is this kind of security vulnerability announcements:

 http://www.yuiblog.com/blog/2012/10/30/security-announcement-swf-vulnerability-in-yui-2/
Comment 25 David Marshall 2012-11-04 10:52:11 PST
(In reply to Frédéric Buclin from comment #23)
> And now YUI 3.7.3 is out with improved support for IE10. David: any progress
> on the migration to YUI3?

Evan Goer and I have been talking about this with LpSolit recently. Evan's group at Y! is in the process of taking over Bugzilla development from me (and I haven't been working much on it recently). That group has a great concentration of YUI know-how, so I imagine that they'll be working on it soon, plus Evan and I will be collaborating on doing YUI fixes to trunk.
Comment 26 evan 2012-11-04 18:40:23 PST
Yup. I asked LpSolit some questions in IRC, and I think we agreed that as a first cut, we would attempt to faithfully replicate BZ's YUI2 functionality in YUI3. (However, we could drop workarounds intended for *very* old/obscure browsers, like Mac IE. The minimum baseline for support is IE6.)

As David said, we'll be collaborating on moving all YUI3 fixes to trunk. As for the YUI2 SWF vulnerability -- yup, there are lots of good reasons to migrate, though I don't think BZ was actually using any SWF files? I could be wrong about that.
Comment 27 Frédéric Buclin 2012-11-05 09:27:06 PST
(In reply to evan from comment #26)
> As for the YUI2 SWF vulnerability -- yup, there are lots of good reasons to
> migrate, though I don't think BZ was actually using any SWF files?

There are two SWF files in the bugzilla/js/yui/ directory: swfstore.swf and connection.swf. I got no reply from security@yuilibrary.com yet about this vulnerability and so I have no idea if and how Bugzilla is affected. I need this information asap.
Comment 28 David Lawrence [:dkl] 2012-11-05 09:53:59 PST
(In reply to Frédéric Buclin from comment #27)
> (In reply to evan from comment #26)
> > As for the YUI2 SWF vulnerability -- yup, there are lots of good reasons to
> > migrate, though I don't think BZ was actually using any SWF files?
> 
> There are two SWF files in the bugzilla/js/yui/ directory: swfstore.swf and
> connection.swf. I got no reply from security@yuilibrary.com yet about this
> vulnerability and so I have no idea if and how Bugzilla is affected. I need
> this information asap.

Well my completely simple grep of swfstore in the trunk Bugzilla tree yielded no hits (except for the YUI js files themselves) so my initial feeling is Bugzilla is not affected by this vulnerability. Unless by accessing the swf file(s) directly some information can be obtained that way.
Comment 29 David Marshall 2012-11-05 11:05:20 PST
connection.swf and swfstore.swf were added in bug 572949, and swfstore.swf was updated in bug 606618. As was pointed out in the latter bug, Bugzilla doesn't use those files. There was discussion whether to include them at all.  The vulnerability only affects self-hosted .swf files, so I don't think Bugzilla is affected.
Comment 30 Byron Jones ‹:glob› 2012-11-05 11:14:11 PST
(In reply to David Marshall from comment #29)
> The vulnerability only affects self-hosted .swf files, so I don't
> think Bugzilla is affected.

.. unless the swf files are used by an extension.
Comment 31 Reed Loden [:reed] (use needinfo?) 2012-11-05 11:22:18 PST
(In reply to Byron Jones ‹:glob› from comment #30)
> (In reply to David Marshall from comment #29)
> > The vulnerability only affects self-hosted .swf files, so I don't
> > think Bugzilla is affected.
> 
> .. unless the swf files are used by an extension.

Not even that... The fact that the .swf files exist in the same origin as Bugzilla can be bad, depending on the security vulnerabilit(y|ies) involved.
Comment 32 Frédéric Buclin 2012-11-05 11:25:19 PST
Could someone kick YUI security team ass and ask them to reply to our emails when we ask them more information about the vulnerability?!?
Comment 33 David Marshall 2012-12-11 16:41:44 PST
For the benefit of Mr. Goer:

https://code.launchpad.net/~dmarshal/bugzilla/yui3
Comment 34 evan 2012-12-11 21:49:35 PST
Thanks, David. I'll take a look and try to merge in your changes. 

Current status: I have done an inventory of all YUI 2 JS files, and I think now I have a reasonable understanding of what each one is doing (though of course I do have some questions). I've now started working actively on writing equivalent YUI 3 modules. My bzr branch is not yet pushed to launchpad, but I promise to do that soon.

Anyway, the requirements as I understand them are:

* Replace 100% of YUI 2 code with YUI 3. This includes inline JS, to be moved out of HTML and into YUI 3 modules.
* Duplicate & preserve existing JS functionality only. Verify with manual checks, to the best of my ability. (Down the road, could definitely use help here.)
* Provide some minimal YUI 3 unit tests. (100% test coverage not required. Functional tests out of scope.)
* Support browsers back through IE 6; code for very old/obscure browsers (IE/Mac, etc.) is okay to drop. 
  - NOTE: This does not mean that IE 6 will have *full* fidelity support compared to say Firefox 17 -- this isn't even the case now, as Bugzilla is using features like HTML5 History. It just means that Bugzilla must be usable in IE 6.
* Load all YUI 3 modules locally. For convenience, I'm currently violating this and loading the YUI 3 seed file remotely -- but I'll fix that before this bug is resolved.

Will report back here with updates. I'll also try to be a more regular presence on IRC.
Comment 35 Frédéric Buclin 2013-03-26 05:19:05 PDT
FYI, YUI 2.9.0 cannot be downloaded from Yahoo! anymore. We really need help to upgrade to YUI3 asap.

@evan: no news since December. :( Any progress?
Comment 36 Albert Ting 2013-03-26 09:56:32 PDT
FYI, I was still able to download YUI 2.9.0 from http://developer.yahoo.com/yui/2/
Comment 37 evan 2013-03-27 00:03:34 PDT
Sorry, Frédéric -- I've been buried in non-Bugzilla work for the last quarter. :/

I have a VERY tentative work-in-progress on launchpad: https://code.launchpad.net/~evan-goer/bugzilla-yui3/yui3. 

In the js directory, you'll see that a number of the legacy JS files are gone, replaced with complete YUI 3 modules in the js/src directory. The last thing I was working on was the JS that manages boolean fields for advanced searches, so that module doesn't work yet. The fork also includes a number of changes to the template files, all around removing inline JS and moving that logic into self-contained YUI3 modules.
Comment 38 Reed Loden [:reed] (use needinfo?) 2013-03-27 00:27:13 PDT
Removal of inline JS == easier to implement CSP == make reed very happy! :)
Comment 39 Byron Jones ‹:glob› 2013-06-05 23:24:29 PDT
one issue we encountered with yui3 on bmo is it installs an unload listener on the window which prevents bfcache from working on firefox (bug 852279); please make sure that issue is addressed as part of this work.
Comment 40 Byron Jones ‹:glob› 2013-06-17 09:21:37 PDT
(In reply to Byron Jones ‹:glob› from comment #39)
> one issue we encountered with yui3 on bmo is it installs an unload listener
> on the window which prevents bfcache from working on firefox (bug 852279);
> please make sure that issue is addressed as part of this work.

that's http://yuilibrary.com/projects/yui3/ticket/2529672 and it's a hard blocker for this.
Comment 41 Dave Miller [:justdave] (justdave@bugzilla.org) 2013-07-02 20:36:26 PDT
@evan: any status update?  Last merge on that Launchpad branch was in March.  We still need to figure out some way to deal with http://yuilibrary.com/projects/yui3/ticket/2529672 as well.
Comment 42 evan 2013-07-02 22:36:57 PDT
Hey Dave -- unfortunately I've had no extra time to work on the conversion in the last quarter. My group has been focusing on other tools that need a lot more help. In contrast to those other tools, Bugzilla "just works."

As for http://yuilibrary.com/projects/yui3/ticket/2529672, it looks like the ticket was recently assigned to Satyen, which is a step forward.
Comment 43 evan 2013-07-03 23:59:43 PDT
There is a new pull request outstanding for the bfcache fix: https://github.com/yui/yui3/pull/965 (related to https://github.com/yui/yui3/issues/959)
Comment 44 evan 2013-08-13 19:36:18 PDT
Unfortunately I am not currently working on BZ in any capacity. Reassigning back to Mr. Marshall.
Comment 45 Christopher Trom 2013-08-13 20:47:16 PDT
It will be a couple weeks before I can commit any significant amount of time to this, but I am happy to take over this bug.
Comment 46 David Lawrence [:dkl] 2013-08-14 07:16:13 PDT
(In reply to Christopher Trom from comment #45)
> It will be a couple weeks before I can commit any significant amount of time
> to this, but I am happy to take over this bug.

Wonderful news :)
Comment 47 Frédéric Buclin 2013-08-14 07:30:20 PDT
Do not forget that we first need the fix mentioned in comment 43 to be released. AFAIK, YUI 3.11 still doesn't have this fix.
Comment 48 Christopher Trom 2013-08-16 19:19:29 PDT
(In reply to Frédéric Buclin from comment #47)
> Do not forget that we first need the fix mentioned in comment 43 to be
> released. AFAIK, YUI 3.11 still doesn't have this fix.

YUI 3.11 doesn't, but 3.12 should and it is scheduled to be released later this month. 
Reference:
https://github.com/yui/yui3/wiki/Development-Schedule
Comment 49 Frédéric Buclin 2013-08-29 15:41:59 PDT
The bfcache problem has finally been fixed in YUI 3.12, which has been released today:

https://github.com/yui/yui3/wiki/YUI-3.12.0-Change-History-Rollup#event-infrastructure-change-history
Comment 50 Acho Arnold (:bePolite) 2014-02-16 04:19:29 PST
I would like to work on this project for doing the migrations. Any thing in particular I should know about?
Comment 51 Frédéric Buclin 2014-02-16 05:29:23 PST
(In reply to acho.arnold from comment #50)
> I would like to work on this project for doing the migrations. Any thing in
> particular I should know about?

Nothing special, except that you must use trunk code for development (not 4.4.x).
Comment 52 Acho Arnold (:bePolite) 2014-02-16 06:45:31 PST
(In reply to Frédéric Buclin from comment #51)
> (In reply to acho.arnold from comment #50)
> > I would like to work on this project for doing the migrations. Any thing in
> > particular I should know about?
> 
> Nothing special, except that you must use trunk code for development (not
> 4.4.x).

Thank you. I am fairly comfortable with java script and I started learning perl today! I hope this bug would be a great start!
Comment 53 Ishitva Goel 2014-02-17 23:02:52 PST
I want to start working on YUI2 to YUI3 migration . May I get the instructions please ?
Comment 54 Byron Jones ‹:glob› 2014-02-17 23:21:32 PST
comment 19 and comment 34 have an excellent overview of the work that's required to fix this bug.

while very desirable, i do not consider moving inline javascript into yui3 modules to be a hard requirement (sorry reed). i would gladly accept a patch which just faithfully replicates bugzilla's YUI2 functionality in YUI3, with the inline refactoring taking place at a later date.

to get a grasp on what's required, look at the WIP branch referenced in comment 37.  to work on this issue you'll need to have a local development environment for working on bugzilla.  familiarity with template-toolkit as well as yui is desirable, but not required.

note: if you're enquiring as a result of this bug being nominated for google summer of code 2014, be sure to submit a project proposal and wait for acceptance before starting work.
Comment 55 Ishitva Goel 2014-02-17 23:34:13 PST
Okay , thank you !(In reply to Byron Jones ‹:glob› from comment #54)
> comment 19 and comment 34 have an excellent overview of the work that's
> required to fix this bug.
> 
> while very desirable, i do not consider moving inline javascript into yui3
> modules to be a hard requirement (sorry reed). i would gladly accept a patch
> which just faithfully replicates bugzilla's YUI2 functionality in YUI3, with
> the inline refactoring taking place at a later date.
> 
> to get a grasp on what's required, look at the WIP branch referenced in
> comment 37.  to work on this issue you'll need to have a local development
> environment for working on bugzilla.  familiarity with template-toolkit as
> well as yui is desirable, but not required.
> 
> note: if you're enquiring as a result of this bug being nominated for google
> summer of code 2014, be sure to submit a project proposal and wait for
> acceptance before starting work.

Okay , thank you :)
Comment 56 gauravsaini03 2014-02-23 05:55:36 PST
Hello Team,

If we migrate from YUI to AngularJS and use bootstrap to wrap its theme into it, I think it will be the best idea. As AngualarJS is very Powerful and it will also speed up the bugzilla application. With bootstrap coming in frame, it will enhance the UI of Bugzilla.

What are your Ideas on this ?

Also, I am eager to work on this to migrating it to AngularJS.

Thanks
Gaurav
Comment 57 Andre Klapper 2014-02-23 08:33:04 PST
[removing needinfo flag.]  gauravsaini03: Please create a new ticket to discuss AngularJS. This ticket is about moving to YUI 3.12 only and could still be closed as WONTFIX if your proposal was executed. Thanks!
Comment 58 Acho Arnold (:bePolite) 2014-02-23 17:29:26 PST
To o this migration, would I need to touch the perl files or I just need to work with the files in /js/ directory and /template directory?
Comment 59 Byron Jones ‹:glob› 2014-02-23 23:05:31 PST
(In reply to acho.arnold from comment #58)
> To o this migration, would I need to touch the perl files or I just need to
> work with the files in /js/ directory and /template directory?

no perl files should require updating.
Comment 60 Frédéric Buclin 2014-02-25 12:03:38 PST
YUI 3.14 has support for IE11.
Comment 61 Ishitva Goel 2014-04-23 04:28:09 PDT
Thank you glob :)
Comment 62 Frédéric Buclin 2014-10-27 04:34:53 PDT
YUI3 is dead. The plan is to move to jQuery. Let's track this in another (and clean) bug.

Note You need to log in before you can comment on or make changes to this bug.