g1 issueshttps://code.gramener.com/cto/g1/-/issues2018-10-05T18:24:51Zhttps://code.gramener.com/cto/g1/-/issues/101Mapviewer: choropleth must support option of refetching and merging datasets2018-10-05T18:24:51ZTejeshMapviewer: choropleth must support option of refetching and merging datasetsUsecase: When geojson files is same but external dataset changes, developer wants to Refresh colors of map only (without rebuilding the whole vector layer)
raised by @bharath.r as part of ceasefire projectUsecase: When geojson files is same but external dataset changes, developer wants to Refresh colors of map only (without rebuilding the whole vector layer)
raised by @bharath.r as part of ceasefire projectTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/102Mapviewer: add test case for multiple map legends2018-10-30T06:04:11ZS AnandMapviewer: add test case for multiple map legendsWhen creating multiple maps, ensure that:
- options of one map legend do not bleed into another
- removing a map does not remove other map legendsWhen creating multiple maps, ensure that:
- options of one map legend do not bleed into another
- removing a map does not remove other map legends1.44TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/103g1 dropdown `data` to support object also (in addition to array)2019-01-30T06:53:37ZTejeshg1 dropdown `data` to support object also (in addition to array)spec
```js
[
{
attr: val_1_1,
attr2: val_1_2
},
{
attr: val_2_1,
attr2: val_2_2
},
{
attr: val_3_1,
attr2: val_3_2
},
{
attr: val_4_1,
attr2: val_4_2
},
..
..
]
<script>
$('.contai...spec
```js
[
{
attr: val_1_1,
attr2: val_1_2
},
{
attr: val_2_1,
attr2: val_2_2
},
{
attr: val_3_1,
attr2: val_3_2
},
{
attr: val_4_1,
attr2: val_4_2
},
..
..
]
<script>
$('.container3').dropdown(
{ key: 'colors',
data: [
{
value: 0,
label: 'Hyderabad'
},
{
value: 1,
label: 'Delhi'
},
{
value: 2,
label: 'Mumbai'
},
{
value: 3,
label: 'Chennai'
}
],
target: '#'
})
</script>
```
![image](/uploads/2b92dcd2f3582ad8f98a9cfc4ea903f2/image.png)Pragnya Reddypragnya.reddy@gramener.comPragnya Reddypragnya.reddy@gramener.comhttps://code.gramener.com/cto/g1/-/issues/104g1.formhandler Editable table must render appropriate UI elements for corresp...2018-11-14T11:33:32ZTejeshg1.formhandler Editable table must render appropriate UI elements for corresponding data TypeUsecase:
* [x] dropdown in FormHandler table for use in the admin page. This will allow developers to specify a pre-defined list of roles users can pick from.
Will start with dropdown support and extend for
* [x] DatePicker
* [x] ...Usecase:
* [x] dropdown in FormHandler table for use in the admin page. This will allow developers to specify a pre-defined list of roles users can pick from.
Will start with dropdown support and extend for
* [x] DatePicker
* [x] restricted number type input element (Min, Max, etc)1.45TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/105G1 UrlFilter interactive documentation2019-02-15T07:30:21ZTejeshG1 UrlFilter interactive documentationTejesh to merge work done by @jaiprakash.siyyadri
@sundeep.mallu could you please suggest priority on releasing this part of 1.45?
cc: @s.anandTejesh to merge work done by @jaiprakash.siyyadri
@sundeep.mallu could you please suggest priority on releasing this part of 1.45?
cc: @s.anand1.51S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/106G1 Translate2019-01-23T11:09:13ZTejeshG1 Translatehttps://paper.dropbox.com/doc/Translation-in-Gramex-9xaf4qruopZHQthjfOU5ghttps://paper.dropbox.com/doc/Translation-in-Gramex-9xaf4qruopZHQthjfOU5g1.50Som Shubham SahooSom Shubham Sahoohttps://code.gramener.com/cto/g1/-/issues/107Trigger simple hashchange events2018-11-16T14:40:57ZS AnandTrigger simple hashchange events### Summary
When the URL hash changes, trigger a `#?key` event on the window.
### Benefits
This makes it easier for developers to write URL-driven applications.
To change state, just add `<a href="#?key=val" class="urlfilter" data-ta...### Summary
When the URL hash changes, trigger a `#?key` event on the window.
### Benefits
This makes it easier for developers to write URL-driven applications.
To change state, just add `<a href="#?key=val" class="urlfilter" data-target="#">`
To respond to state, don't use `$('a').on('click')`. Instead, use `$(window).on('#?key')`.
### Usage
For example, if the URL changes from `/page` to `/page#?state=Goa`, you can listen to `$(window).on('#?state', function(state) { ... })` will be triggered with `Goa` as the `state`.
It will also trigger `$(window).on('#?', function(url) { ... })` where `url` is a g1 parsed URL.
To enable this, just run `$(window).urlchange(options)`.
Instead of `window`, we can run this on iframes and any other urlfilter target too.1.46S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/108Mapviewer - drilldown and tooltip bugfixes2019-01-16T04:23:13ZTejeshMapviewer - drilldown and tooltip bugfixesTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/109formhandler table copy/pasteFromClipboard feature2018-11-14T11:37:46ZTejeshformhandler table copy/pasteFromClipboard featureTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/110edit mode for formhandler table for data: option (non-gramex endpoints)2019-02-07T10:43:22ZTejeshedit mode for formhandler table for data: option (non-gramex endpoints)TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/111remove dev dependencies from package.json2018-12-08T00:58:30ZTejeshremove dev dependencies from package.jsonjust a reminder!just a reminder!1.47TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/112Highlight/Log name mismatches for data and map files2019-01-14T11:28:09ZBhanu Kbhanu.kamapantula@gramener.comHighlight/Log name mismatches for data and map files### Summary
Highlighting mismatches in data and map files. In the below map, the name mismatches (J&K and Telangana) are silently ignored and not notified for the user
![map_screenshot__4_.svg](/uploads/de47ae8bef948e9b65ef7eab7facb21b...### Summary
Highlighting mismatches in data and map files. In the below map, the name mismatches (J&K and Telangana) are silently ignored and not notified for the user
![map_screenshot__4_.svg](/uploads/de47ae8bef948e9b65ef7eab7facb21b/map_screenshot__4_.svg)Bharat Rbharath.r@gramener.comBharat Rbharath.r@gramener.comhttps://code.gramener.com/cto/g1/-/issues/113Multi-column support2018-12-14T05:16:55ZBhanu Kbhanu.kamapantula@gramener.comMulti-column supportTejesh: alter table to create new columns if the data source is `FormHandler` endpoint else add to `JSON` objectTejesh: alter table to create new columns if the data source is `FormHandler` endpoint else add to `JSON` objectTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/114Support for latitude, longitude points as input2018-11-22T06:42:55ZBhanu Kbhanu.kamapantula@gramener.comSupport for latitude, longitude points as inputusers should be able to use `Lat-Long` points instead of `GeoJSON` or `TopoJSON` as input
Ref: leaflet supports a [`latLngToCoords`](https://leafletjs.com/reference-1.3.4.html#geojson-latlngtocoords) methodusers should be able to use `Lat-Long` points instead of `GeoJSON` or `TopoJSON` as input
Ref: leaflet supports a [`latLngToCoords`](https://leafletjs.com/reference-1.3.4.html#geojson-latlngtocoords) methodhttps://code.gramener.com/cto/g1/-/issues/115g1 template should support list creation2018-11-24T09:00:01ZS Anandg1 template should support list creation### Summary
`$().template()` replaces the target DOM element. Allow it to append to the target DOM element.
### Benefits
This helps in creating lists that can be extended. For example:
- Repeated AJAX loads append data to the target ...### Summary
`$().template()` replaces the target DOM element. Allow it to append to the target DOM element.
### Benefits
This helps in creating lists that can be extended. For example:
- Repeated AJAX loads append data to the target node
- Successive notifications can be appended to the target node
### Usage
`$().template({}, {append: true})` should enable this behavior.1.46S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/116Allow loading multiple pages via AJAX2018-11-27T03:51:26ZS AnandAllow loading multiple pages via AJAX### Summary
Create a `$.ajaxchain()` that allows chaining AJAX requests flexibly
### Benefits
- Lets you load FormHandler pages successively with a single call
- Loads multiple pages of data from APIs (e.g. YouTube, Twitter, etc) easily### Summary
Create a `$.ajaxchain()` that allows chaining AJAX requests flexibly
### Benefits
- Lets you load FormHandler pages successively with a single call
- Loads multiple pages of data from APIs (e.g. YouTube, Twitter, etc) easily1.46S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/117Support multiple datasets2019-02-07T10:43:07ZPragnya Reddypragnya.reddy@gramener.comSupport multiple datasets`$.formhandler` should render multiple tables when `data-src` returns multiple datasets`$.formhandler` should render multiple tables when `data-src` returns multiple datasetsTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/118Mapviewer's buildlayer doesn't support tooltip2019-01-14T11:28:09ZBhanu Kbhanu.kamapantula@gramener.comMapviewer's buildlayer doesn't support tooltip### Summary
tooltip enabled and applied via `buildLayer` doesn't apply
### Steps to reproduce
- use `g1.mapviewer` and create a map via `buildLayer` -- `map.buildLayer('layername', layer_opts)` where map is a `g1.mapviewer()` object a...### Summary
tooltip enabled and applied via `buildLayer` doesn't apply
### Steps to reproduce
- use `g1.mapviewer` and create a map via `buildLayer` -- `map.buildLayer('layername', layer_opts)` where map is a `g1.mapviewer()` object and `layer_opts` are layer options
- one of the attributes in `layer_opts` is `tooltip: function(d) { return d.value; }`
### What is the current *bug* behavior?
Tooltip doesn't show up
### Possible fixes
In [`src/mapviewer.js`](https://code.gramener.com/cto/g1/blob/dev/src/mapviewer.js#L237), do the below:
```javascript
case 'topojson':
case 'geojson':
if() {
...
self.renderTooltip(layerName, layerConfig)
...
} else {
...
self.renderTooltip(layerName, layerConfig)
...
}
```
with this a developer can define
```javascript
tooltip: function(d) {
// console.log(d)
return d[_map_data['metric']] !== undefined ? d[_map_data['metric']].toString() : d[_map_data['metric']];
},
tooltipOptions: {
direction: function (args) {
return args.centerPoint[1] > args.tooltipPoint.x[1] ? 'top' : 'bottom'
},
sticky: true
},
```
note that `tooltipOptions` is optionalBhanu Kbhanu.kamapantula@gramener.comBhanu Kbhanu.kamapantula@gramener.comhttps://code.gramener.com/cto/g1/-/issues/119urlchange usage patterns2019-02-16T04:54:14ZPratap Vardhanpratap.vardhan@gramener.comurlchange usage patterns# 1
Currently only single key change is supported `?key=only`
I'd like to capture events for when multiple keys have changed
```
#?key-one&key-two -- AND
#?key-one|key-two -- OR can be handled with chained .on().on()
```
# 2
When ...# 1
Currently only single key change is supported `?key=only`
I'd like to capture events for when multiple keys have changed
```
#?key-one&key-two -- AND
#?key-one|key-two -- OR can be handled with chained .on().on()
```
# 2
When key is removed hash or entirely removed to `#?`, event is not trigger.
This would help to detect reset mode.
# 3
Document how to reset url state to home hash.1.51Karmanya AggarwalKarmanya Aggarwalhttps://code.gramener.com/cto/g1/-/issues/120FormHandler usecases for documentation examples2019-02-05T10:15:17ZPratap Vardhanpratap.vardhan@gramener.comFormHandler usecases for documentation examplesShow examples for
- Have access to fetched data
Show examples for
- Have access to fetched data
1.51TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/121g1.dropdown documentation notes2019-02-02T14:40:04ZPratap Vardhanpratap.vardhan@gramener.comg1.dropdown documentation notes# 1
In a page with `g1.dropdown({ key: 'drop', ... })`, if user open a url with `#?drop=value1`, show code snippet that shows the default dropdown value as `value1`# 1
In a page with `g1.dropdown({ key: 'drop', ... })`, if user open a url with `#?drop=value1`, show code snippet that shows the default dropdown value as `value1`https://code.gramener.com/cto/g1/-/issues/122Mapviewer: add removeLayer abstract function2019-02-02T14:38:24ZTejeshMapviewer: add removeLayer abstract functionmap.removeLayer('layerName') must remove 'layerName' layer from map....map.removeLayer('layerName') must remove 'layerName' layer from map....Bharat Rbharath.r@gramener.comBharat Rbharath.r@gramener.comhttps://code.gramener.com/cto/g1/-/issues/123formhandler - don't allow both add and edit to happen at the same time2019-01-14T11:28:09ZTejeshformhandler - don't allow both add and edit to happen at the same timeSindhura CHSindhura CHhttps://code.gramener.com/cto/g1/-/issues/124Data convertor utility2019-02-28T06:49:13ZBhanu Kbhanu.kamapantula@gramener.comData convertor utilityAn utility to convert/transform data structures from one way to another is much needed.
Use case: I've a CSV that can I use to create a bar chart. Using the same for a sunburst layout will need data structure manipulation, a skill restr...An utility to convert/transform data structures from one way to another is much needed.
Use case: I've a CSV that can I use to create a bar chart. Using the same for a sunburst layout will need data structure manipulation, a skill restricted to developers.
Impact on: chart interface. Non developers will be able to create suitable data structures for different charts.
Even for a larger data community this is a useful feature as currently none exist.https://code.gramener.com/cto/g1/-/issues/125Implement a FormHandler form editor2019-02-07T10:42:47ZS AnandImplement a FormHandler form editorAllow users to design a form that updates a single row. Use this to
- edit rows
- as a modal, a separate section, or as an iframe
- rapidly flip between rows using submit / keyboard navigation
- learn from data already typed to ease the...Allow users to design a form that updates a single row. Use this to
- edit rows
- as a modal, a separate section, or as an iframe
- rapidly flip between rows using submit / keyboard navigation
- learn from data already typed to ease the process of filling the form
- support automated columns (e.g. updated time, editor)https://code.gramener.com/cto/g1/-/issues/126Templates should only update changed elements via virtualdom2019-01-04T12:20:52ZS AnandTemplates should only update changed elements via virtualdomThis allows:
- Smooth animation via CSS style updates
- Lower CPU utilization
- Faster DOM updatesThis allows:
- Smooth animation via CSS style updates
- Lower CPU utilization
- Faster DOM updates1.49S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/127g1.formhandler calls render on window hashchange event, document usage on SPAs2019-02-07T03:59:08ZPratap Vardhanpratap.vardhan@gramener.comg1.formhandler calls render on window hashchange event, document usage on SPAsOn SPAs, when you rerender the view/formhandler, events attached `$(window).on('hashchange', render)` will still exist. This results in N+1 xhr requests made for data.
What should be recommended/cleaner way to destroy previously attach...On SPAs, when you rerender the view/formhandler, events attached `$(window).on('hashchange', render)` will still exist. This results in N+1 xhr requests made for data.
What should be recommended/cleaner way to destroy previously attached events?1.51Pratap Vardhanpratap.vardhan@gramener.comPratap Vardhanpratap.vardhan@gramener.comhttps://code.gramener.com/cto/g1/-/issues/128Add urlchange event to path changes2019-01-11T15:03:06ZPratap Vardhanpratap.vardhan@gramener.comAdd urlchange event to path changesCurrently, `urlchange` detects query changes, would like to detect path changes as well
`#/path1/sub1/?q=1` -> `#/path2/sub2/?q=1`
```javascript
$(window).urlchange()
.on('#/', ... })
```
Also, add a note in the documentation about ...Currently, `urlchange` detects query changes, would like to detect path changes as well
`#/path1/sub1/?q=1` -> `#/path2/sub2/?q=1`
```javascript
$(window).urlchange()
.on('#/', ... })
```
Also, add a note in the documentation about when history changes and when it does not, and how this interacts with the back button.1.49S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/129g1.urlfilter does not work for checkboxes2020-06-22T08:16:39ZTejeshg1.urlfilter does not work for checkboxes```html
<li class="state_dropdown" filter-name="state_level" data-val="Odisha">
<label class="custom-control custom-checkbox h5 mb-0 text-nowrap cursor-pointer">
<input type="checkbox" class="custom-control-input urlfilter" d...```html
<li class="state_dropdown" filter-name="state_level" data-val="Odisha">
<label class="custom-control custom-checkbox h5 mb-0 text-nowrap cursor-pointer">
<input type="checkbox" class="custom-control-input urlfilter" data-mode="toggle" data-target="#" checked>
<span class="custom-control-label"></span>
<span class="custom-control-description sm2">Odisha</span>
</label>
</li>
```
is expected to update url and also, toggle the state of checkbox. It does neither.
g1.urlfilter's `e.preventDefault` intrudes bootstrap checkbox events.
Possible solutions:
Apply preventDefault only for anchor tags.
```js
if(e.target.tagName.toLowerCase() === 'a') {
e.preventDefault()
}
```
raised by @naveen.manukonda1.52TejeshTejesh2019-07-31https://code.gramener.com/cto/g1/-/issues/130g1 compatible Browser Version list2019-01-12T11:43:07ZSundeep Reddy Mallug1 compatible Browser Version list### Summary
Evaluate and publish list of compatible Browser version for g1
### Benefits
Establish clear line of communication from Sales, Marketing material and project teams on the compatible browser versions. This will ensure custome...### Summary
Evaluate and publish list of compatible Browser version for g1
### Benefits
Establish clear line of communication from Sales, Marketing material and project teams on the compatible browser versions. This will ensure customers don't have negative experience while using the Data Apps built on top of Gramex.
### Usage
Establish browser version that should be part of our delivery commitment
- Chrome
- Firefox
- Safari
- Microsoft Edge
Perform this action every-time g1 release is pushed.1.49S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/131FormHandler add does not show dropdowns while FormHandler edit does2019-01-25T08:13:24ZS AnandFormHandler add does not show dropdowns while FormHandler edit doesRaised by @sindhura.ch
When using a select for specific columns (see code below):
```yaml
columns: [
{ name: '*' },
{
name: 'user_designation',
editable: {
input: 'select',
...Raised by @sindhura.ch
When using a select for specific columns (see code below):
```yaml
columns: [
{ name: '*' },
{
name: 'user_designation',
editable: {
input: 'select',
options: ['ACMO', 'CDO']
}
},
{ name: 'user_password', hide: true },
{ name: 'actions', template: $('#action-template').html() }
]
```
... the dropdown is visible when we click **Edit** but not when we click **Add**. See screenshots below.
![image](/uploads/b7a550001240a215be070f84c5692499/image.png)
![image](/uploads/794eb9caf9244ff28351c9617fa2c8e0/image.png)TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/132g1 $search configurable example documentation2022-11-07T09:16:17ZSundeep Reddy Mallug1 $search configurable example documentationg1 $search documentation released as part of 1.49 only points to fuzzy match feature. This issue calls out the need to extend the search capability by configuration (to accommodate additional logic) and share more examples.g1 $search documentation released as part of 1.49 only points to fuzzy match feature. This issue calls out the need to extend the search capability by configuration (to accommodate additional logic) and share more examples.S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/133g1.formhandler link:false in a column should disable the link,2019-03-15T05:50:41ZTejeshg1.formhandler link:false in a column should disable the link,* Disable all controls* Disable all controlsS AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/134Backlink g1 release notes from Gramex releases2019-02-03T03:58:58ZBhanu Kbhanu.kamapantula@gramener.comBacklink g1 release notes from Gramex releases### Summary
currently `g1` release notes ship with `Gramex` release notes. Example: [v1.47 notes](https://learn.gramener.com/guide/release/1.47/#g1)
in `g1` repository, changes are visible in [CHANGELOG](https://code.gramener.com/cto/g...### Summary
currently `g1` release notes ship with `Gramex` release notes. Example: [v1.47 notes](https://learn.gramener.com/guide/release/1.47/#g1)
in `g1` repository, changes are visible in [CHANGELOG](https://code.gramener.com/cto/g1/blob/master/CHANGELOG.md). This isn't easy to spot.
Perhaps [v1.47 notes](https://learn.gramener.com/guide/release/1.47/#g1) can be linked in a `Releases` section.
### Benefits
Developers, OSS communityhttps://code.gramener.com/cto/g1/-/issues/135CaptureHanlder should support SVG output2019-01-23T04:03:44ZSundeep Reddy MalluCaptureHanlder should support SVG output### Summary
We need CaptureHandler to export HIGH resolution images. Add SVG export capability in CaptureHandler
### Benefits
Visual outputs that are exported from Visual story board are currently of low resolution. Taking print copie...### Summary
We need CaptureHandler to export HIGH resolution images. Add SVG export capability in CaptureHandler
### Benefits
Visual outputs that are exported from Visual story board are currently of low resolution. Taking print copies of these is resulting in images being blurred. We need SVG output format that can allow us to render HIGH resolution images. This allows for easier printing and circulation of Visual Storyboard content.
### Usage
Print outs of Visual properties become much readable and shareable.https://code.gramener.com/cto/g1/-/issues/136G1.capture utility to download png screenshots2019-01-23T06:08:30ZTejeshG1.capture utility to download png screenshotsHTML2Canvas if used as a frontend alternative for capturehandler, benefits by:
* Need not reload complete dashboard to download png of a single chart on dashboard
* faster than puppeteer
* can capture charts at detailed interaction leve...HTML2Canvas if used as a frontend alternative for capturehandler, benefits by:
* Need not reload complete dashboard to download png of a single chart on dashboard
* faster than puppeteer
* can capture charts at detailed interaction levels (without having to capture complete application state in url)
* can use g1.capture in project deployments where gramex capturehandler can't be packaged offline.TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/137G1.types is not available as a separate module2019-01-25T07:41:04ZTejeshG1.types is not available as a separate moduleTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/138Mapviewer Mismatch label is not hiding on "mismatch: false"2019-01-23T12:24:57ZBharat Rbharath.r@gramener.comMapviewer Mismatch label is not hiding on "mismatch: false""mismatch: false", should hide the label on the map
This is not working properly."mismatch: false", should hide the label on the map
This is not working properly.Bharat Rbharath.r@gramener.comBharat Rbharath.r@gramener.comhttps://code.gramener.com/cto/g1/-/issues/139g1.types doesn't detect dates2019-01-24T16:51:32ZPratap Vardhanpratap.vardhan@gramener.comg1.types doesn't detect datesAs per [g1.types docs](https://code.gramener.com/cto/g1/blob/master/docs/types.md#g1types), column `d` should have been `date` but it detected as `string`. Would like to detect below as `date`.
```javascript
var data = [
{a: 1, b: 1.1...As per [g1.types docs](https://code.gramener.com/cto/g1/blob/master/docs/types.md#g1types), column `d` should have been `date` but it detected as `string`. Would like to detect below as `date`.
```javascript
var data = [
{a: 1, b: 1.1, c: 'c', d: '2014-04-04', e: true},
{a: 2, b: 2},
]
g1.types(data)
{a: "number", b: "number", c: "string", d: "string", e: "boolean"}
```
Although, this works with `options = {convert: true}`
```jaavscript
g1.types(data, {convert: true})
{a: "number", b: "number", c: "string", d: "date", e: "boolean"}
```
If this is intended, please update the documentation? S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/140g1.formhandler should clear all filters2019-02-07T03:59:35ZPratap Vardhanpratap.vardhan@gramener.comg1.formhandler should clear all filtersWhen the multiple `?a=1&a=2` query parameters with same keys are passed, `Clear All` filters doesn't remove all filters.When the multiple `?a=1&a=2` query parameters with same keys are passed, `Clear All` filters doesn't remove all filters.1.51TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/141g1.types detects strings ending with space and then number as dates (not stri...2022-11-07T09:16:25ZTejeshg1.types detects strings ending with space and then number as dates (not strings)when you pass strings that end with space and number, when using `{convert: true}`.
```javascript
g1.types([{NAME: "Gramex 1"}], {convert: true})
{NAME: "date"}
```
Issue is with how `Date.parse` behaves.
```
Date.parse('Gramex 1')
978...when you pass strings that end with space and number, when using `{convert: true}`.
```javascript
g1.types([{NAME: "Gramex 1"}], {convert: true})
{NAME: "date"}
```
Issue is with how `Date.parse` behaves.
```
Date.parse('Gramex 1')
978287400000
```
raised by @pratap.vardhanS AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/142g1.formhandler table must show unique items in header dropdown for quick filt...2019-02-27T06:09:46ZTejeshg1.formhandler table must show unique items in header dropdown for quick filtering, like Excel![image](/uploads/27d5c68392f0b1d6c6f2ed40f7a55da5/image.png)
raised by @sindhura.ch for bmgf admin panel
Table only with sort minus filters & dropdowns![image](/uploads/27d5c68392f0b1d6c6f2ed40f7a55da5/image.png)
raised by @sindhura.ch for bmgf admin panel
Table only with sort minus filters & dropdowns1.51TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/143BUG: Save after adding new row does not add data to source2019-01-30T06:58:52ZTejeshBUG: Save after adding new row does not add data to source1.50TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/144Mapviewer automated tests fail on selenium2019-02-04T07:41:20ZS AnandMapviewer automated tests fail on selenium### Summary
### Steps to reproduce
Run `npm run test-chrome` and `npm run test-firefox` after [installing the relevant webdrivers](https://www.seleniumhq.org/download/).
### What is the current *bug* behavior?
Chrome fails. Some of...### Summary
### Steps to reproduce
Run `npm run test-chrome` and `npm run test-firefox` after [installing the relevant webdrivers](https://www.seleniumhq.org/download/).
### What is the current *bug* behavior?
Chrome fails. Some of the errors are:
```
⨯ ok
not ok 569 test/test-mapviewer-data-mismatch.html
⨯ g1.mapviewer test if popup is added to the marker
not ok 603 should be truthy
not ok 604 should be truthy
not ok 605 should be truthy
not ok 606 should be truthy
not ok 607 should be truthy
...
```
Firefox fails. Some of the errors are:
```
⨯ ok
not ok 317 test/test-formhandler-editable.html
⨯ ok
not ok 569 test/test-mapviewer-data-mismatch.html
⨯ $().template() with type=text/vdom animates nodes
not ok 678 x < 95 # This is because Firefox does not support SVG animation via CSS
```TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/145g1.mapviewer.js and g1.min.js are conflicting due to same namespace2019-02-04T11:13:34ZTejeshg1.mapviewer.js and g1.min.js are conflicting due to same namespace1.51TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/146FormHandler table should support search in columns, like in excel2019-02-27T06:09:46ZBhanu Kbhanu.kamapantula@gramener.comFormHandler table should support search in columns, like in excelapart from filtering via unique values (#142) columns in table should support inline searchapart from filtering via unique values (#142) columns in table should support inline search1.51TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/147g1 and mapviewer is not working together since gramex 1.502019-02-15T05:05:09ZMohammed Niyasg1 and mapviewer is not working together since gramex 1.50### Summary
g1 and mapviewer is not working together since gramex version 1.50
### Steps to reproduce
1. Import g1
2. Import mapviewer
3. Try accessing g1 (eg: g1.url.parse(location.href)). This throws error
Otherwise
1. Import mapvi...### Summary
g1 and mapviewer is not working together since gramex version 1.50
### Steps to reproduce
1. Import g1
2. Import mapviewer
3. Try accessing g1 (eg: g1.url.parse(location.href)). This throws error
Otherwise
1. Import mapviewer
2. Import g1
3. Now g1.mapviewer is not callable
### What is the expected *correct* behavior?
Both should work irrespective of import order
If required, @sharabh.singhi Can help to reproduce this.https://code.gramener.com/cto/g1/-/issues/148$.formhandler editable fails for columns which have spaces in name2019-02-15T05:56:30ZTejesh$.formhandler editable fails for columns which have spaces in nameraised by @venkata.reddyraised by @venkata.reddy1.51TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/149$.formhandler table filters are not case-sensitive2019-02-15T05:46:52ZVenkata Krishna Reddy$.formhandler table filters are not case-sensitive![eeeeeg](/uploads/e0d54ba50a0c8f54db43ca4524202006/eeeeeg.gif)![eeeeeg](/uploads/e0d54ba50a0c8f54db43ca4524202006/eeeeeg.gif)https://code.gramener.com/cto/g1/-/issues/150g1.formhandler - pick rows for edits2019-02-12T18:10:57ZTejeshg1.formhandler - pick rows for editscurrently edit mode highlights all rows for editing, this is slow on DOM and will be taxing for users with limited hardware configuration
a) if we add selectpicker class for a select element in edit mode, it takes forever and blocks an...currently edit mode highlights all rows for editing, this is slow on DOM and will be taxing for users with limited hardware configuration
a) if we add selectpicker class for a select element in edit mode, it takes forever and blocks any further browsing as it applies for all rows. ex: we've 4 select elements in a row and 300 odd rows.
raised by @bhanu.k1.52TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/151g1.formhandler unique value filtering - handling more than 100 unique values ...2019-02-19T13:53:12ZTejeshg1.formhandler unique value filtering - handling more than 100 unique values per column- If there are more than limit: values (default: 100), show up to limit items. Mention that "Only first {limit} items shown"- If there are more than limit: values (default: 100), show up to limit items. Mention that "Only first {limit} items shown"https://code.gramener.com/cto/g1/-/issues/152data-target='pushState' not working as expected in g1 0.14.02019-04-23T03:47:52ZNaveen Manukondadata-target='pushState' not working as expected in g1 0.14.0```html
<div class="d-md-flex justify-content-md-between custom-w-1">
<div class="align-self-end">
<ul class="nav h1 mb-0 border-success border border-top-0 border-left-0 border-right-0">
<li class="nav-item ">
<a class=...```html
<div class="d-md-flex justify-content-md-between custom-w-1">
<div class="align-self-end">
<ul class="nav h1 mb-0 border-success border border-top-0 border-left-0 border-right-0">
<li class="nav-item ">
<a class="nav-link active urlfilter sm4 pb-2 text-secondary font-weight-bold pl-0 border-secondary border border-top-0 border-left-0 border-right-0 border-2" href="?view=summary" data-target="pushState">Summary <span class="d-block"> View</span></a>
</li>
<li class="nav-item">
<a class="nav-link sm4 pb-2 text-success font-weight-bold pr-0 urlfilter" href="?view=comparative" data-target="pushState"><span class="comparative-tab">Comparative</span> <span class="d-block"> View</span></a>
</li>
</ul>
</div>
</div>
```
When we click on Comparative View my page is reloading in latest **g1** version(0.14.0), Expected: Page reload must not happen because `data-target="pushState"`
It is working fine in **g1** version(0.13.1)1.54TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/153$.dropdown() not working2019-03-12T06:19:37ZParashar Sangle$.dropdown() not working### Summary
(Summarize the bug encountered concisely)
### Steps to reproduce
$('#usr_names').dropdown({
data: ['lol','rofll']
})
### What is the current *bug* behavior?
Dropdown with no urlfilter in selectpicker
<select clas...### Summary
(Summarize the bug encountered concisely)
### Steps to reproduce
$('#usr_names').dropdown({
data: ['lol','rofll']
})
### What is the current *bug* behavior?
Dropdown with no urlfilter in selectpicker
<select class="selectpicker border " id=""> <option value="lol">lol</option> <option value="rofll">rofll</option> </select>
### What is the expected *correct* behavior?
(What you should see instead)
### Possible fixes
(If you can, link to the line of code thay might be responsible for the problem. Or suggest where you think the problem might be.)https://code.gramener.com/cto/g1/-/issues/154Document FormHandler table issues2019-03-15T05:50:57ZS AnandDocument FormHandler table issues- [x] `link: false` or `link: function () { return false }` in a column should disable the link
- [x] `link: "?col=value"` supports custom filtering. For example, click on `name` column to filter by `?dir=<%- row.path %>`
- [ ] How can w...- [x] `link: false` or `link: function () { return false }` in a column should disable the link
- [x] `link: "?col=value"` supports custom filtering. For example, click on `name` column to filter by `?dir=<%- row.path %>`
- [ ] How can we add classes to specific column headers? (e.g. `text-right` only on numeric classes)
- [ ] How can we open links in a new window? Can we add a link class?
- [ ] How can we use FormHandler table with a JSON dataset (not a FormHandler URL)?
- [ ] How can we create a grid instead of a table?
- [ ] How can we customize just the grid cells?
- [ ] How can we customize just a few columns?
- [ ] How can we create editable tables with dropdown values, and customize their appearance?
- [ ] How can we create editable tables with checkboxes or radio buttons?
- [ ] How can we add custom actions?
- [ ] Show examples of theming (see https://www.smashingmagazine.com/2019/02/complex-web-tables/)https://code.gramener.com/cto/g1/-/issues/155Formhandler - show _count, _limit, _offset also as filters.2019-03-04T03:51:04ZTejeshFormhandler - show _count, _limit, _offset also as filters.On changing pageSize, there is no way to clear the filter. Showing `_limit=` also in filters will help.
Same problem when applied filter `"Europe"`, goto page 2 and clear `"Europe"` filter.....Still shows _offset=1, no way to clear the ...On changing pageSize, there is no way to clear the filter. Showing `_limit=` also in filters will help.
Same problem when applied filter `"Europe"`, goto page 2 and clear `"Europe"` filter.....Still shows _offset=1, no way to clear the filter.
Other solution is to, On click of "clear all filters", remove `_offset=`https://code.gramener.com/cto/g1/-/issues/156BUG: In editable formhandler, select tag doesnt take default values if src da...2019-03-17T02:45:25ZTejeshBUG: In editable formhandler, select tag doesnt take default values if src data contains boolean values1.53TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/157Formhandler Excel export options must enable downloading of entire dataset2019-03-12T05:50:13ZTejeshFormhandler Excel export options must enable downloading of entire datasetraised by @anvesh.dasariraised by @anvesh.dasarihttps://code.gramener.com/cto/g1/-/issues/158url.update should support a `replace` parameter2019-03-28T12:01:01ZKarmanya Aggarwalurl.update should support a `replace` parametercurrently with url.update we can add a key to the hash/query params, or update a key if it already exists. we cannot remove a key if it already exists, unless we explicitly call it with a del parameter, which only deletes.
Thus we shoul...currently with url.update we can add a key to the hash/query params, or update a key if it already exists. we cannot remove a key if it already exists, unless we explicitly call it with a del parameter, which only deletes.
Thus we should have a `replace` parameter which can
- add a key if it currently doesn't exist
- remove a key if it exists in hash/search but not in the update object
- update a key if it exists in both hash/search and update object with different values
```?a=1&b=1.update({b:2}, 'replace') -> ?b=2```
places this would be useful eg - if we have a formhandler url in a vega spec or something similar, and want to update it on hashchange to the new hash, we currently have to hardcode a version of the url in code and update it on hashchange.https://code.gramener.com/cto/g1/-/issues/159FormHandler table parses dates in the wrong time zone2019-03-28T11:53:59ZS AnandFormHandler table parses dates in the wrong time zone- My birthday is on 23 Nov.
- `datetime.datetime(2019, 11, 23).timestamp() == 1574485200`. I get the same timestamp if I save the cell in Excel as a date and read it
- FormHandler parses Excel files with this date and returns `1574485200...- My birthday is on 23 Nov.
- `datetime.datetime(2019, 11, 23).timestamp() == 1574485200`. I get the same timestamp if I save the cell in Excel as a date and read it
- FormHandler parses Excel files with this date and returns `1574485200000`
- `moment(1574485200000).toString() == "Fri Nov 22 2019 19:00:00 GMT-0500"` in New York
- `moment.utc(1574467200000).toString() == "Sat Nov 23 2019 00:00:00 GMT+0000"` in New York and in India
Hence, use moment.utc() instead of moment() when parsing dates from FormHandlerS AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/160Mapviewer: cachedata function fails when data contains nested structure2019-03-31T06:20:50ZTejeshMapviewer: cachedata function fails when data contains nested structure`JSON.stringify, avoid TypeError: Converting circular structure to JSON`
https://stackoverflow.com/questions/11616630/json-stringify-avoid-typeerror-converting-circular-structure-to-json`JSON.stringify, avoid TypeError: Converting circular structure to JSON`
https://stackoverflow.com/questions/11616630/json-stringify-avoid-typeerror-converting-circular-structure-to-jsonTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/161g1.formhandler refactor2019-05-08T02:28:20ZTejeshg1.formhandler refactor1. define hierarchy of hooks, make sure it is consistent
2. Examples & documentation
3. Refactor to develop faster1. define hierarchy of hooks, make sure it is consistent
2. Examples & documentation
3. Refactor to develop fasterTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/162G1.datafilter does not filter undefined values2019-04-20T13:59:22ZTejeshG1.datafilter does not filter undefined values1.55TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/163Column filter is displaying multiple times in header when we hide the filter2019-05-08T02:28:28ZAkash BarlaColumn filter is displaying multiple times in header when we hide the filter![Column_hiding_issue](/uploads/5876b231e885375373c38129a3ed27fe/Column_hiding_issue.gif)![Column_hiding_issue](/uploads/5876b231e885375373c38129a3ed27fe/Column_hiding_issue.gif)TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/164Unable to deselect the selected sorted option2019-05-08T02:28:37ZAkash BarlaUnable to deselect the selected sorted option![sort_deselect](/uploads/a7bd6a42973c618f863c80da2cc68eb5/sort_deselect.gif)![sort_deselect](/uploads/a7bd6a42973c618f863c80da2cc68eb5/sort_deselect.gif)TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/165FormHandler input checkbox option is not working2019-05-02T06:06:28ZJPjaiprakash.siyyadri@gramener.comFormHandler input checkbox option is not workingThe requirement is to edit and show column data, which has yes or no values, as input type checkbox.
If it is yes the option should be checked else uncheckedThe requirement is to edit and show column data, which has yes or no values, as input type checkbox.
If it is yes the option should be checked else uncheckedhttps://code.gramener.com/cto/g1/-/issues/166FormHandler Export downloading2019-05-02T08:10:54ZJPjaiprakash.siyyadri@gramener.comFormHandler Export downloadingThe export option should download the data in the same column order as we are showing in the table with title as column namesThe export option should download the data in the same column order as we are showing in the table with title as column namesTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/167G1.formhandler editable table not working for radio/checkbox type input elements2019-05-09T10:21:26ZJPjaiprakash.siyyadri@gramener.comG1.formhandler editable table not working for radio/checkbox type input elementsPossible solutions:
Wrap all editable input elements inside a `<form>` tagPossible solutions:
Wrap all editable input elements inside a `<form>` tagTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/168urlchange should emit #? event2019-05-28T06:45:34ZS Anandurlchange should emit #? eventCurrently, it emits `#`, `#/` for path changes, and `#?<key>` for specific keys. There's nothing for all-key changes ignoring path changes. It's an intuitive feature that people have assumed exist in the past. Hence it must be added.Currently, it emits `#`, `#/` for path changes, and `#?<key>` for specific keys. There's nothing for all-key changes ignoring path changes. It's an intuitive feature that people have assumed exist in the past. Hence it must be added.S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/169Template should allow access to source node2019-05-28T09:37:21ZS AnandTemplate should allow access to source nodeTemplates should support additional variables:
- `$this` accesses the jQuery template variable
- `$data` is a shortcut for `$this.data()`Templates should support additional variables:
- `$this` accesses the jQuery template variable
- `$data` is a shortcut for `$this.data()`1.56S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/170Async sub-templates fail sometimes2019-06-04T04:23:11ZS AnandAsync sub-templates fail sometimes@tejesh.p please see https://code.gramener.com/cto/g1/-/jobs/115982
The test case related to "$().template() loaded static async sub templates" fails -- though it passes sometimes (on the server).
Maybe because we're checking before th...@tejesh.p please see https://code.gramener.com/cto/g1/-/jobs/115982
The test case related to "$().template() loaded static async sub templates" fails -- though it passes sometimes (on the server).
Maybe because we're checking before the sub-template has loaded? Could you please explore the test case?TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/171G1.mapviewer doesn't have an option to reverse the order of colorscheme2019-07-31T21:17:10ZPranav vadrevuG1.mapviewer doesn't have an option to reverse the order of colorscheme![image](/uploads/c2a46b4b895d74698ea2b56ac88a025b/image.png)
Cannot configure colorscheme to show red for higher values and green for lower values in g1 mapviewer for the scheme RdYlGn.![image](/uploads/c2a46b4b895d74698ea2b56ac88a025b/image.png)
Cannot configure colorscheme to show red for higher values and green for lower values in g1 mapviewer for the scheme RdYlGn.https://code.gramener.com/cto/g1/-/issues/172G1.mapviewer does not support Ordinal scales correctly2019-07-31T21:17:11ZTejeshG1.mapviewer does not support Ordinal scales correctly`domain` gets calculated from
```js
MapViewer.prototype._calculateMinMax = function (layer, metricFormula) {
var minVal, maxVal
layer.eachLayer(function (sublayer) {
var metricVal = metricFormula(sublayer.feature.properties)
...`domain` gets calculated from
```js
MapViewer.prototype._calculateMinMax = function (layer, metricFormula) {
var minVal, maxVal
layer.eachLayer(function (sublayer) {
var metricVal = metricFormula(sublayer.feature.properties)
if (!metricVal) return
if (!(maxVal && minVal)) maxVal = metricVal, minVal = metricVal
if (metricVal < minVal) {
minVal = metricVal
}
if (metricVal > maxVal) {
maxVal = metricVal
}
})
return [minVal, maxVal]
}
```
This would return `[undefined, undefined]` incase the `metric` provided in the mapviewer options is Qualitative data.
Implications:
Even if `domain` is provided as array of unique categoricals and `range` as array of colors, the first color in range are already mapped to `undefined` value in domain. So, the domain mapping gets shifted by one place.
Possible Solutions:
Create a domain calculator module in G1, that can take a `accessor` as parameter. Such that the input can be array of objects (collections), or an array itself. In mapviewer case, the input is an array of `sublayer.feature.properties`.
This `g1.domain` will be reused in `g1.scales` module.
**Note for Tejesh**:
For discrete type scales (ordinal/band/point), if `domain` option is not provided and `metric` (Tejesh to make this as mandatory option) is provided, domain gets calculated internally irrespective of type of input data metric. If domain is provided but the provided domain does not span entire possible input values, discrete range values must be rotated after mapping provided domain values to discrete range.TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/173Move g1.formhandler table , g1.mapviewer modules into separate repos2019-06-26T01:52:32ZTejeshMove g1.formhandler table , g1.mapviewer modules into separate reposWe want to break up g1 into independent repositories. This will popularize g1 components because:
- People prefer libraries with a single purpose
- They are more likely to use it (and contribute back) since the learning curve is less
A...We want to break up g1 into independent repositories. This will popularize g1 components because:
- People prefer libraries with a single purpose
- They are more likely to use it (and contribute back) since the learning curve is less
Approach:
- `mapviewer`: mapviewer.js, leaflet-utils.js
- `urlfilter`: url.js, urlfilter.js, urlchange.js, ajaxchain.js
- `some template library`: template.js
- `sanddance`: sanddance.js
- `g1`: Gramex specific components:
- datafilter.js
- formhandler.js
- translate.js
- ... and other components which we may re-package later
- dropdown.js
- scale.js
- types.js
- highlight.js
- search.js
- fuzzysearch.js
- TODO: Find out how to handle dependencies, e.g. event.js.
Note: g1 will continue to import these libraries and function as before -- fully backward compatible.
### Approach for mapviewer
- Create a repo: github.com/gramener/mapviewer
- Create an npm package called [mapviewer](https://www.npmjs.com/package/mapviewer) via this repo. This should export an ES6 module (src/mapviewer.js) and UMD module (dist/mapviewer.js) via package.json
- Migrate test cases
- Refactor g1 to use import the mapviewer package as an ES6 module
https://code.gramener.com/cto/g1/-/issues/174g1.formhandler editable table to support multi-select in dropdowns2019-07-31T08:51:03ZTejeshg1.formhandler editable table to support multi-select in dropdownsExpose option for more low level spec to support various third-party dropdown components.Expose option for more low level spec to support various third-party dropdown components.https://code.gramener.com/cto/g1/-/issues/175FormHandler filters are not working with multiple tables in a single page2020-02-04T07:11:19ZBharat Rbharath.r@gramener.comFormHandler filters are not working with multiple tables in a single page**FormHandler filters are not working with multiple tables in a single page**
- When applying filters to one table it is applying to all tables by default
- And namespaces are applying only when the namespace is coming from the URL
**S...**FormHandler filters are not working with multiple tables in a single page**
- When applying filters to one table it is applying to all tables by default
- And namespaces are applying only when the namespace is coming from the URL
**Suggested FIX:**
- When a `namespace` is given to table any filter in the url should apply along with the `namespace`
For Ex.
```
$('.fh_table').formHandler({
namespace: 'name'
})
```
The url for the filters of the above snippet should be `?name:key=value`Bharat Rbharath.r@gramener.comBharat Rbharath.r@gramener.comhttps://code.gramener.com/cto/g1/-/issues/176add a new row with empty data for g1.formhandler2019-12-05T11:15:48ZPratap Vardhanpratap.vardhan@gramener.comadd a new row with empty data for g1.formhandler### Summary
We can't add a new row with empty data for g1.formhandler
### Steps to reproduce
- Create a csv with columns alone and hook it up with formhandler### Summary
We can't add a new row with empty data for g1.formhandler
### Steps to reproduce
- Create a csv with columns alone and hook it up with formhandler