fluid-project/infusion — pull request #189 by amb26 (2011-11-13 06:07:40+00:00)
Title: Fluid 4525 - simplified implementation of UIOptions in FatPanel cross-iframe UI

The main goal of this branch was a considerable simplification of the code in "FatPanel" UIOptions - this has slashed 1/3 of the code in FatPanelUIOptions.js leaving behind 240 lines which are a lot more semantic than before. This has required widespread tweaks to framework support for "foreign iframes" - the new strategy is to send only jQuery's code (and direct dependents, such as jQuery UI plugins) into the foreign iframes, and keep all of the Fluid framework code (IoC and components) etc. behind as a single system in the "home iframe". This makes a lot of the workflow in FatPanel very much simpler and returns its structure as a single-rooted component tree to be very similar to that in the other two configurations.
The opportunity was also taken to resolve a number of issues with the event system that were discovered in the phase leading up to the Infusion 1.4 release (FLUID-4338, FLUID-4398, FLUID-4337, FLUID-4151, and a much older issue FLUID-4028). This rationalises the system a lot and adds considerable expressiveness in the form of new "boiled listeners" - that is, it is not necessary to create an entire new event for each required signature, each listener may freely adjust the signature that it receives just for itself. Also notable is support for "composite boiled events" which allow an event to be derived ("boiled") from more than one base event. The derived event fires only once one firing is received from each of the base set, and its signature may be boiled over any of the component events.
The general improvements to the framework for cross-iframe support are under FLUID-4536 - there have also been general improvements in framework diagnostics. Each event firer in the system is now supplied with a descriptive name that allows the identity of each event firing to be logged reasonably intelligibly. This is a prelude to a more general UI for getting access to IoC diagnostics at runtime. There were also some defensive fixes to the IoC system heading off some errors which have (probably) not yet been observed in cases where components are created as a result of the firing of non-IoC events. The "instantiator" system awaits more comprehensive overhaul as part of the FLUID-4392 additive demands blocks work.