Cht-core: Move more scope properties to store and controller

Created on 3 May 2019  路  9Comments  路  Source: medic/cht-core

As part of the ongoing changes to get ready to move to Angular 7, this issue is for moving various scope properties into the redux store and onto relevant controllers.

AT: Nearly every part of the app has been touched in at least some small way (excluding the admin app), sorry 鈽癸笍 This is effectively a refactor with no new features added. Specific big things that have been touched and may have broken:

  • The action bar (LHS and RHS)
  • Filters when listing contacts/reports/analytics, including the list of facilities
  • The page title
  • Unread count indicator in the top bar for new messages/reports/contacts
  • App details on the About page

PR: https://github.com/medic/medic/pull/5792

2 - Medium Technical issue

All 9 comments

Moving this to 3.6.0 as it's not required for 3.5.0

Hi @rmhowe . I am looking at this and seeing a few areas where the app behaves differently from master :

1 . Report submitted message not going away after submit button:
image

  1. Slow loading
    image

  2. None of the buttons work onUpdate Password Modal` - no error in console
    image

  3. Add new person combo box not working (not able to select):
    image
    With following console errors (in Firefox)
    image

@ngaruko thanks for finding those!

  1. This is part of the admin app (which this code doesn't touch) and appears to also happen on master so I don't believe is a problem with this PR.
  2. This is interesting, I've made some small changes which may help but I can't see much of a difference on my local. Are you able to do some rough benchmarking to quantify the difference on yours? EDIT: just did some benchmarking on my machine over this code averaging over 9 samples:
  • Firefox 69 on master: 1290 ms
  • Chrome 76 on master: 287 ms
  • Firefox 69 on PR branch: 1107 ms
  • Chrome 76 on PR branch: 316 ms
  1. Fixed.
  2. Fixed.

Thanks @rmhowe . I will re-AT 3 and 4, raise a separate issue on 1 if it still shows on master and leave 2 for performance testing during RT.

AT on 5635-reduxify-more-properties.
Just one more thing: All errors on that edit user are represented by one error message (Password is a required field) under password (second textfield). See screenshots
Master: image ||
image

Branch:
image ||
image

image

Also, there are still conflicts on the branch.... Back to you @rmhowe

@ngaruko thanks again for finding those, fixed the update password modal and all merge conflicts. A couple of e2e test are failing on travis only on a specific version of node so I'm not sure what's going on there but will look into it, I suspect they're just flaky tests though.

Hi @rmhowe > seems like the update password modal still does not handle errors properly.
image

Plus the guided tour is also broken. No control buttons (previous, next, end tour).
image

@ngaruko that guided tour bug is also happening on master for me, not sure if that was a regression introduced previously? I've had a look into it but really not sure what's causing it. Also this is what the update password modal looks like for me on the PR branch
updatepassword

Thanks @rmhowe
True.The guide tour seems to be broken on master. Will raise a separate issue for this. Closing this one and will keep an eye in it during our RT, just in case I missed something here @newtewt

Was this page helpful?
0 / 5 - 0 ratings