Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track in provenance graph thegroupingChanged LineUp event #385

Merged
merged 7 commits into from
Jul 1, 2020

Conversation

oltionchampari
Copy link
Contributor

@oltionchampari oltionchampari commented Jun 26, 2020

Closes #379

Summary

  • Added a new cmd Set Property grouping.
  • The StringColumn's groupBy value can be a RegExp so it was necessary to serialize and deserialize the value similar to the RegExp filter value.
  • Tested the StringColumn and NumberColumn implementation. Unfortunately i could not find a DateColumn to test the functionality. @thinkh Could you maybe test this somehow?

The events StringColumn.EVENT_GROUPING_CHANGED and Ranking.EVENT_GROUP_CRITERIA_CHANGED,
never intersect apart from when the groupBy dialog is set for the first time.

Screenshot

grafik

@oltionchampari oltionchampari added type: feature New feature or request release: minor PR merge results in a new minor version labels Jun 26, 2020
@oltionchampari oltionchampari requested a review from thinkh June 26, 2020 12:47
thinkh added 4 commits June 30, 2020 17:48
Previously the event listener was added to event + `Changed.track`
but removed from event + `Changed.filter`. This commit corrects and
unifies the event name.
Copy link
Member

@thinkh thinkh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some unit tests for the util functions.

* The return value of this function can be passed to `JSON.stringify()` and stored in the provenance graph.
* @param groupBy Value returned from the `Group By` dialog
*/
export function serializeGroupByValue(groupBy: IStringGroupCriteria) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add some unit tests for this function?

* Restores LineUp StringColumn's Group By` dialog's values from the provenance graph and returns an `IStringGroupCriteria`.
* @param groupBy Value as saved in the provenance graph.
*/
export function restoreGroupByValue(groupBy: ISerializedStringGroupCriteria) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add some unit tests for this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thinkh I added test for the serialize and restore functions. You can take a look again when you have time.

@oltionchampari oltionchampari requested a review from thinkh July 1, 2020 07:39
…ng_column_group_by_cmd_bug

# Conflicts:
#	src/lineup/internal/cmds.ts
Copy link
Member

@thinkh thinkh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oltionchampari Thanks for the additional unit tests! Now it looks good. 👍

@thinkh thinkh merged commit 81016fe into develop Jul 1, 2020
@thinkh thinkh deleted the ochampari/379_string_column_group_by_cmd_bug branch July 1, 2020 16:23
@thinkh thinkh mentioned this pull request Jul 30, 2020
48 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: minor PR merge results in a new minor version type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants