g1 issueshttps://code.gramener.com/cto/g1/-/issues2018-04-16T09:21:07Zhttps://code.gramener.com/cto/g1/-/issues/36SVG support in FormHandler2018-04-16T09:21:07ZBhanu Kbhanu.kamapantula@gramener.comSVG support in FormHandler### Summary
`FormHandler` table currently does not support SVG rendering along with column data. Projects often have SVG elements (circles, rectangles, sparklines etc.) within tables.
### Benefits
With this feature, data-based SVG ele...### Summary
`FormHandler` table currently does not support SVG rendering along with column data. Projects often have SVG elements (circles, rectangles, sparklines etc.) within tables.
### Benefits
With this feature, data-based SVG elements can be rendered via `FormHandler` table. This should reduce dependency on custom code for chart placement in tables.
### Usage
TejeshTejesh2018-04-16https://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/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/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/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/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/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/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/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/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/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 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/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)TejeshTejesh