wq.app 1.2.0
wq.app 1.2.0 is the first stable release of the wq.app 1.2 series. The biggest improvement is the integration of the Redux ecosystem for the outbox and model store (#105). This achieves the second goal in the 2019 roadmap for wq.app.
wq.app 1.3 will bring full integration with React and Material UI - see #115 for a preview.
In addition to the Redux integration, a number of nonessential and deprecated AMD modules have been removed from wq.app 1.2.
module | status |
---|---|
wq/autocomplete.js | removed |
wq/chart.js | moved to Django REST Pandas |
wq/chartapp.js | moved to Django REST Pandas |
wq/console.js | removed |
wq/json.js | removed |
wq/markdown.js | moved to separate repository |
wq/pandas.js | moved to Django REST Pandas |
wq/progress.js | moved to Django Data Wizard |
Changes since wq.app 1.2 beta
- Publish development builds of each NPM package to Bintray (see #115)
- Remove
noBackgroundSync
option in favor ofbackgroundSync: false
(f53f118) - Move @wq/chart to Django REST Pandas
- Move @wq/markdown to a separate repository
- Improve module documentation (60bf04a)
Other changes since wq.app 1.1.2
-
- @wq/app
- The first page is automatically re-rendered on startup and after auth changes, so jQuery events and other workarounds are no longer needed (#79).
app.go()
has been removed in favor ofapp.nav()
app.sync(true)
has been renamed toapp.retryAll()
. In general, sync is managed by @wq/outbox and Redux Offline (see below).
- @wq/store is now a wrapper around Redux and Redux Persist.
- New
dispatch()
,getState()
, andsubscribe()
methods correspond to Redux equivalents. - Enables Redux Logger when
config.debug
is true - @wq/app plugins that define
name
,reducer()
andactions:{}
will get their own state in the store. jsonp
andparseData
options are replaced with theajax()
plugin hookds.storageUsage()
has been removed.
- New
- @wq/router is now a wrapper around Redux-First Router.
- Routes are defined as Redux action types that map to the template name.
- Thunks can be defined as pathless non-rendered routes (as per Redux-First Router). @wq/app plugins that define
thunks: {}
will be auto-registered. router.register()
has completely changed. The callback is now optional and only needs to supply a context for use withrouter.go()
.router.go()
no longer can/should be invoked indirectly.router.addRoute()
is deprecated in favor ofrun()
plugin hooks.- Route info is now provided only through the template context (and not as
router.info
).
- @wq/model is now a wrapper around Redux-ORM.
- A
name
is now required for all model instances. (@wq/app provides this automatically) - The Redux-ORM queryset is available via
[model].objects.all()
. [model].filter()
now wrapsobjects.filter()
, which supports predicate functions and better indexing. Note thatobjects.filter()
uses strict equality when comparing object attributes.find()
,update()
,fetchUpdate()
andremove()
no longer support specifying an id column. Instead, defineidCol
when configuring/initializing the model.- @wq/model now supports (de)normalization for nested models returned from server APIs (#114)
- A
- @wq/outbox is now a wrapper around Redux Offline.
- Fix various offline state and syncing issues (e.g. #33, #94/#95, and #102).
- Several new methods to control syncing:
waitForItem()
,waitForAll()
,retryItem()
,retryAll()
,pause()
,resume()
, andempty()
. Use these instead ofsendItem()
,sendAll()
, and thenoSend
option forsave()
, all of which have been removed. - Batch sync support (#110) via Django Batch Requests
applyState
configuration option for form submissions (#85, #86):"ON_SUCCESS"
(default): update local model after sync."IMMEDIATE"
: optimistically update local model before sync"LOCAL_ONLY"
: update local model without syncing
outbox.model.load()
is removed in favor ofoutbox.loadItems()
parseBatchResult()
,applyResult()
andupdateModels()
are no longer available.
- Other Changes
removeattachment
action in @wq/app:patterns plugin (d5372ff)- Sourcemaps for wq/* AMD modules (43222ff)
- Remove compatibility versions of wq/autocomplete.js, wq/console.js, wq/json.js, and wq/progress.js, which were deprecated in wq.app 1.1.2.
- @wq/app
- Changes in Beta
- Automatically navigate to permanent URL once new items are synced (#98, #99)
filter_fields
andfilter_ignore
options for @wq/model (#88).- Preserve URL params during pagination (778631c, c2b5ab0)
onsync(item)
plugin hook (#96)- Remove several hooks and events in favor of newer options:
- Removed Hooks:
onsave()
,saveerror()
,showOutboxErrors()
,postsave()
,presync()
,postsync()
- Removed Events:
"login"
,"logout"
- Removed Config:
transitions.save
- Removed Hooks:
- Various bug fixes