g1 issueshttps://code.gramener.com/cto/g1/-/issues2022-11-07T09:16:25Zhttps://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/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/84Page refresh on selecting number of rows in FormHandler table2022-11-07T09:16:11ZNaveen ManukondaPage refresh on selecting number of rows in FormHandler table- When we select from new value from row dropdown page is completely refreshing.![image](/uploads/833eca55cc0ec8c1f333fab34cad79d1/image.png)
- Currently if we make size false we are showing all rows without pagination. We want to show p...- When we select from new value from row dropdown page is completely refreshing.![image](/uploads/833eca55cc0ec8c1f333fab34cad79d1/image.png)
- Currently if we make size false we are showing all rows without pagination. We want to show pagination with minimum size of 10 and hide rows dropdown.S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/77formhandler: Add .disable class to .count2022-11-07T09:16:05ZPratap Vardhanpratap.vardhan@gramener.comformhandler: Add .disable class to .countBy default total row `.count` adds a `span.btn` with `cursor: pointer`. Adding `.disable` class removes it.
There is no click behavior needed for that I suppose?By default total row `.count` adds a `span.btn` with `cursor: pointer`. Adding `.disable` class removes it.
There is no click behavior needed for that I suppose?S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/74Disable editing of primary key fields in formhandler table2022-11-07T09:15:59ZTejeshDisable editing of primary key fields in formhandler tableS AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/71formhandler should support groupby2022-11-07T09:15:53ZPratap Vardhanpratap.vardhan@gramener.comformhandler should support groupby### Summary
Gramex FormHandler now supports `_by`. See gramex#401
For GET requests, `?_by=State&_by=City` does the following:
- Group by State and City (in that order)
- Show sum of all numeric columns
- Show count of all non-numeric ...### Summary
Gramex FormHandler now supports `_by`. See gramex#401
For GET requests, `?_by=State&_by=City` does the following:
- Group by State and City (in that order)
- Show sum of all numeric columns
- Show count of all non-numeric columns (including date columns)
We need following options in formhandler table
- In column dropdowns to select that column has groupby key.
- Ability to hide certain aggregate columns
- Change aggregation type of the column
- Placeholder alongside pagination to list down dimensions and metrics.
### Benefits
This will allow users to create self-service explorations with formhandler interface.S AnandS Anandhttps://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/34Create sanddance component - bar chart2022-11-07T09:15:39ZSundeep Reddy MalluCreate sanddance component - bar chartS AnandS Anandhttps://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/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/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/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/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/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/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/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/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/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/85FormHandler table should support client-side validation2019-02-27T06:35:44ZS AnandFormHandler table should support client-side validationRaised by @sarad.gurram and @bhanu.k - "Client-side HTML input validation while editing"Raised by @sarad.gurram and @bhanu.k - "Client-side HTML input validation while editing"1.52S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/75formhandler: should support multiple sort2019-02-25T12:57:25ZPratap Vardhanpratap.vardhan@gramener.comformhandler: should support multiple sort### Summary
Currently, from the interface, user can select only column to sort on. However Gramex FormHandler supports multiple column sort by Column order.
For example, this https://learn.gramener.com/guide/formhandler/table.html#?_so...### Summary
Currently, from the interface, user can select only column to sort on. However Gramex FormHandler supports multiple column sort by Column order.
For example, this https://learn.gramener.com/guide/formhandler/table.html#?_sort=Continent&_sort=Name
- Would show two column sort on Name, Continent
- although it doesn't highlight the columns.
- If you try to add or modify existing sort. It get's replaced by single sort.
We would need a way to support muli-column sort, if we also want to support toggle between columns for single sort.1.52Pratap Vardhanpratap.vardhan@gramener.comPratap Vardhanpratap.vardhan@gramener.com