cht-core icon indicating copy to clipboard operation
cht-core copied to clipboard

Detect unsupported browser within the app

Open m5r opened this issue 2 years ago • 1 comments

Description

I've added bowser as a webapp dependency. Its bundled.js file located in webapp/node_modules/bowser/bundled.js is also used on the login page served by the API. Since the API doesn't have any tooling to bundle and import dependencies for this page, I symlinked this script to api/src/public/login/bowser.js.

Grunt didn't know how to deal with symbolic links so I patched grunt-contrib-copy to resolve the symlink and give the real file's path to grunt when copying the file to the build directory.

medic/cht-core#7448

Code review checklist

  • [ ] Readable: Concise, well named, follows the style guide, documented if necessary.
  • [ ] Documented: Configuration and user documentation on cht-docs
  • [ ] Tested: Unit and/or e2e where appropriate
  • [ ] Internationalised: All user facing text
  • [ ] Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

m5r avatar Mar 22 '22 22:03 m5r

@dianabarsan could you please take another look? Thanks :raised_hands:

m5r avatar Aug 10 '22 22:08 m5r

@dianabarsan can you please review it one more time?

This is what happened since your last review:

  • I re-committed the lib-bowser.js file because it wasn't getting picked up by the service worker builder and it ended up not being loaded properly
  • I've added translation keys as translate attribute on the login page so that it gets picked up by the language changes
  • The about page now displays the outdated component too (cht-android, webview or the browser)

Thanks!

m5r avatar Sep 13 '22 18:09 m5r