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

Explore: Add feature tracking events #54514

Merged
merged 20 commits into from Sep 20, 2022
Merged

Conversation

L-M-K-B
Copy link
Contributor

@L-M-K-B L-M-K-B commented Aug 31, 2022

Fixes #54082

  • tracking events in QueryEditorRow.tsx: tracking is only available for the component in Explore, other use cases were excluded

@L-M-K-B L-M-K-B added this to the 9.1.3 milestone Aug 31, 2022
@grafanabot
Copy link
Contributor

@grafanabot
Copy link
Contributor

@grafanabot
Copy link
Contributor

@grafanabot
Copy link
Contributor

@grafanabot
Copy link
Contributor

@grafanabot
Copy link
Contributor

@L-M-K-B L-M-K-B added this to the 9.1.6 milestone Sep 19, 2022
@@ -57,6 +57,7 @@ interface Props<TQuery extends DataQuery> {
history?: Array<HistoryItem<TQuery>>;
eventBus?: EventBusExtended;
alerting?: boolean;
onTriggerTracking?: (action: string, queryStatus?: boolean | undefined) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the method shouldn't be called onTriggerTracking as it can be used to handle anything (maybe something like onEvent would be better?). Also the optional queryStatus param is confusing because it's passed only with enableDisable so it's harder to understand just reading the API. @Elfo404, @ivanortegaalba please correct me if I'm wrong by I think what you meant was to have separate handlers for each event:

onQueryRemoved: () => void;
onQueryCopied: () => void;
onQueryToggled: (shown: boolean): void;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@L-M-K-B L-M-K-B requested a review from ifrost September 20, 2022 06:58
@github-actions
Copy link
Contributor

Backend code coverage report for PR #54514
No changes

@github-actions
Copy link
Contributor

Frontend code coverage report for PR #54514

Plugin Main PR Difference
* public app features data-connections mocks store.navIndex.mock.ts * public app features data-connections mocks store.navIndex.mock.ts% * public app features data-connections mocks store.navIndex.mock.ts% %

@grafanabot
Copy link
Contributor

Copy link
Contributor

@ifrost ifrost left a comment

Choose a reason for hiding this comment

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

Great stuff 🎉

@xlson xlson modified the milestones: 9.1.6, 9.1.7 Sep 20, 2022
@L-M-K-B L-M-K-B enabled auto-merge (squash) September 20, 2022 09:51
@grafanabot
Copy link
Contributor

@L-M-K-B L-M-K-B force-pushed the laura/add-tracking-to-explore branch from 8933315 to 1d0fc33 Compare September 20, 2022 10:39
@L-M-K-B L-M-K-B merged commit dbbab6e into main Sep 20, 2022
@L-M-K-B L-M-K-B deleted the laura/add-tracking-to-explore branch September 20, 2022 10:50
@grafanabot
Copy link
Contributor

The backport to v9.1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-54514-to-v9.1.x origin/v9.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x dbbab6e95c63b80bea2b192cf322a649469499c5
# Push it to GitHub
git push --set-upstream origin backport-54514-to-v9.1.x
git switch main
# Remove the local backport branch
git branch -D backport-54514-to-v9.1.x

Then, create a pull request where the base branch is v9.1.x and the compare/head branch is backport-54514-to-v9.1.x.

@grafanabot
Copy link
Contributor

L-M-K-B added a commit that referenced this pull request Sep 20, 2022
* refactor: repair tests

* refactor: clean up

* feat: add details to change of data source

* refactor: remove duplicate tracking

* refactor: make tracking reusable in an easier way

* refactor: add property

* refactor: change data for time picker

* refactor: change tracking label for time picker

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* refactor: store tracking in explore component

* refactor: add index signature

* refactor: remove ?

* refactor: split into 3 callbacks

* refactor: apply suggestions from code review

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit dbbab6e)
L-M-K-B added a commit that referenced this pull request Sep 20, 2022
* Explore: Add feature tracking events (#54514)

* refactor: repair tests

* refactor: clean up

* feat: add details to change of data source

* refactor: remove duplicate tracking

* refactor: make tracking reusable in an easier way

* refactor: add property

* refactor: change data for time picker

* refactor: change tracking label for time picker

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* refactor: store tracking in explore component

* refactor: add index signature

* refactor: remove ?

* refactor: split into 3 callbacks

* refactor: apply suggestions from code review

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit dbbab6e)

* refactor: remove unrelated changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Tracking: Implementation of Tracking Items
6 participants