@sheppard sheppard released this Apr 23, 2018 · 3 commits to master since this release

Assets 2

wq.app 1.1.0 brings better memory usage for the outbox, a new PyMiniRacer-based build system, and various other improvements.

  • Better memory usage in outbox (#93). Specifically, File/Blob data is only loaded into memory when needed, rather than every time the outbox contents are listed. This is especially important when running in memory-constrained environments (like PhoneGap applications on iOS). Outbox items can be saved with an option specifying one of three storage modes:
mode description notes
(Default) Store form data in outbox localForage key Same as old usage
storage="store" Separate form-specific localForage key Default for form submissions containing files/blobs.
storage="temporary" Don't persist form data at all Default for login forms and all forms with data-background-sync=false; fixes #90
  • Generate parent_url for items in outbox (#97 via @tomaszn)
  • Hook to allow customization of list views with outbox items (#101 via @tomaszn)
  • Leverage PyMiniRacer to run r.js (#92, #14, #46). The requirejs dependency is now available as a separate PyPI package. Thanks to @tomaszn for testing this update (#104).
  • Preliminary ES6 support. Files containing ES6 code will be skipped by the optimizer and converted to ES5 via PyBabelJS. Support for actually optimizing ES6 code will come in a future wq.app release (see #83).

@sheppard sheppard released this Jul 24, 2017 · 19 commits to master since this release

Assets 2

wq.app 1.0.0 is finally here! This is the first stable release of wq.app 1.0, which is now ready for production use.

Changes since wq.app 1.0.0 RC2

Other changes since wq.app 0.8.2


@sheppard sheppard released this Jun 16, 2017 · 38 commits to master since this release

Assets 2

wq.app RC2 brings a number of minor bug fixes and improvements to RC1.

  • Generate scss folder for swatch tests (#87 by @tomaszn)
  • Update vendored Leaflet & leaflet plugins
  • Added wq-status option to <progress> plugin (7eca458, see docs)
  • Handle case when outbox syncs during a list view data fetch (45162e0)
  • Various other fixes (see commit log)

@sheppard sheppard released this Apr 4, 2017 · 55 commits to master since this release

Assets 2

wq.app 1.0.0 RC1 brings enhanced support for PhoneGap/Cordova, an improved offline cache configuration API, and a number of other enhancements.

PhoneGap/Cordova support

The updated wq django template automatically takes advantage of these new features.

New Configuration for Pagination/Offline Caching

The configuration options affecting pagination and offline caching (per_page, partial, max_local_pages, filter, and reversed) have been unified and replaced with a new cache setting. See Pagination and Caching for details (#47, 452b0d2).

Other Improvements & Fixes

Thanks to @tomaszn for reporting several of these issues.

Editing & Outbox (wq/app.js)

  • Properly support deletion (#80, 4bf65be, 9cb2298)
  • Ensure plugins run when loading items from outbox (#77, 68efcba)
  • Make custom postsave URLs work for items still in outbox (#78, 95fb93a)
  • Improve editing for nested forms (#72, f2ddbe8)
  • Improve file support (#70, ea5835c, 8b7f577)
  • Change default behavior from loadMissingAsHtml to loadMissingAsJson (02526bf)





@sheppard sheppard released this Nov 8, 2016 · 92 commits to master since this release

Assets 2

wq.app 1.0 beta 2 brings a lot of cleanup and a few new features. Note that this release is no longer compatible with Internet Explorer 8.

API Improvements

  • Flatten the per-page configuration for wq/map.js to make it more managable. Instead of:
config.pages[page].map[mode].maps.main.layers = [...];

you can just do

config.pages[page].map = {
    'mode': mode,
    'map': 'main', // optional
    'layers': [...]

Also added the option to pre-register an oneach function (not unlike the pre-registered layer types) so it can be referenced from a JSON configuration object.

  • Make it so wq/outbox.js items are accessible via foreign key references even before they are synced. The sync process now automatically determines the proper order to send records to the server and updates the references on the fly. To assign labels to items in the outbox (since the Python __str__ function is not available), a new label_template property is now supported on the configuration object. See the release notes for wq.db 1.0.0b3 for more information.
  • Use a recursive in-place serializer for files saved in localForage (see localForage/localForage#603). Note that the new store uses a different naming convention and the contents of the old offline cache will not be automatically transferred to the new one.
  • Support lookups for foreign keys within natural keys, and plugins on server-rendered non-list pages.

Third Party Libraries

  • Update Leaflet from 0.7 to 1.0
  • Update d3.js from 3.5 to 4.2
  • Drop es5-shim and support for IE8
  • Drop jquery.validate, proj4, proj4leaflet, and rbush (all rarely used in production wq applications)
  • Add leaflet.wms and localforage-memoryStorageDriver
  • Update most other libraries (except jQuery Mobile which will be updated in a future release)

For the full set of changes, compare the list in wq.app 1.0.0b1 vs. wq.app 1.0.0b2.

Other modules


@sheppard sheppard released this Sep 1, 2016 · 142 commits to master since this release

Assets 2

wq.app 1.0 beta brings a number of new features and bug fixes to wq.app 1.0 alpha 2.


Plugin API

  • Added two additional asynchronous plugin hooks. Returning a Promise from either hook will cause further processing to wait until the Promise is resolved.
    • [plugin].context(currentContext, routeInfo) is called just before rendering a page template. This makes it possible to perform arbitrary asynchronous data lookups before navigating to a new page (#30). Think Django's context processors, but on the client and asynchronous.
    • [plugin].onsave(outboxItem, serverResponse) is called just after a successful outbox submission (344e776). This makes it possible to perform additional work (e.g. custom model updates) before continuing.
  • Made all plugin attributes optional, so you can register anonymous plugins - though they won't be configurable (#59).

Router / Template Modes

  • Added support for arbitrary route modes beyond the default list, detail, and edit (de578f4). Custom modes have URLs of the form /items/123/custommode and will be rendered with templates named e.g. item_custommode.html. Modes should be specified as part of the page configuration, e.g.:

        "name": "item",
        "url": "items",
        "list": "true",
       // Client+server modes
        "modes": ["list", "detail", "edit", "custommode"],
        // Server-only modes
        "server_modes": ["servercustommode"]

    Both client+server and server-only modes can be specified. Client+server modes will be rendered on the client once wq/app.js initializes. Server-only modes are always rendered on the server, but can still take advantage of the plugin infrastructure ([plugin].run()). Since wq/app.js automatically loads URLs it doesn't recognize from the server, it is not necessary to register server-only modes if they don't require plugins.

  • New wq/patterns.js plugin to support the common case of attaching multiple nested records to a single parent form (ee0b6a2).

  • [parent]_label context variable for foreign keys (2a40fc7).

Other Improvements

  • Added app.nav(url, changePageOptions) and app.refresh() to facilitate common page navigation tasks (ee0b6a2).
  • Option to render postsave URLs as templates (a2b31d4)


  • Support multiple maps on the same page (34664cd).
  • Switch default basemaps from MapQuest to Stamen, one of the few remaining free providers that doesn't require an API key (#68).
  • Simplify integration of Esri basemaps via wq/mapserv.js (a2e4249).


  • Allow specifying the store backing the model as a string name (16a7b42). This makes it possible to configure custom model stores via JSON, and initialize them in JavaScript elsewhere.
  • Deep-copy items retrieved from indexes to ensure modification doesn't have unexpected side effects (c4b7c34).

Other Fixes

  • Ensure bar-shadow: false actually disables text shadows in SCSS themes (5bee3ba).
  • Code style improvements

@sheppard sheppard released this Mar 23, 2016 · 169 commits to master since this release

Assets 2

Quick update to the wq.app 1.0 alpha release for better compatibility with wq.start 1.0.0a1.


@sheppard sheppard released this Mar 21, 2016 · 171 commits to master since this release

Assets 2

wq.app 1.0.0a1 is an alpha release of the upcoming 1.0 version of wq.app. A number of components and configuration options were refactored as part of the overall "patterns API cleanup" discussed in the wq.db 0.8 release notes.

wq.db.patterns API Refactor

  • Update to support the new XLSForm-style configuration object generated by the serializers in wq.db 1.0.0a1 (#38)
  • Remove references to wq.db.patterns models (wq/wq.db#35)
  • Better handling of nested forms/attachments in outbox (#56)

API Cleanup

  • Simplify plugin run() arguments (#58)
  • Add testing framework and Travis CI (#13)
  • Update Leaflet and Leaflet.Draw versions

@sheppard sheppard released this Dec 10, 2015 · 204 commits to master since this release

Assets 2

wq.app 0.8.2 brings a couple of enhancements to wq/chart.js and bugfixes to the other modules.

  • wq/chart.js
    • Show units for y axis (#8)
    • Show values when hovering on lines (#18)
    • Update boxplot value accessors to match DRP 0.4 field names (see wq/django-rest-pandas#17). The accessors can now be overridden if needed.
  • wq/map.js:
    • Don't autoZoom to hidden layers
    • Break out GeoJSON FeatureCollections for better compatibility with marker cluster plugin
    • Make marker clusters JSON-configurable
  • Update wq/autocomplete.js and wq/owl.js to new wq/app.js plugin structure
  • Better fallback in case of wq/store.js errors
  • wq/outbox.js: Simple validate() hook when saving items to outbox

@sheppard sheppard released this Aug 20, 2015 · 226 commits to master since this release

Assets 2

wq.app 0.8.1 builds on 0.8.0 to add a number of new features and enhancements, in particular to wq/map.js and wq/photos.js.

New Plugin API

wq/map.js is now a formal "plugin" for wq/app.js. This means instead of the following:

define(['wq/app', 'wq/map', './config'], function(app, map, config) {
    app.init(config).then(function() {

The following is preferred:

define(['wq/app', 'wq/map', './config'], function(app, map, config) {

A wq/app.js plugin is essentially just an object with three properties:

  • name: An identifier for the plugin
  • init(): A function to call during app.init()
  • run(): A function to call on pageshow event.

See the documentation for wq/app.js for more information on the new plugin API.

Map Configuration & Layer Editing (#41, #36)

wq/map.js is now more easily configured via pure JSON. The JSON configuration can be specified within the wq configuration object for a page by creating the map property as an object instead of a boolean. The old JavaScript-based configuration still works, but is mostly deprecated and parts will be removed in 1.0.

As part of this change, basemaps and overlays can now have custom types in addition to the default TileLayer and GeoJSON formats. The types need to be registered via JavaScript but the actual layers can be registered via JSON configuration.

The layer configuration can now be different for list, detail, and edit views. Edit view layers can also be configured as editable with a new edit property. The new map editing tools are powered by Leaflet.Draw (#36).

See the documentation for wq/map.js for more information on the new JSON-based configuration and drawing tools.

PhoneGap (Cordova) Camera Integration

wq/photos.js has finally been fully updated to integrate with the new wq/store.js API. Specifically, photos.take() and photos.pick() store PhoneGap-requested photos as Blobs for later retrieval. wq/app.js and wq/outbox.js have been updated to upload these Blobs during an outbox sync. This makes fully-offline file storage and sync (#22) possible, even when using the PhoneGap Camera API. (In wq wq.app 0.8.0, this feature only worked for files selected via <input type=file>).

Like wq/map.js, wq/photos.js has also been updated to work as a wq/app.js plugin. A number of data-wq- attributes can be used to indicate which buttons and inputs to use with wq/photos.js.

See the Species Tracker templates and the new documentation for wq/photos.js for more information.

Bug Fixes

  • Ensure wq/store.js doesn't break if offline storage is disabled (#50)
  • Fix race condition during CSRF token loading (a916aa1)
  • Fix outbox model updating bug (c0d1cc2)
  • Don't use unreliable navigator.onLine when determining whether to sync in background (#33)
  • Ensure multiple files can be submitted via the same input (or via inputs with the same name)
  • Check for existence of FormData before using it (2c34f05)
  • Fix bug in router_info.params calculation (c1a1722)
  • Fix list view filter bug (05ce964)
  • Fix SCSS build paths on Windows (085a7dc)

Minor Improvements

  • Better detection of the path to Leaflet image assets (#23)
  • Include reference to model config in info() for wq/model.js
  • Ensure page_config is set on all template context variants; preserve non-page attributes on wq_config (42685a6)
  • Add app.emptyOutbox() shortcut function
  • Add ability to display nested object errors (0c28fd2)