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

fix(analytics): improve error-handling #1443

Merged
merged 12 commits into from
Apr 15, 2021
Merged

fix(analytics): improve error-handling #1443

merged 12 commits into from
Apr 15, 2021

Conversation

JPSchellenberg
Copy link
Member

Hey,

I started to work on the analytics-issues and I worked out some things:

  • You can now import .lumi files from different content-types. They are displayed as different lists. Unfortunately I can not determine the title of the content-type from the contentJson included in the report-file. Any ideas how to make it clear that there are more than one content-type on the page?

  • I added a list for "broken files". Files that did not validate for some reasons:

  1. file did not parse -> no valid json
  2. file does not include the contentJson
  3. file contains invalid interactions
  4. file contains invalid statements
  • Even if one or several file(s) are broken all others files are imported, analyzed and displayed.

Any thoughts?

@JPSchellenberg JPSchellenberg self-assigned this Apr 13, 2021
@JPSchellenberg JPSchellenberg added the [type] bug Something isn't working (resulting in patch-version) label Apr 13, 2021
@sr258
Copy link
Member

sr258 commented Apr 15, 2021

Great job! Things are much better now and much more clear to the user.

I think having multiple tables is fine for now. We should include the title of the content in the reporter in the future. We can get it from the H5P content metadata object.

I've added locales for the new errors.

i18next supports plurals, so you can do stuff like:

                "brokenFiles": "{{numberBrokenFiles}} broken file found",
                "brokenFiles_plural": "{{numberBrokenFiles}} broken files found"

It's nicer for the users and the auto-translate tools also work better.

I also added case-insensitivity, as one of the sample files we received with the bug report had the extension '.LUMI'. It was not detected.

I can open the test folder "invalid-interactions" without any error message. Is this intentional?

I think the PR is ready to be merged.

@sr258
Copy link
Member

sr258 commented Apr 15, 2021

While fixing the plurals I've noticed that the language string notifications->analytics->import->brokenFiles is unused. Am I correct here?

@JPSchellenberg
Copy link
Member Author

Yes, I removed it for now as it was too fragile for now.

@JPSchellenberg
Copy link
Member Author

I can open the test folder "invalid-interactions" without any error message. Is this intentional?

Yes, this is intentional. But it should show that there are broken files in that folder.

@JPSchellenberg JPSchellenberg merged commit 287c675 into master Apr 15, 2021
github-actions bot pushed a commit that referenced this pull request Apr 17, 2021
# [0.7.0](v0.6.1...v0.7.0) (2021-04-17)

### Bug Fixes

* **analytics:** improve error-handling ([#1443](#1443)) ([287c675](287c675))
* **analytis:** increase search bar to fit text ([c146247](c146247))
* **cancelExport:** use cancelExportH5P-action consistently ([d0dc8c7](d0dc8c7))
* **client:** updated Spanish locales ([8e1111a](8e1111a))
* **deps:** update dependency @testing-library/user-event to v13.1.2 ([d7d3561](d7d3561))
* **deps:** update dependency @testing-library/user-event to v13.1.3 ([26520b9](26520b9))
* **deps:** update dependency @types/node to v14.14.39 ([97236f2](97236f2))
* **deps:** update dependency @types/node to v14.14.41 ([cd7d325](cd7d325))
* **deps:** update dependency classnames to v2.3.1 ([d94d87c](d94d87c))
* **deps:** update dependency electron-log to v4.3.3 ([2358356](2358356))
* **deps:** update dependency electron-log to v4.3.4 ([9646ffc](9646ffc))
* **deps:** update dependency i18next to v20.2.0 ([0470714](0470714))
* **deps:** update dependency i18next to v20.2.1 ([e5148a4](e5148a4))
* **deps:** update dependency i18next-http-middleware to v3.1.1 ([a344d1c](a344d1c))
* **deps:** update dependency react-i18next to v11.8.13 ([b6eb1b3](b6eb1b3))
* **deps:** update dependency typescript to v4.2.4 ([80077f8](80077f8))
* **devmode:** empty --libs switch ignored ([9fa6e3b](9fa6e3b))
* **devmode:** pass undefined if libs is not set ([b5e91a7](b5e91a7))
* **general:** added missing default Mac menu ([d3388e2](d3388e2))
* **i18n:** Translated using Weblate (Spanish (Mexico) (es_MX)) ([#1447](#1447)) ([653410e](653410e))
* **locales:** auto-translated new strings ([02552ce](02552ce))
* **locales:** corrected auto-translated German locale ([8b3bbc7](8b3bbc7))
* **locales:** run autotranslation ([5dde3e1](5dde3e1))
* **locales:** Translations update from Weblate ([88456da](88456da))
* **mac-menu:** missing default mac-menu ([961abbf](961abbf))
* **merge:** fixed incorrect merge ([5739f6d](5739f6d))
* **sentry:** add new DSN ([#1438](#1438)) ([0228646](0228646))
* **server:** improved file dialogs ([5b13df9](5b13df9))
* **settings:** overhaul settings layout ([#1412](#1412)) ([cb513cd](cb513cd))

### Features

* **auth:** add auth via passwordless login & register ([#1410](#1410)) ([d5e31af](d5e31af))
* **client:** added cancel to export dialog ([843e3cd](843e3cd))
* **client:** added export options ([2c7379b](2c7379b))
* **client+server:** added SCORM mastery score ([6952d5b](6952d5b))
* **editor:** content type names in tab headers now localized ([#1419](#1419)) ([eed23e8](eed23e8))
* **editor:** dev mode ([#1432](#1432)) ([d6035e5](d6035e5))
* **exports:** added more export options ([1d9c95b](1d9c95b))
* **exports:** updated locales ([f2b6bf7](f2b6bf7))
* **library-management:** add h5p-library-management to settings ([#1416](#1416)) ([1e83648](1e83648))
* **mac menu:** added localization ([9d2917a](9d2917a))
* **server:** changed export ([0311a34](0311a34))
* **server:** external export works ([b892d1f](b892d1f))
* **server:** first functional SCORM exporter ([2ffd2f5](2ffd2f5))
* **server+client:** localized export ([3e65a45](3e65a45))
@github-actions
Copy link

🎉 This PR is included in version 0.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@JPSchellenberg JPSchellenberg deleted the fix/analytics branch May 14, 2021 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released [type] bug Something isn't working (resulting in patch-version)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants