Labs and feasibility (WET v4.0.xplugin)
Test prototype and feasibility of front-end feature like WET v4.0.x plugin experimental project.
On this page...
JJ Down IRCC drop down
Last status: Under development
Refine/Show big list of content into a dropdown presentation. The expected behaviour is the user open up the drop down, choose an item, then either he choose again or the content is ajax-in bellow the control.
Next step / Thing to do:
Create test caseReview and validate use case- Develop the plugin
Find a plugin nameit will be namedwb-fieldflow
- Allow to pre-configure the main action, like "ajax, redir, handlebars" then each option will be parameter like "query, op, tpl"
Documents
- [Deprecated] Use cases (v1.0.0) [Completed, ]
- Progressive enhancement scenario #1, Simple (v1.0.0) [Completed ]
- Progressive enhancement scenario #2, Multi-level (v1.0.0) [Completed ]
- Exploratory implementation (v1.0.0) [Completed ]
- Use cases (v1.1.0) [Completed, ]
Coding and example
Version | Examples | Comments | Work started | Last update | Status |
---|---|---|---|---|---|
0.1.0 alpha | Plugin source code | Completed | |||
0.1.1 alpha | Plugin source code |
|
Completed | ||
0.1.2 alpha | Plugin source code |
|
Completed | ||
1.0.0-rc.1 | Plugin source code | Partial fix of Firefox keyboard issue | Completed | ||
1.0.0-rc.2 | Plugin source code | Partial fix of Firefox keyboard issue | Completed | ||
1.0.0-rc.3 | Plugin source code | Fix validation issue | Completed | ||
1.0.0 |
Working example Documentation Source code |
First version use on a production site | Released, Documation completed | ||
1.0-next.2 |
|
|
2016-10-14 | 2016-11-29 | Completed |
1-next.0 | Custom URL live building for ajax and redirect | To do | |||
1-next.1 | Use handlebars.js ? See templating labs project |
Show content in template | To do | ||
1-next.0 | Code clean up and optimisation | To do |
Completed / Thing tested:
- [] Experimental working example
It's support an infinite number of drop down, the limit is the creazyness of the imbricated list.
- [] First use in production, version 1.0.0
Fieldflow plugin
Last status: PR submited
Change a simple list into a interactive component
Coding and example
Version | Examples | Comments | Work started | Last update | Status |
---|---|---|---|---|---|
0.1.0 alpha | See jj-down version 1.0-next.2 | Completed | |||
0.2.0 beta |
English: French: Plugin source code |
In stabilization for PR | |||
1.0.0 alpha | See PR #7790 | Submited |
Templating plugin
Last status: Abandonned on Jan 10 2017
Create a templating plugin similar to data-ajax but it could deal with an external json, local variable and get
To do
- Support pre-compiled template
Documents
Coding and example
Version | Examples | Comments | Work started | Last update | Status |
---|---|---|---|---|---|
0.1.0 alpha | Plugin source code | In progress |
Data JSON
Last status: PR sumited
Similar of the data-ajax
But it is for JSON file. The main feature is it will support json filtering by URI fragment as specified in section 6 of RFC6901
Coding and example
Version | Examples | Comments | Work started | Last update | Status |
---|---|---|---|---|---|
0.1.0 alpha | Add support to use dataset name handeled by wb-jsonpatch | Merged in WET as version 1.0 on 18/11/2016 | |||
1.1 |
|
Completed | |||
1.1+alpha-2 |
Source code |
Do the French translation of the HTML5 template and add caching busting support to data-ajax and ajax-fetch | In progress | ||
1.1+alpha-3 1.1+alpha-4 |
Source code, see @duboisp branch data-json-template |
Do the French translation | In progress | ||
1.1+beta | See PR #7875 | Submited |
Documents
Quick experiment
Convert XML to JSON
To add in json-fetch
,
// Changes XML to JSON (based on https://davidwalsh.name/convert-xml-json)
xmlToJson = function ( xml ) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) { // element
// do attributes
if (xml.attributes.length > 0) {
obj["@attributes"] = {};
for (var j = 0; j < xml.attributes.length; j++) {
var attribute = xml.attributes.item(j);
obj["@attributes"][attribute.nodeName] = attribute.nodeValue;
}
}
} else if (xml.nodeType == 3) { // text
obj = xml.nodeValue;
}
// do children
if (xml.hasChildNodes()) {
for(var i = 0; i < xml.childNodes.length; i++) {
var item = xml.childNodes.item(i);
var nodeName = item.nodeName;
if (typeof(obj[nodeName]) == "undefined") {
obj[nodeName] = xmlToJson(item);
} else {
if (typeof(obj[nodeName].push) == "undefined") {
var old = obj[nodeName];
obj[nodeName] = [];
obj[nodeName].push(old);
}
obj[nodeName].push(xmlToJson(item));
}
}
}
return obj;
}
Then change include this in json-fetch
if ( !fetchOpts.isxml ) {
fetchOpts.dataType = "json";
} else {
fetchOpts.dataType = "xml";
console.log("set dataType to XML");
}
....
ar i, i_len, i_cache, backlog;
if ( fetchOpts.isxml ) {
console.log(true);
response = xmlToJson( response );
console.log(response)
}
if ( !fetchOpts.nocache ) {
try {
jsonCache[ url ] = response;
} catch ( error ) {
return;
}
}
JSON Manager
Last status: PR submited
Provide JSON basic manipulation throw patch operation, and could be customized from query string instruction and manage the data as a dataset name.
Coding and example
Version | Examples | Comments | Work started | Last update | Status |
---|---|---|---|---|---|
0.0.1 | See the Templatating (hbs) alpha version. | Closed, code isolated | |||
0.1.0 alpha |
Used by working example only: |
Plugin almost stable, next task is:
|
Completed | ||
0.2 | Require data-json v1.1 and need to include the json-patch wet-boew fork instead of wb-jsonpatch | Completed | |||
0.2 | Require data-json v1.1+a3 and need to include the json-patch wet-boew fork instead of wb-jsonpatch | Completed | |||
1.0+beta | See PR #7882 | Submited | |||
1.next | Add support for:
|
Documents
URL Mapping
Last status PR Submited
Performing action based on URL query. Check to re-use the concept of the JSON manager. Inspired by discussion on #6622 where applying filtering to a data-table based on URL query.
Create a dedicated reusable module for the "action" management. So it will be able to be re-used by wb-fieldflow and url-mapping plugin
Isolate and re-use the logic of managing the mapping of and URL. Make it a component by it's own, like the action manager
Coding and example
Version | Examples | Comments | Work started | Last update | Status |
---|---|---|---|---|---|
0.1.0 alpha | Plugin stable, next task will be documentation and add a working example for the action "addClass" and "removeClass" | Completed | |||
0.2 alpha 2 | Completed | ||||
1.0+beta | See PR #7883 | Submited |
File Meta
Last status: Prototyped
Add the file size and the file type next to a PDF link or other documents. In other word this is to convert in a WET plugin the file-size.js
used in severals page on IRCC website. was known as filesize.
Coding and example
Version | Examples | Comments | Work started | Last update | Status |
---|---|---|---|---|---|
0.1.0 alpha | Experimentation, would require i18n information | In Progress |
Responsive tables with TableSaw
Last status: Under prototyping with exploration
Provide a responsive table solution in WET.
Next step / Thing to do:
- Create use case
- Create test case
- Use the latest version of tablesaw
- Review completed work and all resources
- Review and open a discussion about the developer notes and concerns
Documents
Completed / Thing tested:
- [] Experimental example (in WET 4.0.18 and Tablesaw v1.0.3)
- [] Experimental example (in WET 4.0.6 and Tablesaw v1.0.3)
- Column swipe Demo
- All Demo
- Plugin source code: View page source of above example, between line 597 and 879 (for column swipe demo) and between line 599 and 738 (for All demo).
References and ressources
Github issue
Techniques for coding complex tables
- Defining a Key Cell
- Defining a Data Row Group
- Summaries a Data Row Group
- Structuring the Header Row
- Describing a Row Header Cell
- Describing a Row Group Header Cell
- Defining Column Group Header
- Structuring the Header Column Cell
- Defining a Data Column Group
- Summaries a Data Column Group
- Describing a Column Header Cell
- Defining a Layout Cell
Other:
HTML API
Last status: Functional and one know implementation
Operate an app by using a customized form interface, then on submit parsing the html result into JSON, then display the result by specifying a template
This is a plugin divided in part:
- Plugin in context
- Interface and interaction with the user.
- Form scraping
- Plugin that contain a pre-configured set of instruction that allow the form scraping
- Controler
- Core plugin that control the execution order
The plugin run in the following sequence:
- An anchor with a link to the web form to complete Task A
- From the config, an inline form, compatible with the destination form, in ajaxed under the link.
- The inline form is submited
- The data submission is submited, either to a RESTful API or directly to the destination form
- If is through the destination form
- Send a form post
- Wait for an answer
- Run a specialized script to extract data
- Uniform the presentation of the data, like in a form of an API, also at that stage re-adjust well know information like the language and data status
- The data is available through a standardized JSON string
- Load the appropriate HTML template based on the data status
- Run a light template system that fill the template with the data retreived from the result data.
- Output the HTML formated result
Working example: http://www.ic.gc.ca/eic/site/cipointernet-internetopic.nsf/eng/h_wr00004.html
WET Editor interface
Create a baseline template and API to be used when a WET plugin need to be configured. At the very limit it could generate the json for the data-* attribute or ideally it will generated the pre-configured plugin code and it will be able to read and modified from a pre-configured plugin code.
Some material to start with
Bars with value Charts and graph
Last status: Feasibility demonstrated
Show the actual value on the top of the bar chart by using flotcharts drawing engine.
Next step / Thing to do:
- Check https://github.com/winne27/flot-valuelabels if could fit the needs. (2017-01-22)
- Build a working example using WET framework
- Possibility of conflic when using multiple graph type
Completed / Thing tested:
[] Trying to use https://github.com/joetsoi/flot-barnumbers
Patch for wet-boew v4.0.24: Apply the patch then run
bower update
then rungrunt
then see the charts working example.Know issue do not work when charts have mixed negative and positive value, and when the charts scalling value is very large vs short.
- [] Standalone working example
- Demo
- Flot plugin
- Alternate demo (Standalone)
Curved lines Charts and graph
Last status: Working
Add effect to a line charts to have curved line when the direction change.
Next step / Thing to do:
- Review the working example
- Change how the plugin is loaded in WET
- Check if it is valuable to have that plugin included in WET
Completed / Thing tested:
- [] Working example in WET 4.0.18
- [] Working example in WET 4.x
Performance and use case Charts and graph
Last status: Data Captured
Contain a real use case with hundred of charts in one page.
Captured on
Load some flot plugin that improve the chart and display the value (almost all of them), it have charting grouping (like figure 15.15), and have dual chart in the same drawing board.
Next step / Thing to do:
- Integrate the flot plugin in WET
- See if we can improve the performance of wet-boew chart, that example for a size of 2606.25KB it only take 12.68s to render on my ff dev edition. (including all the charts)
- Create a test case for WET
Documents
See all the content of this folder. You will find flot plugin source code, several screen shot and the original html page source code. It seem to be running on WET 4.0.20 for chart dependency, but the site run on wet-boew 4.0.22
- Date modified: