- Updates documentation
- Adds
Hull.trackForm
to add form listeners - Adds
Hull.alias
to allow aliasing new identities to current user - Adds
Hull.parseQueryString
and automatic querystring parsing to track events and attributes
- Remove support for various embed strategies on ships
- Remove dependency to polyfill service
- Upgrade dependencies
- Silence warnings on bluebird promises
- Support
data-*
configuration attributes onsrc
tag - Update Documentation
- Add
npm run build
task
- COMPLETE REWRITE OF THE LIBRARY.
- Gets rid of legacy methods
- Not dependent on jQuery or Aura.js anymore. Now only 44kb, much faster.
- Fully promise-ified. Every data call returns a promise
- Implements Smart login and Share strategy depending on device (popup or redirects)
Allow Initializing hull automatically with attributes in the SCRIPT
tag,
Supported tags :
platform-id : platform ID
org-url : organization URL
debug : debug mode
verbose : verbose mode (when debug=true, logs even more stuff)
js-url : specify Hull Remote Url (automatically specified if using snippet)
embed : true|false //perform Hull.embed on init. Default: true
access-token :an Access token to use to log the user in.
proxy-mode [undocumented]
For this to work, the hull.js
script tag needs to have id='hull-js-sdk'
These methods now try really hard to find a URL to share or to target, by traversing the DOM upwards for the closest matching hull-link
or href
attribute, looking for siblings at each level up to body
. If not found, searches for og:url
else, fallbacks to the window URL.
Note : In Sandboxed Ships, this method will start looking OUTSIDE the ship. No point in performing a lookup on Document parts the Ship author built.
Hull.resetPassword(email=me.email, callback, errback) // => Promise
Hull.confirmEmail(email=me.email, callback, errback) // => Promise
Use Hull.entity.[encode|decode]
Use Hull.api(path,method)
Should not have been exposed in the first place.
Removed
Removed [Was undocumented]
Please use hull.ready
instead
We're phasing out in favor of auto-initialized code, You can get the same results by using Hull.ready(callback)
which has the benefit of allowing multiple calls.
hull.ready
event now returnshull, me, platform, org
hull.auth.update
,hull.auth.login
,hull.auth.logout
,hull.auth.create
events are renamedhull.user.update
,hull.user.login
,hull.user.logout
,hull.user.create
and are emitted more reliably.- A
hull.*.share
event is emitted when sharing using a network. an example would behull.facebook.share
- A
hull.track
event is now emitted every time tracking happens, so you can subscribe to them and implement your own track handlers Hull.on(hull.track
,{event:[String], data:[Object]}); - The
jsUrl
entry in theHull.init()
configuration hash now takes a full url (I.E. https://d3f5pyioow99x0.cloudfront.net/version/hull.js). - Access the event's name from inside the event callback with
this.event
:
Hull.on('hull.ready',function(args...){
console.log(this.event) // "hull.ready"
})
Hull.currentUser()
accepts a parameter, will return the field value. Works with all levels of nesting. Example:Hull.currentUser('sign_in.created_at')
Hull.share()
now has the following signature:
//Default params.method: 'share'
Hull.share({provider:'facebook', path:'ui', params:{/*FB.ui params*/}});
//https://developers.facebook.com/docs/javascript/reference/FB.ui/
Hull.share({provider:'linkedin', params:{url: "http://example.com", title: "So Cool", source:'My App'}});
//https://developer.linkedin.com/docs/share-on-linkedin
//Default path : 'tweet'
Hull.share({provider:'twitter', path: 'tweet', params:{url: "http://example.com", message: "So Cool"}});
//https://dev.twitter.com/web/intents
//https://dev.twitter.com/web/tweet-button/web-intent
//https://dev.twitter.com/web/follow-button/web-intent
Hull.share({provider:'email', params:{subject:'This is really cool', body:"This works well", to:'[email protected]' }})
Hull.share({provider:'google'}) //Shares og:url or window.location
Hull.share({provider:'google', params:{url:'http://example.com'}}) //Shares example.com
All those now return promises. When using Promises, please don't forget to add .catch()
on your promise chain, so errors are not swallowed without notice.
These methods have the following signatures :
Hull.login({provider:'xxxx',params:{...}}, callback, errback)
Hull.login({provider:'facebook',access_token:'xxx'}, callback, errback)
Hull.login({login:'xxx', password:'xxx',params:{...}},callback, errback)
Hull.logout(callback, errback)
Hull.linkIdentity({provider:'xxxx',params:{...}}, callback, errback)
Hull.linkIdentity({login:'xxx', password:'xxx',params:{...}}, callback, errback)
Hull.signup({facebook:{access_token:'xxxx'}}, callback, errback)
Hull.unlinkIdentity({provider:'xxxx',params:{...}}, callback, errback)
returns a promise. Please end with .done()
here too.
New methods for Ship Deployment. Ships can be either HTML Imports or .js
files. They need to call Hull.onEmbed(document, callback)
.
callback
has the follwing signature :
function callback(element, deployment, hull){
//element == domElement
//deployment = {
// org : {}
// settings: {}
// platform: {}
// ship : {}
//}
//hull = {local Hull instance, scoped to the current Ship}
}
From inside a ship, gets the HTMLImport document
. Useful to manipulate import content and add stylesheets to: They will be scoped automatically
Returns a string in the form .ship-SHIP_ID
that you can use to find all instances of this ship, or to prefix CSS and scope styles inside it. We use this internally to automatically prefix all CSS injected in the HTML Import and inside the instanciated ship's tree.
From inside a sandboxed ship to allow setting container size
Recalculates iframe height to fit content without scrolling.
- If value ==
INTEGER
then recalculates automatically everyINTEGER
milliseconds - If value ==
undefined
, recalculates once, and stops timers. - If value ==
false
then stops timers and does not resize one last time - Automatically called when a Sandboxed ship is booted, every 300ms. Disable by calling
Hull.autoSize(false)
from the ship
Expose our internal utils, containing several libraries. We could change those at any time but we thought you might be happy to avoid embedding them too if it was a fit.
Expose more event methods (we're using EventEmitter2, refer to their docs for signature)
Hull.currentUser()
from inside the promise or callback of a User-changing method such asHull.logout
now properly returns the right user status
- Properly update bower.json and package.json, Do not botch release versions
- Share methods all return promises, even with Popup methods. They return response data if available
- Use redirect strategy by default on shopify for mobile browsers
- Rename @template to @tmpl in component docs. @template is now a reserved word in Dox
- Specify Size for Twitter Popup
- Add Release instructions to Readme
- Fix typo in popup code
- Update signature for Hull.login method calls to take one hash with a
params
sub-hash - Initial version of Hull.share
- Allow redirect strategy login (for social and email/password)
- FB Auth: Use display: 'popup' option and smaller popup window
- Fix for browsers with 3rd party cookies disabled and (http://www.hull.io/docs/users/backend) : Use jquery ajaxSend to send user sig as a header
Hull.parse
now waits for Aura app to finish starting- Instagram provider fix : expose pagination and meta from Instagram's response
- Fix loading issue when using Back button on Chrome (9dec8de)
- enforce contentType: 'application/json' for all non GET ajax requests from admin provider
- enforce dataType: 'json' for all non GET ajax requests from admin provider
- Updates Hull.currentUser() on user change #150
- Enhances compatibility down to jQuery 1.5 for components
- Updates Aura
- Improves styling for Shopify shops
- Fixes deploy and CSS minification
- Fixes ratings/vote component
- Fixes build in CircleCI by specifying a newer Node.js version
- Fixes overlapping events
- Fixes thre login window size because of a nasty FB message
- Guest login with lazy actions
- Updates custom jQuery to 1.11.0 in remote to avoid IE8 errors
- Allow AccessToken in Hull.init
- Enhances login and admin/registration components
- Reduces the number of API calls at init
- Better errors when init fails
- Fixes admin/user_profile component to delete badge with Admin API
- Adds Hull.ready(fn) for fn to be called as soon as Hull has finished loading
- Fixes Hull.parse
- Encodes URI at remote init
- Fixes votes/button component
- Sends BrowserId and SessionId to tracking calls
- Sends referrer, url and path to tracking calls
- Sends way less data to
hull.auth.login
tracking - Updates Aura to avoid error-swallowing
- Version-fix of domready to maintain backward-compatibility
- Prevents Q from complaining about missing handlers
- Adds a console polyfill
- [134] Compatibility with Cordova
- Fixes Hull when opened from a
target="_blank"
link - Bad provider in
Hull.login()
returns a rejected promise
- [133] Adds
Hull.signup(user)
- [133] Adds
Hull.login(usernameOrEmail, password)
- [129] Promises returned by
Hull.login()
,Hull.linkIdentity
are rejected witherror
hash that contains thereason
of the failure. - Adds
Hull.linkIdentity()
andHull.unlinkIdentity()
- [127] Fix
events
hash usage in components
- [125] Handles errors when JSONP requests fail
- Adds
Hull.currentUser()
to easily fetch the current connected user of false if not available - Handles correctly when the auth popup windows are closed manually
- Can not do multiple concurrently running calls to
Hull.login()
Hull.config
is now a function returning a clone of the whole configuration
Hull.data.api
has been renamedHull.api
- The 3rd party APIs which need to be proxified are now batchable
- The success callback of
Hull.init()
receives 4 arguments:Hull
,me
,app
,org
Hull.login()
resolves to the current user if successfulHull.login()
andHull.logout()
return a promiseHull.init.api(config, cb, errb)
creates an instance of Hull with API features onlyHull.config
exposes the original config passed to Hull.init()- Events
hull.app.init
,hull.login
,hull.logout
are tracked from the API - Removes
hull.auth.complete
andhull.auth.failure
events forhull.login
andhull.logout
- Adds Hull.util.Handlebars for easier customization
- Update to Handlebars 1.1.2
- Adds this.helpers to Components to declare custom Handlebars helpers for the Component's templates
- CONTRIBUTING.md is born
- Batch API
- More tests
- Hull.api as a standalone project
- Hull.{me|app|org} removed
Changelog is born