From 7fbf624b987bcd546aae74eeeec73eb6ac549af7 Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 11 Jun 2015 14:38:47 -0400 Subject: [PATCH] Enable local caching in all modules by default, add release notes --- RELEASE-NOTES.md | 9 ++++++--- src/definitions/modules/dropdown.js | 2 +- src/definitions/modules/search.js | 1 + src/definitions/modules/tab.js | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index aac72d20b..380ecc15e 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -17,6 +17,7 @@ - **Tab** - `onTabInit` and `onTabLoad` have been renamed to `onFirstLoad` and `onLoad` respectively. This is to conform to the naming conventions of other modules (no self reference). Previous callbacks will continue to work but will produce deprecation notices in console. Two new callbacks `onVisible` and `onRequest` have been added as well. - **Button** - `wide` variations using numbers `2 wide`, `3 wide` have been removed due to incompatibilities with some build tools. Please use `two wide`, or `three wide` instead. - **Video** - The undocumented `video` module has been renamed to `embed`. Behaviors remain the same, but users need to adjust their javascript init to `$('.ui.embed').embed();` +- **API** - API `onFailure` will now be called when a request is errored (504, 404 etc), aborted (page change or CORS), or JSON does not pass `successTest` function. `onError` and `onAbort` will also fire for each specific failure condition. **New UI** - **Container** - Containers are fixed width containers meant for holding page contents, and are a simpler alternative to `ui page grid`, view more [examples in docs](http://www.semantic-ui.com/elements/container.html#examples) @@ -25,7 +26,7 @@ **Major Enhancements (Please Read)** - **Site** - Added new colors `olive`, `violet`, `brown` and `grey`. These are available in all elements with color variations. **Thanks @lemartialou** -- **API** - API can now be used with mocked responses, and custom AJAX requests. `mockResponse` has been added to resolve request with a prespecified JSON object, or a synchronous function callback. +- **API** - API can now be used with mocked responses, and custom AJAX requests. `mockResponse` has been added to resolve request with a prespecified JSON object, or a synchronous function callback. - **API** `mockResponseAsync` has been added for custom asynchronous requests. This allows you to specify a custom async callback to resolve an API request, helping with integration with libraries like Ember or Angular that may wrap AJAX requests. - **API** - API callbacks now have an `onResponse` callback that can adjust a servers response before it is parsed by other callbacks for success or failure conditions. **Thanks @mnquintana** - **API** - API now provides a local caching setting to avoid server roundtrips for identical urls by using `cache: 'local'`. This is not enabled by default. Local caching is useful for results that should return the same values across a single session, for example when querying an autocomplete. @@ -81,7 +82,7 @@ - **Form Validation** - `data-validate` now takes precedence over other validation matching schemes like `name` or `id` - **Form Validation** - New rules for matching against custom regular expressions - **Form Validation** - Form validation now has `minCount`, `maxCount`, and `exactCount` for validating multiple selections -- **Grid** - `celled grid` now removes internal cells on mobile and tablet when used with `doubling` grid responsive variation. +- **Grid** - `celled grid` now removes internal cells on mobile and tablet when used with `doubling` grid responsive variation. - **Grid** - `equal width` grids now works without `row` wrappers - **Grid** - rows can now be `stretched` as well as `middle aligned`, `bottom aligned` and `top aligned`! - **Grid** - Fixed margins on `internally celled` grid @@ -109,6 +110,8 @@ - **Search** - Cache can now be cleared using `$('.search').search('clear cache')` - **Segment** - Added `padded` and `very padded` segment variations - **Search** - Search now operates off a unique id generated by result position to retrieve results. For example category #1's first result is 'A1' . Previously result titles were used as their "id", which could cause issues with duplicate titles, or results that do not contain a title. +- **Search** - Search will now automatically add class `category` when using `type: category`. +- **Search** - Search will now generate `results` container if one is not present on init - **Sidebar** - Improved animation performance through performance debugging. Sidebar now caches, width, height, rtl direction on load. - **Site** - Fixed mixed globals `@defaultDuration` and `@transitionDuration` usage to use a single variable across all UI `@defaultDuration`, the same for `@defaultEasing` and `@transitionEasing` - **Site** - Added in `pageOverflowX` variable, default theme hides horizontal scrollbars on `body` @@ -128,7 +131,7 @@ **New Variations** - **Headers** - Added new header type `sub header`, useful for displaying small headers alongside text content. See examples [in the header docs](http://www.semantic-ui.com/elements/header.html#sub-headers) - **Menu** - `vertical tabular menu`, a vertical tab menu, has been added -- **Dropdown** - Added new dropdown variation `scrolling dropdown` and `scrolling menu`, this can be used to include a scrollable section inside a dropdown menu. +- **Dropdown** - Added new dropdown variation `scrolling dropdown` and `scrolling menu`, this can be used to include a scrollable section inside a dropdown menu. - **Image** - Images now include a `spaced` variation for adding whitespace around images when used inline with text. - **Dimmer** - Dimmers now have a `blurring` variation which apply a glass-like effect when dimmed - **Segment** - Added `clearing` segment for cases that need a [clearfix](http://learnlayout.com/clearfix.html). diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index d59a66244..d55dcaba6 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -2951,7 +2951,7 @@ $.fn.dropdown.settings = { apiSettings : false, saveRemoteData : true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh - throttle : 100, // How long to wait after last user input to search remotely + throttle : 200, // How long to wait after last user input to search remotely direction : 'auto', // Whether dropdown should always open in one direction keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing diff --git a/src/definitions/modules/search.js b/src/definitions/modules/search.js index f6cb91559..63bac97c3 100644 --- a/src/definitions/modules/search.js +++ b/src/definitions/modules/search.js @@ -273,6 +273,7 @@ $.fn.search = function(parameters) { apiSettings = { debug : settings.debug, on : false, + cache : 'local', action : 'search', onError : module.error }, diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js index a9e96fb78..7595d69ab 100644 --- a/src/definitions/modules/tab.js +++ b/src/definitions/modules/tab.js @@ -420,6 +420,7 @@ $.fn.tab = function(parameters) { apiSettings = { dataType : 'html', on : 'now', + cache : 'local', onSuccess : function(response) { module.cache.add(fullTabPath, response); module.update.content(tabPath, response);