Skip to content
Dec 15, 2020
run @wq/material rollup before wq.js build
Pre-release
Pre-release

@sheppard sheppard released this Oct 23, 2020

wq.app 1.3 alpha 2 brings a number of bug fixes & improvements to the @wq/react + @wq/material renderer introduced in wq.app 1.3 alpha.

  • Ensure can_add, can_change & can_delete flags are correctly applied from auth state (#124)
  • Fix handling of field-level errors when opening outbox entry (#125)
  • Improve handling of Map & Camera refs when running @wq/mapbox in react-native
  • Improve handling of non-root-URL deployments in wq serviceworker and <Breadcrumbs/>
  • Move <PropertyTable/> out of <DefaultDetail/> to a standalone component
Assets 2
Pre-release
Pre-release

@sheppard sheppard released this Sep 29, 2020

wq.app 1.3 alpha is a preview of the next version of wq.app, as part of the wq 1.3 alpha release. This is perhaps the most ambitious version of wq.app to date, bringing a brand-new UI renderer based on React and Material Design, while maintaining backwards compatibility with jQuery Mobile-based projects (for now).

This release achieves the third goal in the roadmap for wq.app 2.0. In addition to the tasks listed in that goal, the map engine and app install mechanisms have seen significant overhauls. In all, the following replacements have been made:

Deprecated Replacement
AMD / RequireJS ES Modules
jQuery Mobile + Mustache React + Material UI
Leaflet Mapbox GL
Application Cache Service Worker
PhoneGap Build Installable PWA and/or React Native + Expo

The main PRs for this release are #115 and #122.

ES Modules

Projects created with wq 1.3 now use ESM syntax, even when not using npm.

When wq.app was created, there was no standard JavaScript module format. wq.app instead leveraged RequireJS and AMD, which combined (some of) the customization capabilities of the npm ecosystem, together with (some of) the simplicity of using a plain <script> tag. Since then, ECMAScript modules (import/export syntax) have become the standard solution for both web and npm. wq.app 1.3 leverages ESM to provide users a choice between all of the customizability of npm, or all of the simplicity of a script tag. The old RequireJS build system has been deprecated and replaced with ... no build system at all!

Instead, wq.app 1.3 provides a pre-compiled ESM build, wq.js, which contains wq's core modules, the new UI renderer, the new map engine, and the third party dependencies for all of the above. This script can be leveraged via a single <script type=module> tag, or with the small number of configuration modules provided by the new wq start template.

Upgrade Notes

wq.app 1.3 still provides the old RequireJS/AMD build scripts and related commands (wq init, wq optimize, wq babel, etc.) for compatibility with older projects. However, this support will be dropped in wq 2.0. Thus, it may be good to start migrating to an ESM format sooner rather than later.

Switch to npm

The most natural route is likely to switch to using wq start --with-npm, because that provides the option to install @wq/jquery-mobile and (temporarily) defer the need to rewrite the UI layer. In addition, projects with heavily customized r.js configurations will more likely want to leverage the full capabilities of npm. In particular, you will want to use npm if you need to transpile and optimize ES6 code using babel (#83), for example to support Internet Explorer.

Switch to pre-built ESM

On the other hand, if your project contains minimal customization, you may find it easiest to switch directly to the new wq.js and its built-in UI, plugging in the configuration generated by wq.db and then making minor adjustments as needed. Note that the new setup leverages Django's staticfiles app, which means that:

  1. The development server will automatically serve the latest contents of the app/ folder (see wq/wq-django-template#21).
  2. ./manage.py collectstatic will deploy the app/ folder to the production directory htdocs/static/app/ (see wq/wq-django-template#6).

As of wq.app 1.3, the wq build command can automatically detect the project type by examining wq.yml for an optimize section, and by checking for the existence of package.json (see #119). Projects without either of these are assumed to be using the pre-built ESM.

React + Material UI

@wq/react + @wq/material is the new default UI renderer.

wq.app initially used jQuery Mobile, together with a customized Mustache template engine, to provide offline rendering capability. However, the jQuery Mobile project has not released any update for several years. In addition, the need to generate and compile dozens of Mustache templates into a JSON fixture made wq unecessarily complicated to use, even though the process was partially automated.

wq.app 1.3 instead provides a flexible render based on React, Material UI and React Native Paper. It is enabled by default for new projects, and includes default React components for all @wq/app route types. This means that for simple projects, it is not necessary to explicitly define any UI screens, except to customize the defaults.

To facilitate both rendering modes, the UI is now configured by registering a renderer plugin with @wq/app:

module description
@wq/react+@wq/material New Material Design renderer based on React and React Native
@wq/jquery-mobile Legacy renderer based on jQuery Mobile and Mustache.js

Upgrade Notes

Continue using jQuery Mobile

If you are upgrading from an older version of wq with npm, you will need to to explicitly install and register the @wq/jquery-mobile renderer:

import app from '@wq/app';
import jqmrenderer from '@wq/jquery-mobile';
app.use(jqmrenderer);

If you are upgrading from an older RequireJS/AMD template, wq/jquery-mobile.js will be imported automatically in wq/app.js. However, note again that RequireJS support will be dropped in wq 2.0. The wq maketemplates, wq scss, and wq mustache commands are also deprecated and will be removed in 2.0.

Note that wq/template.js, wq/patterns.js, and wq/photos.js are now contained within @wq/jquery-mobile and do not need to be registered separately.

Switch to @wq/react + @wq/material

@wq/react + @wq/material presents a radical departure from the old rendering system, and there is little that can be directly ported. That said, it should be relatively easy to plug your existing wq.db configuration into the new renderer, and obtain a usable default interface to iterate on. Two main things to keep in mind are:

  1. Mustache rendering is no longer used, so templates/, master_templates/ and associated tooling is no longer necessary. In addition, it is no longer necessary to define the UI for the entire application, just for the parts where you want to override the defaults.
  2. The old run($page, routeInfo) plugin hook is no longer available, as it relied on the jQuery Mobile-specific $.mobile.activePage object.

In both cases, the new way to provide custom functionality is by registering one or more custom components with @wq/app. Custom components can override individual inputs or entire views.

Mapbox GL

@wq/mapbox is the new default map engine.

wq.app 1.3 provides the option to use Mapbox GL for the map engine. Key advantages over Leaflet include support for vector tiles, and native SDKs for Android and iOS. Leaflet-specific code in the old @wq/map has moved to @wq/leaflet, while the new Mapbox GL renderer is available as @wq/mapbox. Both depend on the @wq/map plugin, which now just handles the map configuration and state.

module description
@wq/map+@wq/mapbox Mapbox GL JS integration for web and Mapbox Maps SDK for Android & iOS.
@wq/map+@wq/leaflet Leaflet integration (web only).

Upgrade Notes

Continue using Leaflet

If you are upgrading from an older version of wq with npm, install and import @wq/leaflet instead of @wq/map. If you are upgrading from an older RequireJS/AMD template, then wq/map.js is actually an alias for @wq/leaflet and should work the same as before. However, note again that RequireJS support will be dropped in wq 2.0.

Switch to @wq/mapbox

@wq/map's layer configuration syntax is designed to be engine-agnostic, so switching from @wq/leaflet to @wq/mapbox will generally just work. However, you will likely want to take advantage of Mapbox GL's vector tile support. To do so, you will need to find a vector tile provider online or host the tiles yourself. Providers known to work with @wq/mapbox include Mapbox (obviously), ESRI, and MapTiler Cloud.

Service Worker

Browsers are removing support for Application Cache, which has been superseded by Service Worker.

The Application Cache standard is being deprecated by browser vendors, and for good reason - it was inflexible and hard to use. wq now includes built-in support for Service Workers instead. The new wq serviceworker command replaces the wq appcache command for projects not using npm. For projects using npm, the provided @wq Create React App template already includes code to generate a service worker.

Upgrade Notes

The wq appcache command will be removed in wq 2.0, and remains in 1.3 for backwards comparability. However, Application Cache has likely already stopped working for your users. To use service workers in an project with npm, change serviceWorker.unregister() to serviceWorker.register() in src/index.js. For projects without npm, use the wq serviceworker command by adding a serviceworker section to your wq.yml, perhaps basing it on the new default template. Then, make sure your service worker is registered by adding the following line to your main JS file:

navigator.serviceWorker.register('/service-worker.js');

Installable PWA

PhoneGap Build is no more... but wq.app generates installable PWAs instead!

PhoneGap Build was the main way to compile wq-based apps for distribution on the Android and iOS stores. However, the service has recently gone offline, and general interest in Cordova/PhoneGap has waned. Installable progressive web apps, or PWAs, provide a full-featured alternative that should be suitable for many projects. On Android in particular, PWAs are effectively indistinguishable from native apps once installed. wq has long supported the "Add to Homescreen" option, but the addition of Service Worker support significantly increases the likelihood that the phone UI will automatically prompt the user to install the application (see #63, #107).

Upgrade Notes

To create a progressive web app, be sure to enable wq.app's service worker support. Then, customize your app icon by editing app/public/images/icon.svg, and saving it to app/public/images/icon-1024.png. Customize the title and colors in app/public/manifest.json, run ./deploy.sh again, and ensure HTTPS is enabled. Your web app should be ready for installation.

The wq phonegap command remains, but will likely fail when sending the payload to the build servers. It will be removed in wq 2.0 (see #121).

React Native + Expo

wq.app now supports React Native and Expo if you need a truly native app.

Sometimes even a progressive web app is not enough, particularly if your app is intended for a wide audience of users who are used to finding apps on the stores. Or, perhaps you may want to take advantage of Mapbox's native SDKs. To support these use cases, @wq/react, @wq/material, and @wq/mapbox all support both React Native and Expo.

Upgrade Notes

To use React Native or Expo, it may be easiest to start by creating a project using the recommended tools for each platform. Then, replace the contents of src/ with the contents of @wq/cra-template's src/ directory. It is possible (and recommended) to use the same src/ directory for both the web and native deployments of a wq.app-based project. Finally, you will need to install all additional dependencies as described in the documentation for @wq/material and @wq/mapbox.

Assets 2

@sheppard sheppard released this Jan 22, 2020

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

Other changes since wq.app 1.1.2

  • Changes in Alpha

    • @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 of app.nav()
      • app.sync(true) has been renamed to app.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(), and subscribe() methods correspond to Redux equivalents.
      • Enables Redux Logger when config.debug is true
      • @wq/app plugins that define name, reducer() and actions:{} will get their own state in the store.
      • jsonp and parseData options are replaced with the ajax() plugin hook
      • ds.storageUsage() has been removed.
    • @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 with router.go(). router.go() no longer can/should be invoked indirectly.
      • router.addRoute() is deprecated in favor of run() 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 wraps objects.filter(), which supports predicate functions and better indexing. Note that objects.filter() uses strict equality when comparing object attributes.
      • find(), update(), fetchUpdate() and remove() no longer support specifying an id column. Instead, define idCol when configuring/initializing the model.
      • @wq/model now supports (de)normalization for nested models returned from server APIs (#114)
    • @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(), and empty(). Use these instead of sendItem(), sendAll(), and the noSend option for save(), 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 of outbox.loadItems()
      • parseBatchResult(), applyResult() and updateModels() are no longer available.
    • Other Changes

      • @wq/map: copy layer config in case it is modified by function (440dc9b)
      • @wq/map: don't update sticky bounds when map is off-screen (5952fe6)
      • 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.
  • Changes in Beta
    • Automatically navigate to permanent URL once new items are synced (#98, #99)
    • filter_fields and filter_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
    • Various bug fixes
Assets 2
Pre-release
Pre-release

@sheppard sheppard released this Oct 7, 2019

wq.app 1.2.0b1 is the beta version of the upcoming wq.app 1.2 release. In addition to the major changes introduced in wq.app 1.2 alpha, wq.app 1.2 beta includes the following updates:

New Features

Thanks to @tomaszn for feedback on the design of many of these features.

  • If the current URL contains the temporary ID of an unsynced record (e.g. "outbox-123"), automatically navigate to the new URL once synced (#98, #99)
  • New filter_fields and filter_ignore configuration options for @wq/model. If a URL parameter is not found inform, functions, or filter_fields, it will be ignored when filtering list views (#88).
  • Simplified onsync(item) plugin hook, called after each outbox item is synced to the server (#96)
  • Better management of URL params during pagination (778631c, c2b5ab0)

Removed Features

To clean up the API and prepare for a future migration away from jQuery Mobile (#111), this release removes several older hooks and events, as noted in the updated @wq/app documentation and below.

name type suggested migration path
onsave(item, result) Plugin Hook Use an onsync() hook instead. The server result will be available as item.result.
saveerror(item, reason, $form) Config Hook Use an onsync() hook instead. The error will be available as item.error.
showOutboxErrors() Config Hook Use an onsync() and/or run() plugin hook instead.
postsave() Config Hook Use a postsaveurl() plugin hook instead.
presync() / postsync() Config Hook Use the template context as needed for UI customizations. Pages displaying outbox contents are automatically re-rendered after each sync.
"login", "logout" jQuery events Use the template context as needed for UI customizations. As of wq.app 1.2, all pages (including server-rendered pages) are automatically re-rendered on the client if the login state changes.
config.transitions.save jQuery Mobile transition This was a wq.app-specific configurable transition and has no effect in 1.2. The default and dialog transitions remain configurable, but it is recommended to leave them as "none".

In addition to the above, note that the ui option passed to jQuery Mobile navigation events is no longer used, as Redux First Router now handles all navigation. Among other things, this means that setting data-transition or data-direction on an <a href> no longer has any effect.

Bug Fixes

  • Confirm rare sync timing issue no longer exists in @wq/outbox (#102)
  • Fix issues with refresh logic (c738019) and sync navigation logic (b42d152)
  • Bind this to plugin for reducer() and render() plugin hooks (e94ebd6)
Assets 2
Pre-release
Pre-release

@sheppard sheppard released this Aug 8, 2019

wq.app 1.2 alpha is a preview of the next version of wq.app. The primary change is the integration of Redux and related libraries as part of a comprehensive overhaul of the data model layer (#105).

This release achieves the second goal in the 2019 roadmap for wq.app.

Overview

New Features

Redux Integration (#105, #113)

  • @wq/store now provides dispatch(), getState(), and subscribe() methods, which directly wrap the corresponding Redux store methods.
  • The following @wq/app plugin hooks are now available:
    • reducer() and actions for plugin-specific Redux state (@wq/store)
    • thunks and render() for more complex Redux actions and rendering (@wq/router)
  • When debug is active, @wq/store will log all Redux events and state changes (including page navigation and rendering events) to the console via Redux Logger.
  • @wq/router routes are now named, with Redux action types that generally match the template name.
  • @wq/model's [model].filter() is now a wrapper for Redux-ORM's filter(), which provides additional features such as predicate function filters and better indexing.
  • Direct access to the Redux-ORM queryset is also available via [model].objects.all().
  • @wq/outbox supports several new methods to control syncing: waitForItem(), waitForAll(), retryItem(), retryAll(), pause(), resume(), and empty().

Other Improvements

  • The first loaded page is now always re-rendered by the client during application startup, as well as after authentication changes (#79)
  • New applyState configuration option to control when updates are applied to the local model (#85, #86). A different set of Redux actions will be applied for form submission/success/error depending on this setting. The available options are:
    • "ON_SUCCESS" (default): form submissions will not be reflected in the local model state until after the form is successfully synced to the server.
    • "IMMEDIATE": form submissions are optimistically reflected in the local model state before they are sent to the server.
    • "LOCAL_ONLY": form submissions are not synced to the server at all. In this case, nothing is stored in the outbox, so the only reason to use outbox.save() is to maintain API consistency with other forms.
  • Support syncing multiple items in a single fetch() (#110), by leveraging @tomaszn's fork of Django Batch Requests.
  • Support registering a top-level model and also having it as an attachment (nested record) for another model (#114). The records will be normalized for local storage and denormalized for the API.
  • Add removeattachment action to @wq/app:patterns plugin (d5372ff)
  • Generate sourcemaps for wq/* AMD modules (43222ff)

Bug Fixes

  • The integration of Redux Offline addresses a number of issues with offline state and syncing, particulary #33, #94/#95, and #102.
  • @wq/map:
    • Copy layer config in case it is modified by function (440dc9b)
    • Don't update sticky bounds when map is off-screen (5952fe6)

Breaking Changes

This release necessarily changes a lot of the underlying data model, while keeping the UI layer mostly the same. If you are only using the high-level API, only the changes to @wq/app should affect you. If you are using app.models or the lower level modules directly, you may want to review the other changes below.

@wq/app

  • app.go() has been removed. You can generally use app.nav() instead, with a context() plugin for cases where you need a custom context.
  • app.sync(true) has been renamed to app.retryAll()
  • app.sync() and config.backgroundSync are no longer available. The timing of syncing (other than manual retries) is now handled by @wq/outbox and Redux Offline.
  • Login/logout events are now dispatched as Redux actions rather than as jQuery events. Pages are re-rendered after auth changes, so any updates to the UI should happen in the template and context rather than in a jQuery event handler.
  • The first page is always re-rendered by the client during application startup.

@wq/store

  • The jsonp and parseData configuration options no longer exist. To customize how data is retrieved and parsed, use an ajax() plugin hook instead.
  • The promise returned by ds.set() no longer waits until the data has been fully persisted to offline storage before resolving.
  • ds.storageUsage() has been removed.
  • ds.reset() no longer has the capability of clearing out persisted storage for stores other than the current one.

@wq/router

  • Route info is now provided only through the template context (and not as router.info).
  • With the exeption of path, the arguments to router.register() have completely changed, though they serve a similar function. With wq.app 1.1 and earlier, a callback function was required, and needed to explicitly call router.go() with the generated context. Starting in 1.2, the callback function is optional, and only needs to return a new context object.
  • router.go() is now called automatically whenever the Redux state changes. So, it is not necessary (or possible) to call it directly.
  • The arguments to router.addRoute() have also changed somewhat, and the function is deprecated in favor of run() plugin hooks anyway.

@wq/model

  • A name is now required for all model instances. (@wq/app provides this automatically)
  • find(), update(), fetchUpdate() and remove() no longer accept a custom id column as the second argument. If the primary key is not "id", specify idCol when defining the model.
  • filter() is now based on Redux-ORM's filter(), which uses strict equality when comparing object attributes. In wq.app 1.1 and earlier, {'type_id': '3'} and {'type_id': 3} returned the same result, whereas in wq.app 1.2 they are different.

@wq/outbox

  • The Promise returned by outbox.save() is now resolved before the record is synced. If you need to wait for the sync result, call outbox.waitForItem() after calling outbox.save(). Relatedly, outbox.save() no longer accepts a third noSend argument. If you would like to save an item to the outbox without triggering an immediate sync attempt, call outbox.pause() before outbox.save().
  • outbox.sendItem() and outbox.sendAll() have been removed. Similar functionality is provided by outbox.waitForItem(), outbox.waitForAll(), and outbox.retryAll().
  • @wq/outbox no longer uses an internal @wq/model instance for managing unsynced records. Instead, the underlying Redux Offline outbox state is wrapped with a model-like API. If you have code relying on outbox.model.load(), change it to use outbox.loadItems() instead which provides an equivalent structure.
  • batchService should be specified as a URL path relative to the service root (rather than relative to the domain)
  • parseBatchResult(), applyResult() and updateModels() are no longer available as configuration options. The first two can be replaced with a custom ajax() plugin hook, while updateModels() is now implemented via Redux actions.
Assets 2

@sheppard sheppard released this May 21, 2019

wq.app 1.1.2 brings a significant overhaul to the internal source structure, while (mostly) retaining full backwards compatibility. Specifically, wq.app is now organized as a monorepo containing several npm packages (see #1, #84, #66, and #109). The new packages are written as ES6 modules, but compiled back into AMD modules for compatibility with the existing wq.app PyPI package.

This release achieves the first goal in the 2019 roadmap for wq.app.

Using fetch()

While wq.app 1.1.2 is intended to be fully backwards compatible with 1.1.1, there is one important exception: the use of fetch() to handle AJAX requests. If you need to support older browsers without a built-in fetch() (such as IE 11), you will need to include a polyfill before loading wq.app:

<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/3.0.0/fetch.min.js"></script>
<script src="/js/lib/require.js" data-main="/js/myapp"></script>

In addition, if you are using a custom ajax() plugin hook (added in 1.1.1), note that the arguments have changed slightly:

  • For POST requests, the url is a URL object, and data is a FormData object.
  • For GET requests, the url a string, and data is an object containing URL parameters.
  • If the request fails with a server error, the plugin should throw an Error with a json attribute if the error is an object or a text attribute otherwise. (See the default implementation for an example). Unlike $.ajax(), fetch() does not automatically throw in the case of 400 and 500 errors.

Deprecated Modules

wq/autocomplete.js, wq/console.js, wq/json.js, and wq/progress.js are deprecated and have been removed from the source repository. For backwards compatibility, the Python package includes copies of these modules from 1.1.1.

Other Changes

  • Ensure base URL is used when falling back to server rendering (#112 via @tubaman)
  • Various outbox improvements (7f548bc)
Assets 2

@sheppard sheppard released this Apr 18, 2019

wq.app 1.1.1 brings a couple of bug fixes, a new ajax() plugin hook, and an improved wq/chartapp.js API.

Note: there are a number of exciting changes in the works, and wq.app 1.1.1 will be the last release before the big upgrades begin. See #111 for more information.

Bug Fixes

  • Prevent users accidentally double-clicking the submit button (#100)
  • wq phonegap command compatibility with 8-bit icons (#108 via @tomaszn)

New Features

ajax() plugin hook

You can now completely override the behavior of GET and POST requests made by wq/model.js and wq/outbox.js. To do this, define a wq.app plugin with an ajax() method that takes four arguments: url, data, method, and headers.

define({
    "ajax": function(url, data, method, headers) {
        if (method == "POST") {
            return somePostMethod(url, data, headers)
        } else {
            return someGetMethod(url, headers);
        }
    }
});

Here are a few things to keep in mind:

  • The data object for post requests may be either a plain object or a FormData instance.
  • You are free to rewrite or completely ignore the passed URL, for example to integrate with an arbitrary (non wq.db) REST API.
  • The ajax() method should return a Promise that will resolve to the JSON object returned by the REST service.
  • If the REST service is not compatible with wq.db, be sure to process the response into a compatible format.

wq/chartapp.js

A number of changes wq/chart.js and the wq/chartapp.js plugin make it possible to configure the main chart options via custom data-wq-* attributes. For example:

<svg data-wq-url="/api/data/timeseries.csv"
     data-wq-type="timeSeries"
     data-wq-point-cutoff="100"
     data-wq-time-format="%Y-%m-%d"
     data-wq-width="800"
     data-wq-height="600"
     data-wq-x="date"
     data-wq-y="value"
     data-wq-label-template="{{series_label}}"
     data-wq-point-label-template="Value on {{date}}" >
</svg>
Assets 2

@sheppard sheppard released this Apr 23, 2018

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).
Assets 2

@sheppard sheppard released this Jul 24, 2017

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

Assets 2