g1 issueshttps://code.gramener.com/cto/g1/-/issues2018-11-24T09:00:01Zhttps://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/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/80g1 datafilter to support PUT, POST, DELETE like requests2018-07-16T10:57:12ZTejeshg1 datafilter to support PUT, POST, DELETE like requestsThe user must be able to download the modified dataset to any exportable format like Excel, Json, HTML etc.,
Mayebe a non-priority issue
Benefits:
* [ ] https://frappe.io/datatable has an inline data editor.
* [ ] If g1 formhandler...The user must be able to download the modified dataset to any exportable format like Excel, Json, HTML etc.,
Mayebe a non-priority issue
Benefits:
* [ ] https://frappe.io/datatable has an inline data editor.
* [ ] If g1 formhandler table has #72 implemented, this gives capability to answer "What if" questions through a visualisation
* [ ] Tejesh can write tests for `Add:`, `Edit:` features. (using node server itself, without gramex server)https://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/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/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/72formhandler: view option for charts2018-07-16T11:25:09ZPratap Vardhanpratap.vardhan@gramener.comformhandler: view option for charts### Summary
With _by option #71 added.
User will have flexibility to construct large number of usecases from formhandler interface. Currently, table view is the default.
It would be useful to have view dropdown on options to select ...### Summary
With _by option #71 added.
User will have flexibility to construct large number of usecases from formhandler interface. Currently, table view is the default.
It would be useful to have view dropdown on options to select chart type.
- After selecting a chart, ex scatterplot, chart options like x, y, size, color, will be automatically selected from dimensions and metrics in naive order.
- User can modify chart options from a modal popup, to select x, y etc.
- url parameters preserve chart options
- For now, charts with minimal/flat options will be supported
- End URL should be shareable/embeddablehttps://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/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/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/93FormHandler table: test cases for enhancements2018-10-04T12:17:44ZS AnandFormHandler table: test cases for enhancementsAdd test cases and documentation for the following features
- [x] Clicking on Add / Edit focuses on the first inpput
- [x] Pressing Enter when editing / adding saves the document
- [x] Custom action receive a `.notify(message)` that the...Add test cases and documentation for the following features
- [x] Clicking on Add / Edit focuses on the first inpput
- [x] Pressing Enter when editing / adding saves the document
- [x] Custom action receive a `.notify(message)` that they can use to send a notification
- [x] Custom actions can return a jQuery deferred (e.g. `return $.ajax(...)`). In that case, it shows a loading indicator, and after the deferred is complete (i.e. `.always()`), the loading indicator is removed1.43TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/92FormHandler Table: master issue2019-04-09T05:59:51ZS AnandFormHandler Table: master issueThese were tested on g1 0.9.0 using this configuration:
```yaml
url:
formhandler:
pattern: /users
handler: FormHandler
kwargs:
url: users.xlsx
id: user
```
- [x] If a table has few rows, allow column dropdown ...These were tested on g1 0.9.0 using this configuration:
```yaml
url:
formhandler:
pattern: /users
handler: FormHandler
kwargs:
url: users.xlsx
id: user
```
- [x] If a table has few rows, allow column dropdown to go below page. Currently it gets chopped off
![image](/uploads/a9c8da00eddf7429dd6404a06a9f3dfa/image.png)
- [x] After delete action, the row is not deleted in the UI, but it is deleted in the backend. Reloading the page refreshes and shows that the row has been deleted.
- [x] In case of an error on the AJAX submission (e.g. a delete action, add action, etc), there error message clears the table. Instead, the error message should be shown above the table. Ideally, this should be a re-usable function. Other custom actions should be able to just call `.alert(msg)` and re-use the same alerting mechanism
- [ ] If $.formhandler does not find jQuery, Bootstrap, etc, show a visible one-time dismissable warning that can be turned off by default
- [ ] Allow exporting as JSON, CSV (in addition to XLSX). This helps users right-click and copy-paste the URL into applications.
![proxy](/uploads/aac9f1f4976f067762a149e85cd698e2/proxy.gif)
- [ ] Deleting an empty primary key in Excel deletes all rows.
![proxy](/uploads/df82ed66aa08ff1b23334fbe1cab5711/proxy.gif)
- [ ] If all rows in table are deleted, we cannot add rows. Maybe because it loses information on what columns exist.
![proxy](/uploads/141c8140da4fbafc742edd03aa491ef5/proxy.gif)
- [ ] Make Add and Edit easier. On Add / Edit:
- [x] move focus to first input `$('input', ...).focus()`. I want to directly start typing
- [ ] give me a cancel option in red `.btn-danger`
- [x] make the Save button green `.btn-success`
- [x] don't allow both add and edit to happen at the same time
- [x] allow shortcut (Enter) to save
- [ ] TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/94FormHandler table: column dropdown2018-11-14T11:40:43ZS AnandFormHandler table: column dropdownAllow columns to contain a `<select>` instead of `<input>` to constrain values based on a pre-defined or data-driven listAllow columns to contain a `<select>` instead of `<input>` to constrain values based on a pre-defined or data-driven listhttps://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/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/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/57formhandler table modal doesnot appear sometimes (needs page refresh to make ...2018-07-16T11:28:23ZTejeshformhandler table modal doesnot appear sometimes (needs page refresh to make it work)TejeshTejeshhttps://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/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/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 Anand