Skip to content

[dashboard] add modal_dismiss tracking event #10132

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

Merged
merged 1 commit into from
May 30, 2022
Merged

[dashboard] add modal_dismiss tracking event #10132

merged 1 commit into from
May 30, 2022

Conversation

mustard-mh
Copy link
Contributor

@mustard-mh mustard-mh commented May 19, 2022

Description

Add modal_dismiss tracking event to clarify how and where this modal dismiss.

  • manner: how this modal dismiss, value can be one of esc enter x
  • specify: specify a key if having the same title and window.location
  • title: title of , that needs to do with TODO in this PR

Need preview PR to be merged first

Tracking Plan

Related Issue(s)

Fixed #9790

How to test

Go to segment to check if modal_dismiss event sent correctly.

  1. Go to /workspaces press enter after IDE select modal display, see if modal_dismiss data like
{
  userId: 'a5ef63c4-53fb-4554-ad4b-4b985349e4ee',
  event: 'modal_dismiss',
  properties: {
    manner: 'enter',
    path: '/workspaces',
    specify: 'workspace_list',
    title: 'Select Editor'
  }
}
  1. Reset ideSettings of user (or delete user and re-create one), go with /#github.com/gitpod-io/template-sveltejs and press esc to see if modal_dismiss data manner=esc specify=workspace_start

The tests above are checking for specify of IDE select modal. We can test more manner in /variables to easily create a modal here

Release Notes

NONE

Documentation

  • /werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe

@mustard-mh
Copy link
Contributor Author

mustard-mh commented May 24, 2022

/werft run

👍 started the job as gitpod-build-hw-modal-track.6
(with .werft/ from main)

@mustard-mh mustard-mh marked this pull request as ready for review May 25, 2022 08:16
@mustard-mh mustard-mh requested a review from a team May 25, 2022 08:16
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label May 25, 2022
@mustard-mh
Copy link
Contributor Author

@iQQBot Could you help review/test this?

@geropl geropl self-assigned this May 30, 2022
@geropl
Copy link
Member

geropl commented May 30, 2022

/werft run

👍 started the job as gitpod-build-hw-modal-track.8
(with .werft/ from main)

@geropl
Copy link
Member

geropl commented May 30, 2022

build error:

Validating configuration
STDERR: Error: error loading config: error unmarshaling JSON: while decoding JSON: json: unknown field "usage"

@mustard-mh This requires a rebase

@geropl
Copy link
Member

geropl commented May 30, 2022

@mustard-mh I tested, and it seems to work as expected.

But I noticed that it does not seem to pick up modal dismisses when I regularly click the button.
Is that by intention? 🤔
If yes: Wouldn't it be easier for later analysis to capture modal_closure with maner: esc | enter | x | accept instead, to cover all ways a user can "escape" a modal?

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Approving because the code looks good and works.

/hold in case you want to react on this comment

@mustard-mh
Copy link
Contributor Author

mustard-mh commented May 30, 2022

@mustard-mh I tested, and it seems to work as expected.

But I noticed that it does not seem to pick up modal dismisses when I regularly click the button. Is that by intention? 🤔 If yes: Wouldn't it be easier for later analysis to capture modal_closure with maner: esc | enter | x | accept instead, to cover all ways a user can "escape" a modal?

👍 Good point, I will go with it. cc @loujaybee

@loujaybee loujaybee requested a review from a team May 30, 2022 09:27
@mustard-mh mustard-mh marked this pull request as draft May 30, 2022 13:31
@mustard-mh
Copy link
Contributor Author

mustard-mh commented May 30, 2022

👍 Good point, I will go with it. cc @loujaybee

@geropl @loujaybee Sometimes when we click on buttons that don't necessarily make the modal disappear. For example, if we need to wait for the result of a request, and the request fails, the modal does not disappear, but waits for the user to make a second click.

So we could probably provide a common method in Modal.tsx to export instead of directly adding?

Or maybe just go with this PR, and make changes in the future if needed?

@geropl
Copy link
Member

geropl commented May 30, 2022

Or maybe just go with this PR, and make changes in the future if needed?

@mustard-mh Fine with me! Just wanted to bring it up in case it's "quick and easy". 👍

@mustard-mh mustard-mh marked this pull request as ready for review May 30, 2022 15:32
@mustard-mh
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit f2c9731 into main May 30, 2022
@roboquat roboquat deleted the hw/modal-track branch May 30, 2022 15:33
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analytics: Track modal dismissal
3 participants