Result Option: Group By - LSP Integration
- Dominant language
- TypeScript
- Stars
- 117
- Forks
- 51
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 4
Description
EPIC Description
NOTE: This issue will track the implementation of the Group By capabilities from the perspective of the integration of the UI elements with the LSP. This issue is responsible for handling the functionality that needs to occur when a user applies the group by fields to the result options and the query contents need to be edited by the LSP to contain the group by statement.
The associated UI element task is: https://github.com/influxdata/ui/issues/5761
The original data explorer allows for the selection of "Group" in addition to "Filter". This allows you as a user to, while composing a query, to choose both your filter set and the grouping that you would like.
In the new script editor & schema browser, we are currently only allowing filtering. But for some customers, being able to set this grouping is very important. While the user could set the grouping in the flux script itself, we want to provide a helper to them to be able to do it from the UI, like they had in the old DE.
This EPIC is for creating this group-by functionality in the new script editor.
General Acceptance Criteria
An option will be available (like a grouping icon or something) that the user can select after choosing a bucket and measurement (it will not be available before that)
Once selected, the user will be able to choose from a list of columns; this will essentially be the same functionality as found in DE grouping option (see attached screenshot)
The default grouping will be shown to the user (boxes checked)
User can unselect and select column values
A group function will get added to the composition block when selections are made that are not the default
Columns will be added to the group function in the order they were selected (as with old DE)
Analytic UI Events will be sent when then user does the following operations:
Clicks on any of the 3 grouping options (separate event for each)
Clicks on any of the group checkboxes
Design
https://www.figma.com/file/0qAntPk5LVangAHguWT74X/Query-Experience-Project?node-id=2190%3A97800
Notes
In the future, we may allow the user to re-order the columns they have chosen (up or down) instead of relying on the order in which they select them, but for initial implementation - we only need to match what is in the current DE
It is not expected that this feature will be available with flux sync turned off; users will need to manually add the group function in this case
This may be simple enough to convert from EPIC to individual story, but starting as an EPIC until determined otherwise
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.