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

Improve error message & more frontend analytics #5490

Merged
merged 7 commits into from
May 27, 2021

Conversation

MichaelBuessemeyer
Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer commented May 14, 2021

This PR adds an additional error Toast for #5296 to better explain the error to the user and adds the requested analytics tracking of #5445 except for "Store custom layout" as it does not make sense in my opinion as this is tightly coupled to "Customize layout (i.e. move panels, resize panels)" when the auto-saving layout is turned on (which is the default).

If you think tracking this event still makes sense just notify me 😄

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • Create a new project (http://<>/projects/create)
  • Then directly click on view in the project table.
  • A tracing should open up with two errors:
    1. Annotation couldn’t be found
    2. It looks like this project does not have a single task completed. Make sure that at least one task of this project is finished to view it.
      I added the second error, to tell the user why this step failed and how to fix this error.

Issues:


Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

Nice! Already looking very good.

I had one thought about page visits: Maybe we can track this on a lower level via the react router. So, each page visit/change is tracked. What do you think?

@@ -237,6 +242,9 @@ class DatasetActionView extends React.PureComponent<Props, State> {
to={`/datasets/${dataset.owningOrganization}/${dataset.name}/edit`}
title="Open Dataset Settings"
disabled={isReloading}
onClick={() =>
sendAnalyticsEvent("open_dataset_settings", { datasetName: dataset.name })
Copy link
Member

Choose a reason for hiding this comment

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

I think, it would be better to trigger this event within componentDidMount of the settings view. That way, we also catch this event, when another settings link is used (e.g., within the dataset-info-tab of the tracing view).

let needsConversion = true;
for (const file of files) {
const filenameParts = file.name.split(".");
const fileExtension = filenameParts[filenameParts.length - 1].toLowerCase();
sendAnalyticsEvent("add_files_to_upload", { fileExtension });
Copy link
Member

Choose a reason for hiding this comment

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

If I drop 100 files, this event will be triggered 100 times. Can we group this by fileExtension? Then, the file count could also be transmitted. E.g.

for (const fileExtension of uniqueFileExtensions) {
  const fileCount = amount of files with that extension
  sendAnalyticsEvent("add_files_to_upload", { fileExtension, fileCount });
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch 👍

I just applied your feedback :)

@philippotto philippotto changed the title More frontend analytics Improve error message & more frontend analytics May 20, 2021
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

🕺

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.

Clicking "View" on a project which has no tracings produces an error
2 participants