g1 issueshttps://code.gramener.com/cto/g1/-/issues2019-02-07T03:59:08Zhttps://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/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/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/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/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.comhttps://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/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/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/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/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/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/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/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/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/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/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 Anand