• Like
Yui3.4.0 What's new
Upcoming SlideShare
Loading in...5
×

Yui3.4.0 What's new

  • 2,296 views
Uploaded on

 

More in: Real Estate , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,296
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
10
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. YUI 3.4.0(What’s new?)
    霸先(@enmaai)
  • 2. Initial release
    App Framework
    Calendar
    Graphics
    Panel
    Widget-autohide
    Widget-buttons
    Widget-modality
  • 3. Big Changes
    App Framework(beta)
    YUI and Loader
    Calendar(beta)
    Graphics API Updates(beta)
    New Widget Plugins
    Bug fixes and optimziations
  • 4. App Framework
    The YUI App Framework is a rollup of the Controller, Model, Model List, and View components, combined to form a simple MVC-style framework for writing single-page JavaScript applications.
    @see http://new.yuilibrary.com/yui/docs/app/
  • 5. YUI and Loader
    YUI.add('yui', function(Y){}, '3.3.0' ,{use:['yui-base','get','features','rls','intl-base','yui-log','yui-later','yui-throttle']});
    YUI.add('yui', function(Y){}, '3.4.0' ,{use:['yui-base','get','features','intl-base','yui-log','yui-later','loader-base', 'loader-rollup', 'loader-yui3' ]});
    remove ‘rls’,’yui-throttle’;
    add ‘loader-base’, 'loader-rollup', 'loader-yui3'
  • 6. YUI and Loader(seed)
    3.3.0
    yui-min.js GZIP 22k
    3.4.0
    yui-min.js GZIP 66k
  • 7. YUI and Loader(rollup)
  • 8. YUI and Loader(rollup)
  • 9. What’s the matter?
    both 3.3&3.4 are ok
    YUI().use(‘node’,function(Y){});
    3.3 is ok,3.4……
    <script src=“http://yui/3.3.0/build/node/node-style.js”></script>
    3.4 not work
    <script src=“http://yui/3.4.0/build/node-style/node-style.js”></script>
    the best
    YUI().use(‘node-base’,’node-style’,function(Y){});
  • 10. Calendar
  • 11. Graphics API
  • 12. Bug fixes and optimziations
  • 13. Attribute
    Added params to constructor, to support call to addAttrs on construction with user values, when augmenting and invoking constructor manually. Also broke out addAttrs logic on construction (introduced for Node), into its own _initAttrs method to facilitate customization.
  • 14. AutoComplete
    Added the ability to use a `<select>` node as a result source.
    #2529974: Function sources may now be either asynchronous or synchronous. Returning an array of results from a function source will cause it to be treated as synchronous (same as in 3.3.0). For async operation, don't return anything and pass an array of results to the provided callback function when the results become available.
    #2529974: Added a `sourceType` attribute to `AutoCompleteBase`, which may be used to force a specific source type, overriding the automatic source type detection.
    The `scrollIntoView` config option is now much smarter. It will only scroll if the selected result isn't fully visible. If the result is already entirely within the visible area of the viewport, no scrolling will occur.
    A pre-existing `listNode` may now be specified at initialization time.
    Added `subWordMatch` filters and highlighters. [Contributed by Tobias Schultze]
    The `this` object now refers to the current AutoComplete instance instead of the window in list locators, text locators, filters, formatters, highlighters, and requestTemplate functions.
    Added an `originEvent` property to the event facade of `select` events. It contains an event facade of the DOM event that triggered the selection if the selection was triggered by a DOM event.
  • 15. AutoComplete
    #2529949: Small performance improvement for filters operating on empty query strings.
    Result list alignment is now updated both when results change and when the window is resized instead of only when the list becomes visible. This makes right-aligned lists with dynamic widths less awkward.
    Fixed a bug that prevented CSS-based z-index values from taking effect on the AutoComplete list and required the z-index to be set via JS. The `.yui3-aclist` class now provides a default z-index of 1, and this can be overridden with custom CSS. Specifying a `zIndex` attribute value via JS no longer has any effect.
    Fixed a bug that caused the IE6 iframe shim under the AutoComplete list to be sized incorrectly the first time the list was displayed.
    #2529895: Fixed a bug in which the `requestTemplate` would sometimes be used as the query instead of being appended to the source URL. This affected XHR and JSONP sources that used both a `{query}` placeholder in the source string and a custom `requestTemplate` value.
    Fixed a bug that caused the `requestTemplate` function to be called twice for an XHR request instead of just once.
    #2530410: Fixed a bug in which JSONP, XHR, and YQL requests were cached solely based on the query rather than on the complete request. This could result in cache collisions when two requests with the same query but different parameters (provided by a requestTemplate) were made.
    #2530455: Fixed a bug that caused the `&` character to be treated as an up arrow key in Firefox.
    Removed the "beta" label. Hooray!
  • 16. Base
    Base now destroys plugins before destroying itself
    Base.create/mix extensions can now define initializer and destructor prototype functions, which will get invoked after the initializer for the host class into which they are mixed and before its destructor.
    Uses a hash version of whitelist mix for improved performance. Also removed non-required hasOwnProperty check and delete.
  • 17. Charts
    Charts only requires datatype-number and datatype-date instead of the datatype rollup.
    #2530413: Position axis labels with transform instead of css styles.
    #2530533: Fixed issue in which stacked bar/column displayed inaccurated data on mouseover when zero values appeared in the series.
    #2530404: Fix issue in which markers were incorrectly omitted from graphs.
    #2530395: SplineSeries extends LineSeries instead of CartesianSeries.
    #2529841: Add axis title.
    #2530143: Refactor to use Graphics API
    #2530223: Fixed bug in which negative value markers were not displayed in column/bar series.
    #2529849: Fixed styles documentation bug
  • 18. Charts
    #2530115: Fixed bug preventing tooltip's node from being overwritten.
    #2529972: Fixed issue in which zero/null values were falsely creating markers in stacked bar and column series.
    #2529926: Fixed issue in which null values were being treated as zero.
    #2529925: Fixed bug in which dashed line was not drawn in combo and line series.
    #2529926: Fixed issue in which null values in data provider are treated as 0.
    #2529927: Addressed issue in which primitive value strings were not being parsed correctly in the TimeAxis.
    #2529971: Force range on a NumericAxis when all values are zero.
    #2529842: Ensure Numeric axis has at least on negative and positive tick when minimum is less than zero and maximum is greater than zero.
    #2529840: Changed stacked bar and column series to handle cases in which the item value is at or rounded to zero.
  • 19. Collection
    #2530376: Sparse arrays are now handled correctly in the non-native implementations of `Array.every`, `Array.filter`, `Array.find`, `Array.map`, and `Array.reduce`..
  • 20. Console
    CSS classes generated from the 'style' attribute changed from, e.g., yui3-inline-console to yui3-console-inline
  • 21. dataschema-json
    Added support to accept the results array as input, leaving `schema.resultListLocator` as optional.
    Field locators that contain . or [???] now fail over to look for that locator as a single property name rather than a nested value. For example, a locator `"not.nested"` would look for `inputRecord.not.nested` for a value, but if it doesn't find one, it will look for `inputRecord["not.nested"]`. If it finds a value there, it will not look for a nested value for subsequent records.
    `getPath` is far more tolerant of locator strings. In particular, it considered utf-8 characters that didn't match the `w` regex group to be invalid. This is fixed.
  • 22. datasource-polling
    #2529182: `setInterval` fires first `sendRequest` in a 0ms `setTimout`, then subsequent calls after the configured timeout.
  • 23. datasource-function
    #2529824: success callbacks that throw an error no longer result in the `data` event being fired again.
  • 24. Data Table
    Render cycle revamped to avoid calls through the Attribute API for each cell. This should improve render performance somewhat. More performance improvements to come in 3.5.0. The object passed through the render loops' supporting methods now has additional properties and many properties are added earlier. o.td still refers to the cell added by the previous loop iteration--a proper fix is coming in 3.5.0. Look in the Gallery for a patch module.
    #2529980: Now creates a new RecordSet for each instance rather than reusing the same one.
    #2529968: Captions are only added if a value is set for the `caption` attribute.
  • 25. Data Type
    Languages are no longer fetch-able for the `datatype-date` module, only for the `datatype-date-format` module:
  • 26. Drag&Drop
    #2529889 Example for Delegate Drag and Drop has wrong parameters
    #2529905 Using DDNodeScroll with DDDelegate causes JS error in Safari
    #2530050 Incorrect documentation
    #2530451DragDrop enhancement - ability to use dd with non-node objects.
    #2530576 change notest needed in history file
  • 27. Dial
    Names of 3 configuration attributes have changed: stepsPerRev -> stepsPerRevolution, handleDist -> handleDistance, centerButtonDia -> centerButtonDiameter
    New configuration attributes: markerDiameter, handleDiameter
    In addition to setting the Dial by dragging the handle as it was in 3.3.0, Dial now supports setting the value by clicking on the Ring. This does not cross value "wrapping" boundries. For example: If a Dial has 0 degrees = value 0, and the Dial's current handle position is 10 degrees with a value = 10, then a mousedown at 355 degrees will result in a value of 355 not -10. In this case all mousedown events will result in values between 0 and 355. This is within current value "wrapping" boundries. Moving across value wrapping boundaries, must be done by dragging the handle or using the keyboard.
    Changed the name of class marker-max-min - to - yui3-dial-marker-max-min
    In 3.3.0, when the user dragged the handle past the min or max, the Marker displayed as red to indicate min/max. When the cursor was released, the marker was no longer displayed. There remained no user feedback indicating max/min. When the keyboard was used to change the value, no min/max indication was displayed, except that the handle stopped moving. In this release, the Marker display state of red remains as long as the Dial is at min/max, regardless of mouse or keyboard use. If you don't want min/max feedback, CSS class yui3-dial-marker-max-min can be overridden.
    #2530306: When mousedown is used to set its value, Dial now has intuitive handling of different configurations of min, max where stepsPerRevolution is greater than or less than one revolution.
  • 28. Editor
    Third release of EditorBase. Considerable work was done on this component, but there are no public tickets associated with the issues that were resolved. This version of EditorBase is the current version being used in the new Yahoo! Mail. It's production stable and ready to be used with the proper skins and GUI.
  • 29. Escape
    #2530408: Non-string arguments to `html()` and `regex()` are now coerced to strings.
  • 30. Event
    `event-outside` added for "outside" events.
    Y.Event.define(name) adds name to DOM_EVENTS whitelist. Accepts event name string or array of string names
    event-hover properly pulls in required module event-mouseenter
    DOM event subscriptions are now removed and objects cleaned up after last subscription is detached. Same for synthetic events.
    'key' synthetic event migrated to official synth infrastructure. Now supports delegation.
    'key' event spec param now supports letters and named keys. E.g. 'enter+ctrl' == '13+ctrl', 'up:a' == 'up:65' and 'A' == '65+shift'
  • 31. Event
    Added experimental config YUI({ lazyEventFacade: true }) that triggers a mode for DOM EventFacades in IE8 to use getters to access event properties that involve any calculation, such as e.target and e.currentTarget. Should improve performance.
    mouseenter and mouseleave events now filter the native event rather than the generated DOMEventFacades for mouseover/out. This results in fewer calls to Y.one (e.target, currentTarget, relatedTarget) as well, so should improve performance.
    #2529464: Added onceAfter(...) method to do a self-detaching after() subscription
    #2529807: Y.on(type, callback, HTMLElement[], COMPAT) subscriptions to attach to multiple elements in one call now correctly use native DOM elements instead of Nodes for all subscriptions
    #2530227: Plugged the leaked global GLOBAL_ENV
    #2530293: Fixed synth architecture to properly resubscribe to synths that use processArgs if the target is not available at the time of subscription
  • 32. Event-Custom
    Custom events published from Y no longer bubble by default.
  • 33. Event-Gestures
    For flick, reset start time on first move, to handle case where user mousesdown/touchstarts but then doesn't move their finger for 5s leading to inaccurate velocity.
  • 34. Highlight
    #2529945: Fixed a bug that resulted in invalid escaped HTML when running a highlighter with an empty needle.
    #2530529: Fixed an off-by-one bug in which an unhighlighted single char at the end of a highlighted string would be discarded when using `allFold()
  • 35. History
    NOTE: The `history-deprecated` module, which was deprecated in YUI 3.2.0, has been removed from the library.
    HistoryHTML5 now uses the new `window.history.state` property (which showed up in Firefox 4 and the HTML5 spec after YUI 3.3.0 was released) to get the current HTML5 history state.
    Removed the `enableSessionStorage` config option that was previously used to work around the lack of an HTML5 API for getting the current state.
    Added a `force` config parameter to History constructors. If set to `true`, a `history:change` event will be fired whenever the URL changes, even if there is no associated state change.
    #2530305 (Ben Joffe): On a page with a <base> element, replacing a hash-based history state resulted in a broken URL.
    #2529990: In IE6 and IE7, navigating to a page with a hash state could result in endlessly repeating history:change events.
    #2530301: In IE6 and IE7, replacing a history state would actually result in a new history entry being added.
  • 36. ImageLoader
    Added classNameAction option for ImgGroup. Setting to "enhanced" means that when using className on an <img> element, the src attribute is replaced rather than simply removing the class name
  • 37. IO
    #2528240: Added ability to get the configuration of a transaction.
    #2529314: Instantiable IO.
    #2529317: IO now uses `event-custom` and event facades.
    #2529447: Exposed more of the internals of IO for extensibility.
    #2529553: Fixed IO iframe upload to reset form attributes.
    #2530023: Add IO support for XHR basic user authentication.
    #2530091: IO will not send `data` for `GET`, `HEAD` and `DELETE` HTTP methods.
    #2530494: Fixed issue with IO doubling the URL query-params on a HTTP `GET` request when sending `data` together with form serialization.
  • 38. JSON
    #2530295: Remove indirect `eval()`.
  • 39. JSONP
    Support added to specify charset or additional attributes to add to the script tag.
    Success and failure callbacks are no longer executed if the request takes longer than the configured timeout
  • 40. Loader
    Added Alias support and flattened the module structure.
    Alias support: When asking for: "dd" Loader actually asks for: "dd-ddm-base,dd-ddm,dd-ddm-drop,dd-drag,dd-proxy,dd-constrain,dd-drop,dd-scroll,dd-drop-plugin"
    Better RLS support
  • 41. Node
    NOTE:#2529829: The empty() method now always does a recursive purge.
    Added the getDOMNode() and getDOMNodes() methods to Node and NodeList prototypes.
    #2529376: The one() method now accepts IDs that begin with a number.
    #2529908: Bug fix: NodeList show()/hide() methods were broken with Transition.
    #2529942: Bug fix: Some NodeList array methods were returning incorrectly.
  • 42. OOP
    Significant performance improvements for `augment()`.
    #2530036: `augment()` handled the `whitelist` parameter incorrectly when augmenting a function.
  • 43. Queue-promote
    Fixed bug in promote method where the item moved to the head of the queue was wrapped in an array.
  • 44. Resize
    #2529992: Allow Resizable nodes be used with DD.Delegate
    #2530007: [Pull Request] - #2529992 Allow Resizable nodes be used with DD.Delegate
  • 45. ScrollView
    Fixed _uiDimensionsChange code which was looking explicitly for the "width" attribute. Just plain wrong.
    Added vertical paging support.
    Removed DOMSubtreeModified event listening which was only really kicking in for Webkit and was too heavy handed. User now needs to call syncUI() manually on all browsers, if the content of the scrollview is changed, and may potentially result in dimension changes.
    Broke out use of transform3d into a seperate method, and added a protected flag, _forceHWTransforms, to allow for customization if required (H/W acceleration related glitches or changing the set of browsers for which we attempt to force it).
    Created Scrollview-List plugin to add CSS Classnames to immediate <li> elements on scrollview.
    Fixed incorrect scroll width/height calculations on Chrome 9+, FF when syncUI() [ or _uiDimensionsChange() ] was called when the ScrollView was scrolled over.
    Protected state flags are now reset if _uiDimensionsChange results in flipped orientation.
    Use the larger of bb.scrollWidth/Height or cb.scrollWidth/Height, to calculate scroll dimensions to account for FF (which clips cb.scrollWidth) and Chrome/MacOS (which clips bb.scrollWidth when translated even after incorrect scroll calcs above).
  • 46. TabView
    #2529830: Now accepts a Node instance for the Tab `content` attribute.
  • 47. Transition
    The transition module now conditionally loads transition-timer as needed.
    Native transitions are now used when possible for Firefox.
  • 48. Widget
    Added workaround in destructor for single box widgets (contentBox === boundingBox) Also extracted DOM removal into separate method, which can be overridden if custom widgets don't want rendered DOM removed.
    Fixed UI_EVENTS js exception when dealing with nested widgets rendered by different Y instances.
    Fixed UI_EVENTS invoking nested widget listeners more than once (also fixed regression to Parent-Child as a result of this change).
    Added support for destroy(true) to Widget, which will remove and destroy all child nodes (not just the boundingBox and contentBox) contained within the Widget's boundingBox in order to help control Node cache size over long-running applications. destroy() will maintain its current behavior due to the potentially high run-time cost of destroying all child nodes. Widget developers still need to continue with the best practice of destroying explicit node references they create, in their destructors to support the destroy() case.
  • 49. Widget-position-align
    Added "alignOn" attribute which allows the implementer to specify when the widget should be re-aligned. By default, it re-aligns on window resize and scroll.
  • 50. Widget-stdmod
    Move attribute event listeners to _renderUIStdMod() method so that setStdModContent() can be called on renderUI()
  • 51. YQL
    #2530246: Fixed bug in yql module where options ('opts') were not actually being used. This prevented use YQL calls over SSL, which some tables require.
  • 52. YUI
    Added `Y.Array.dedupe()`, which provides an optimized solution for deduping arrays of strings. When you know an array contains only strings, use `dedupe`, since it's faster than `unique`.
    `Y.Lang.isArray()` now uses the native ES5 `Array.isArray()` method when possible.
    `Y.Object()` now uses the native ES5 `Object.create()` method when possible.
    `Y.Object.keys()` now uses the native ES5 `Object.keys()` method when possible.
  • 53. YUI
    #2530376: Sparse arrays are now handled correctly in the non-native fallback implementations of `Y.Array.each`, `Y.Array.hash`, and `Y.Array.some`.
    Added async:true support to Get, to dispatch scripts/link nodes in parallel. NOTE: Order of execution is not guaranteed (it's not required for the YUI Module use case, for which this feature was introduced - to improve performance). onSuccess is called once, after all files are loaded.
    Added onProgress callback support to Get, which is useful when dispatching multiple scripts using the [] syntax. onProgress is called when each script is done loading in non-browser environments.
  • 54. YUI throttle
    Initial release. Removed from yui-core and bumped to a stand alone module.
  • 55. End