Moodle

Upgrade to YUI 2.6.0 or latest

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 1.9.4, 2.0
  • Component/s: AJAX
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Nicolas, can you upgrade our copy of YUI occasionally?

Note that Yu used to strip it of some unnecessary stuff to keep the size down.

Issue Links

Activity

Hide
Nicolas Connault added a comment -

Updated YUI

Show
Nicolas Connault added a comment - Updated YUI
Hide
Martin Dougiamas added a comment - - edited

Thanks Nicolas, but please please can you not do a wholesale DELETE of the whole directory before re-adding it?

1) It leaves the Stable CVS in a broken state between your delete and add
2) It ruins the history and it's very hard to see what's been added/changed.

Just install the new YUI over the top of your local copy, test it, clean it etc and check it in.

BTW, the upgrade seems to have also killed the filepicker in HEAD ...

Show
Martin Dougiamas added a comment - - edited Thanks Nicolas, but please please can you not do a wholesale DELETE of the whole directory before re-adding it? 1) It leaves the Stable CVS in a broken state between your delete and add 2) It ruins the history and it's very hard to see what's been added/changed. Just install the new YUI over the top of your local copy, test it, clean it etc and check it in. BTW, the upgrade seems to have also killed the filepicker in HEAD ...
Hide
Dongsheng Cai added a comment -

All the "click" events are broken in treeview and thumbnail view, I tried use Element API, Event API and native DOM function to add event handler, they all don't work, do you have any clue?

Show
Dongsheng Cai added a comment - All the "click" events are broken in treeview and thumbnail view, I tried use Element API, Event API and native DOM function to add event handler, they all don't work, do you have any clue?
Hide
Nicolas Connault added a comment -

Dongsheng, I've tested all the 1.9 code in STABLE and in contrib, and everything works fine except for a block (dicotrad) in contrib (I've emailed the author).

I suspect that your problem in HEAD is due to some YUI code that was buggy in the previous version and has been fixed in the new one. You may have found some workarounds for these bugs which are now broken. For example TreeView was not working well (and is still in beta stage).

I would be happy to help debug this, but there isn't much code in HEAD I can currently use for testing the file picker, so maybe you could give me some pointers.

Show
Nicolas Connault added a comment - Dongsheng, I've tested all the 1.9 code in STABLE and in contrib, and everything works fine except for a block (dicotrad) in contrib (I've emailed the author). I suspect that your problem in HEAD is due to some YUI code that was buggy in the previous version and has been fixed in the new one. You may have found some workarounds for these bugs which are now broken. For example TreeView was not working well (and is still in beta stage). I would be happy to help debug this, but there isn't much code in HEAD I can currently use for testing the file picker, so maybe you could give me some pointers.
Hide
Dongsheng Cai added a comment -

Thanks,Nicolas, I will have a look at changelog.

Show
Dongsheng Cai added a comment - Thanks,Nicolas, I will have a look at changelog.
Hide
Dan Poltawski added a comment -

Doing YUI upgrades on the stable branch makes me nervous - is there particular motivation behind it?

Show
Dan Poltawski added a comment - Doing YUI upgrades on the stable branch makes me nervous - is there particular motivation behind it?
Hide
Martin Dougiamas added a comment -

The main reason is to have the latest greatest version available for 3rd party developers, since YUI is evolving.

It does need to be tested very well before it hits stable (and tracking changes should be made as easy as possible by not deleting the older versions first)

Show
Martin Dougiamas added a comment - The main reason is to have the latest greatest version available for 3rd party developers, since YUI is evolving. It does need to be tested very well before it hits stable (and tracking changes should be made as easy as possible by not deleting the older versions first)
Hide
Dongsheng Cai added a comment -

YEAH!, File picker is fixed

Show
Dongsheng Cai added a comment - YEAH!, File picker is fixed
Hide
Dongsheng Cai added a comment -

CSS problem

Show
Dongsheng Cai added a comment - CSS problem
Hide
Matt Gibson added a comment -

Hi guys.

I've just finished fixing the breakage this caused to my 3rd party block - quite a surprise. I would not advocate upgrading again on a stable branch as there was no warning at all that some of the API had changed for treeview onclick events. I'm otherwise grateful for the extra functionality of course

Not sure if this should be a separate issue, but the CSS images are all broken at the moment as they all refer to e.g.

background:url(../../../../assets/skins/sam/sprite.png)

which doesn't work at all and should be

background:url(<?php echo $CFG->wwwroot; ?>/lib/yui/assets/skins/sam/sprite.png)

Show
Matt Gibson added a comment - Hi guys. I've just finished fixing the breakage this caused to my 3rd party block - quite a surprise. I would not advocate upgrading again on a stable branch as there was no warning at all that some of the API had changed for treeview onclick events. I'm otherwise grateful for the extra functionality of course Not sure if this should be a separate issue, but the CSS images are all broken at the moment as they all refer to e.g. background:url(../../../../assets/skins/sam/sprite.png) which doesn't work at all and should be background:url(<?php echo $CFG->wwwroot; ?>/lib/yui/assets/skins/sam/sprite.png)
Hide
Nicolas Connault added a comment -

Thanks for the report Matt. Was your block in contrib? I did a thorough search in contrib of all code that used these libraries, and updated where possible, but it's possible I missed yours.

I'll fix the css image paths, thanks!

Show
Nicolas Connault added a comment - Thanks for the report Matt. Was your block in contrib? I did a thorough search in contrib of all code that used these libraries, and updated where possible, but it's possible I missed yours. I'll fix the css image paths, thanks!
Hide
Matt Gibson added a comment -

Hi Nicholas,

Yes, its in contrib/plugins/blocks/ajax_marking, but it wasn't simple to update and needed a bit of a rewrite to get it working (not helped by YUIs poor documentation of the change). Probably good in the end as it made me fix a load of other stuff at the same time.

Show
Matt Gibson added a comment - Hi Nicholas, Yes, its in contrib/plugins/blocks/ajax_marking, but it wasn't simple to update and needed a bit of a rewrite to get it working (not helped by YUIs poor documentation of the change). Probably good in the end as it made me fix a load of other stuff at the same time.
Hide
Dongsheng Cai added a comment -

Hi, Nicholas,

I have the background image problems too(see attached image), it only happened in ie6 (worked fine on ie5.5 and ie7, firefox, safari and chrome), do you have any clue?

Show
Dongsheng Cai added a comment - Hi, Nicholas, I have the background image problems too(see attached image), it only happened in ie6 (worked fine on ie5.5 and ie7, firefox, safari and chrome), do you have any clue?
Hide
Nicolas Connault added a comment -

Ok Dongsheng, I can see the issue in IE6. Looking into a solution. In the meantime, I noticed that dragging the filepicker around in IE5.5 replaces its content with a blueish background which doesn't go away.

Show
Nicolas Connault added a comment - Ok Dongsheng, I can see the issue in IE6. Looking into a solution. In the meantime, I noticed that dragging the filepicker around in IE5.5 replaces its content with a blueish background which doesn't go away.
Hide
Nicolas Connault added a comment -

Added a hack for ie6, which causes a little glitch in ie5.5, but nothing major. The drag&drop issue in 5.5 is still there.

Show
Nicolas Connault added a comment - Added a hack for ie6, which causes a little glitch in ie5.5, but nothing major. The drag&drop issue in 5.5 is still there.
Hide
Dongsheng Cai added a comment -

Cool! Thanks, Nicolas!

Show
Dongsheng Cai added a comment - Cool! Thanks, Nicolas!
Hide
Dongsheng Cai added a comment -

On more thing, Nicolas, when I resize file picker, file picker mess up.

Show
Dongsheng Cai added a comment - On more thing, Nicolas, when I resize file picker, file picker mess up.
Hide
Dongsheng Cai added a comment -

sorry, I have to reopen it, resizing file picker doesn't work well on IE6.

Show
Dongsheng Cai added a comment - sorry, I have to reopen it, resizing file picker doesn't work well on IE6.
Hide
Dongsheng Cai added a comment -

The problem of file picker fixed.

Show
Dongsheng Cai added a comment - The problem of file picker fixed.
Hide
Andrew Davis added a comment -

This has been inactive for over a year so I'm switching the QA Assignee from skodak to me. moodle 1.9 still has YUI 2.6. Moodle 2 has since gone on to YUI 2.7

Ajax behaviour is functioning as expected and the moodle 2 file picker looks good. Closing.

Show
Andrew Davis added a comment - This has been inactive for over a year so I'm switching the QA Assignee from skodak to me. moodle 1.9 still has YUI 2.6. Moodle 2 has since gone on to YUI 2.7 Ajax behaviour is functioning as expected and the moodle 2 file picker looks good. Closing.

Dates

  • Created:
    Updated:
    Resolved: