g1 issueshttps://code.gramener.com/cto/g1/-/issues2022-11-07T09:15:47Zhttps://code.gramener.com/cto/g1/-/issues/69Allow custom classes on FormHandler table2022-11-07T09:15:47ZS AnandAllow custom classes on FormHandler tableAdding styles to FormHandler template components (table, count, page, size, export, filters, search, dropdown, ...) would be easier if we had a class element that we could add to each.
For example,
- [ ] `columns[..].classes`: add the ...Adding styles to FormHandler template components (table, count, page, size, export, filters, search, dropdown, ...) would be easier if we had a class element that we could add to each.
For example,
- [ ] `columns[..].classes`: add the classes to the specified column's `<td>`
- [ ] `tableClasses`: adds the classes mentioned to each table. Defaults to `"table table-sm table-striped"`
- [ ] `rowClass`: adds the classes to each row. Defaults to `""`S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/68[Mapviewer] Feature request - Map options are not working2018-07-09T12:00:34ZAnvesh Dasari[Mapviewer] Feature request - Map options are not workingBellow option parameters are not working.
```map: { options: { attributionControl: false, zoomControl: false, zoomSnap: 0.1, doubleClickZoom: false } }, ```Bellow option parameters are not working.
```map: { options: { attributionControl: false, zoomControl: false, zoomSnap: 0.1, doubleClickZoom: false } }, ```https://code.gramener.com/cto/g1/-/issues/67[Mapviewer] Feature request - timeline slider2019-02-02T15:52:14ZBhanu Kbhanu.kamapantula@gramener.com[Mapviewer] Feature request - timeline slider### Summary
Represent time varying geo-data on map. User can control the time unit (year/month/seconds etc.) via a slider control.
### Benefits
[Design reference](https://gramener.invisionapp.com/d/main#/console/13330074/304743583/pre...### Summary
Represent time varying geo-data on map. User can control the time unit (year/month/seconds etc.) via a slider control.
### Benefits
[Design reference](https://gramener.invisionapp.com/d/main#/console/13330074/304743583/preview)
![gender-map](/uploads/5266b849d642d86ab45835788dfdd3af/gender-map.png)
Time component is represented here as a dropdown option. We can consider integrating the below [[reference](https://openlab.citytech.cuny.edu/ganguli-math1372-fall2014/files/2014/11/gapminder.jpg)]
![timeliner](/uploads/202fadb41212a088254bf74bf012ed31/timeliner.png)
with options for
- auto-play
- user-control for slider. i.e., click, change the time unit which updates the map colors
- positioning: horizontal or vertical, optional
Project relevance: Gender project, BMGF. This will be rolled out in 3 phases. Development will begin this week.Bharat Rbharath.r@gramener.comBharat Rbharath.r@gramener.comhttps://code.gramener.com/cto/g1/-/issues/66g1.datafilter() doesnot filter values with `number` types2018-06-30T10:23:24ZTejeshg1.datafilter() doesnot filter values with `number` typesurl args has `?col=35` . Currently, the filtering is done on `"35"`
Possible Fixes:
needs to be typecasted based on `col` type (identified by g1.types)url args has `?col=35` . Currently, the filtering is done on `"35"`
Possible Fixes:
needs to be typecasted based on `col` type (identified by g1.types)1.38TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/65Scales.js: Is it possible to have discrete colour schemes, eg SchemeBlues[k] ...2019-07-31T21:17:10ZKarmanya AggarwalScales.js: Is it possible to have discrete colour schemes, eg SchemeBlues[k] for mapviewer```js
attrs: {
fillColor: { // Fill the regions
metric: 'loan_amount', // with the "score" column from state_score.json
range: 'RdYlGn', // using a RdYlGn gradient...```js
attrs: {
fillColor: { // Fill the regions
metric: 'loan_amount', // with the "score" column from state_score.json
range: 'RdYlGn', // using a RdYlGn gradient
scheme: 'schemeBlues',
scale: 'ordinal'
}}
```
Did not work, as line 58 of scale.js ``` result = d3['scale' + scale](d3[color]).domain(domain)``` doesn't let me use array notation.https://code.gramener.com/cto/g1/-/issues/64[Mapviewer] Feature request - Color scale Linear is not working2018-06-20T11:12:14ZAnvesh Dasari[Mapviewer] Feature request - Color scale Linear is not workingEX:
```javascript
fill: {
metric: 'age', // same as function(d) { return d.age }
scale: 'linear',
domain: [0, 50, 100],
range: ['red', 'yellow', 'green'],
}
```
Getting default color(black) on the map.EX:
```javascript
fill: {
metric: 'age', // same as function(d) { return d.age }
scale: 'linear',
domain: [0, 50, 100],
range: ['red', 'yellow', 'green'],
}
```
Getting default color(black) on the map.https://code.gramener.com/cto/g1/-/issues/63[Mapviewer] Feature request - Default Color code is not working2018-07-09T12:01:37ZAnvesh Dasari[Mapviewer] Feature request - Default Color code is not working![image](/uploads/a022c3fcec5827bf3df8386e542dbad1/image.png)
Default color code is not working.
Ex:
```javascript
options: {
style: {
fillOpacity: 1,
color: "wheat",
weight: 1,
fillColor: "#fff...![image](/uploads/a022c3fcec5827bf3df8386e542dbad1/image.png)
Default color code is not working.
Ex:
```javascript
options: {
style: {
fillOpacity: 1,
color: "wheat",
weight: 1,
fillColor: "#fff"
}},
attrs: {
fillColor: {
// Fill the regions
metric: "speed", // with the "speedd" column from data
range: "RdYlGn"
},
```TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/62FormHandler table code review2018-08-28T08:14:53ZS AnandFormHandler table code review- Code corrections
- [x] Do not use encodeURIComponent to escape selectors. Use quotes instead. Remove quotes if they exist in the name
- [x] Do we need to check for `if (dirty_td.length > 0) {`
- [x] `options.edit.editFunction()` ...- Code corrections
- [x] Do not use encodeURIComponent to escape selectors. Use quotes instead. Remove quotes if they exist in the name
- [x] Do we need to check for `if (dirty_td.length > 0) {`
- [x] `options.edit.editFunction()` should probably be `options.edit.editFunction` -- and should probably be `edit.function`. Also call editFunction on `.done()` if it is defined. Not via `complete:`. Always use promises
- [x] `if (options[name] == 'grid') name = 'table_grid'` is duplicated
- [x] Rename `compile_template()` to `render_template()` and document it
- Documentation
- [x] Add row needs documentation
- [x] Actions are poorly explained
- [x] Add example of how to use icon function
- Usability
- [ ] If the server responds with a Bad Request, show the actual error message
- [x] When using keyboard navigation, changed inputs are not detected as dirty
- [x] Loading indicator is not visible
- [ ] Simulate server / network failure and test. If data is lost, user should be aware
- [x] After adding a row and saving, the row should remain where it was added (i.e. at the top of the table)
- [x] All functions must accept a single object with these names (unless it's impossible.)
- `data`: the dataset from `src`
- `row`: row data - dict of {name: value}
- `index`: row index
- `name`: column name
- `value`: cell data value
- `link`: cell link value
- `format`: formatted cell display value
- [x] How can a developer add a delete button simply?
- Feature enhancements
- [x] Icon URLs are static. They must be based on the row data -- as a string template or function1.40TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/60mapviewer issues2018-07-20T04:21:37ZTejeshmapviewer issuesscale: option is ignored now. (Linear scales)
zoom: is not disabled
attribution: is not disabled
scale: option is ignored now. (Linear scales)
zoom: is not disabled
attribution: is not disabled
TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/59[Mapviewer] Feature request - After the zoom text should be visible2018-08-13T09:19:08ZAnvesh Dasari[Mapviewer] Feature request - After the zoom text should be visible![image](/uploads/d521bfe1d616ed18beaadc0467354ae2/image.png)
When we do the zoom on the map text should be visible.![image](/uploads/d521bfe1d616ed18beaadc0467354ae2/image.png)
When we do the zoom on the map text should be visible.1.40TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/54[Mapviewer] Feature request - Filter regions based on click events2018-08-13T09:22:53ZAnvesh Dasari[Mapviewer] Feature request - Filter regions based on click eventsUttar Pradesh map
![uttar-pradesh](/uploads/006272c52a62c3d8e6ce533bde1bf55c/uttar-pradesh.PNG)
On clicking a region, highlight the clicked region
![uttar-pradesh-filtered](/uploads/78389e3367a7ada13055df1ffd2f87bb/uttar-pradesh-filte...Uttar Pradesh map
![uttar-pradesh](/uploads/006272c52a62c3d8e6ce533bde1bf55c/uttar-pradesh.PNG)
On clicking a region, highlight the clicked region
![uttar-pradesh-filtered](/uploads/78389e3367a7ada13055df1ffd2f87bb/uttar-pradesh-filtered.PNG)1.40TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/52Unable to edit g1 FormHandler2018-06-01T13:49:44ZHari deepuUnable to edit g1 FormHandler### Summary
Values edited in FormHandler table aren't updated in database.
### Steps to Reproduce
- Edit a value in FormHandler Table
- Save the updated values, it works fine
- Reload the page, old values are displayed
gramex.yaml en...### Summary
Values edited in FormHandler table aren't updated in database.
### Steps to Reproduce
- Edit a value in FormHandler Table
- Save the updated values, it works fine
- Reload the page, old values are displayed
gramex.yaml end point:
```yaml
pmrssm-form-available-state-info:
pattern: /$YAMLURL/table_available_states_info
handler: FormHandler
kwargs:
url: 'mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST/pmrssm_forms_db'
query: select * from available_states_info;# DB Query
table: available_states_info
id: [state_code, district_code, mobile_number]
```
javascript
```javascript
<script>
$(window).on('load', function () {
$('.formhandler').formhandler({
columns:[{name: '*'},{editable: true}],
edit: true,
table: true
})
});
</script>
```
1.37TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/51mapviewer fails on valid TopoJSON2018-06-04T03:50:05ZS Anandmapviewer fails on valid TopoJSONRun this code:
```
<div id="topojson-map" style="height:300px">
<script>
var map = g1.mapviewer({
id: 'topojson-map',
layers: {
worldMap: { type: 'tile', url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.pn...Run this code:
```
<div id="topojson-map" style="height:300px">
<script>
var map = g1.mapviewer({
id: 'topojson-map',
layers: {
worldMap: { type: 'tile', url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' },
usopojson: {
type: 'topojson',
url: 'us-10m.v1.json',
}
}
})
</script>
```
... with [us-10m.v1.json](https://github.com/d3/d3.github.com/blob/master/us-10m.v1.json)
This raises the following error:
![image](/uploads/49e4f787df9a494f48fa09d34f12b5d1/image.png)TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/48Drill down feature in MapViewer2018-06-07T03:40:13ZSundeep Reddy MalluDrill down feature in MapViewer### Summary
Ability to show more granularity maps on clicking on geojson layers.
### Usage
```js
drilldown: {
rootLayer: 'indiaGeojson',
drilldown_levels: ['STATE_N', 'DISTRICT', 'VILL'],
nextLayer: fun...### Summary
Ability to show more granularity maps on clicking on geojson layers.
### Usage
```js
drilldown: {
rootLayer: 'indiaGeojson',
drilldown_levels: ['STATE_N', 'DISTRICT', 'VILL'],
nextLayer: function(name) {
return {
layerName: name + '_layer',
layerOptions: {
url: name + '.geojson',
type: 'geojson',
attrs: {
fillColor: {
metric: 'TOT_P',
range: 'RdYlGn'
}
}
}
}
}
}
```
### Examples
(Add code samples of usage, with expected output)1.37TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/47Documentation tweaks2018-06-06T09:59:00ZTejeshDocumentation tweaks* [ ] improve documentation for highlighter
* [x] reorder urlfilter documentation. Now, formhandler and sanddance docs are in between* [ ] improve documentation for highlighter
* [x] reorder urlfilter documentation. Now, formhandler and sanddance docs are in betweenhttps://code.gramener.com/cto/g1/-/issues/46Add eslint check to npm run test2018-06-06T10:00:41ZPratap Vardhanpratap.vardhan@gramener.comAdd eslint check to npm run testCurrently, CI build runs `npm run test`, which doesn't include `eslint` check.
One approach would be -- in `package.json`, add `npm run lint` to `pretest`?
```json
{ ....,
"scripts": {
"lint": "eslint index.js src",
...
...Currently, CI build runs `npm run test`, which doesn't include `eslint` check.
One approach would be -- in `package.json`, add `npm run lint` to `pretest`?
```json
{ ....,
"scripts": {
"lint": "eslint index.js src",
...
"pretest": "npm run lint && npm run build && browserify -s tape -r tape -o test/tape.js",
},
...
}
```https://code.gramener.com/cto/g1/-/issues/44add hide column feature to formhandler table - doesnot render the column in t...2018-05-24T16:16:25ZTejeshadd hide column feature to formhandler table - doesnot render the column in the first pain itself### Summary
Currently, to not display a column in formhandler table, developers have to not mention it in `columns`. But when `*` is given as a name, it displays all columns. No way developer could not render specific columns.
### Bene...### Summary
Currently, to not display a column in formhandler table, developers have to not mention it in `columns`. But when `*` is given as a name, it displays all columns. No way developer could not render specific columns.
### Benefits
Admin module requires this.
### Usage
```js
$('.hide_col')
.formhandler({
columns: [
{ name: '*'},
{
name: 'Continent',
hide: true
}
]
})
```1.34TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/42formhandler table cell link is not urlencoded2019-03-01T04:00:22ZTejeshformhandler table cell link is not urlencoded### Summary
formhandler table cell link is not urlencoded
### Steps to reproduce
g1 version 0.6.0
visit https://uat.gramener.com/fdd/#?SEGMENT=M%26M and click on Segment column value `M&M`. Filtering fails because `&` in `M&M` is not...### Summary
formhandler table cell link is not urlencoded
### Steps to reproduce
g1 version 0.6.0
visit https://uat.gramener.com/fdd/#?SEGMENT=M%26M and click on Segment column value `M&M`. Filtering fails because `&` in `M&M` is not urlencoded
### Possible fixes
Need to add a test case and verify the issue. Expected behavior of current code is urlencoded string but that's not the case.1.51S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/41Merge basic mapviewer2018-05-29T03:01:33ZS AnandMerge basic mapviewer- [x] circleMarker zooms to bounds. marker should do the same
- [x] Tooltip titles for marker and circleMarker to be implemented
- [x] Use g1.scale
- [ ] `attr: {color: 'red'}` should be moved to `options: {color: 'red'}`
- [x] Rename `a...- [x] circleMarker zooms to bounds. marker should do the same
- [x] Tooltip titles for marker and circleMarker to be implemented
- [x] Use g1.scale
- [ ] `attr: {color: 'red'}` should be moved to `options: {color: 'red'}`
- [x] Rename `attr:` to `attrs:`
- [x] Add tooltips to show one or more columns1.36TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/40Allow urlfilter to work with dropdown select and options2018-08-07T10:02:12ZTejeshAllow urlfilter to work with dropdown select and optionsPragnya Reddypragnya.reddy@gramener.comPragnya Reddypragnya.reddy@gramener.com