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

feat(#9231): enable place filter aggregate targets for users with multiple facility_ids #9232

Merged
merged 25 commits into from
Jul 16, 2024

Conversation

Benmuiruri
Copy link
Contributor

@Benmuiruri Benmuiruri commented Jul 1, 2024

Description

This PR :

Screenshots and Videos

Analytics Landing Page Unchanged Screenshot 2024-07-11 at 14 28 16
Targets Page unchanged Screenshot 2024-07-11 at 14 29 48
Aggregate Targets Page for user with 1 Facility unchanged - They cannot see Filter button Screenshot 2024-07-11 at 14 30 29
Aggregate Targets Page for user with 1 Facility unchanged - Mobile view Screenshot 2024-07-11 at 14 33 03
Aggregate Targets Page for user with Multi Facility - They can see Filter button Screenshot 2024-07-11 at 14 35 52
Aggregate Targets Page for user with Multi Facility - Sidebar open Screenshot 2024-07-11 at 14 36 53
Aggregate Targets Page for user with Multi Facility - Sidebar open - Mobile View Screenshot 2024-07-11 at 14 37 57
Aggregate Targets Page for user with Multi Facility - Video Demo
Screen.Recording.2024-07-11.at.14.39.02.mov

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.

Compose URLs

If Build CI hasn't passed, these may 404:

License

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

Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

Some feedback we reviewed during the call

@Benmuiruri Benmuiruri marked this pull request as ready for review July 8, 2024 16:09
@Benmuiruri Benmuiruri force-pushed the add-filters-aggregate-targets branch from 680feae to 363e35f Compare July 8, 2024 16:13
@Benmuiruri Benmuiruri changed the title chore(#9231): Enable place filter aggregate targets for users with multiple facility_ids chore(#9231): enable place filter aggregate targets for users with multiple facility_ids Jul 8, 2024
@Benmuiruri Benmuiruri changed the base branch from master to 9231-add-aggregate-filter July 8, 2024 16:23
@latin-panda
Copy link
Contributor

@Benmuiruri please change the PR title from chore to feat

@Benmuiruri Benmuiruri changed the title chore(#9231): enable place filter aggregate targets for users with multiple facility_ids feat(#9231): enable place filter aggregate targets for users with multiple facility_ids Jul 9, 2024
Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

I did a quick pass and left some feedback but I still need to do a proper review specially the CSS part.

Please add unit tests to the new code.
Also make sure to test the view without this feature, including when the old design is activated to verify it still looks good (can_view_old_filter, can_view_old_actionbar)

webapp/src/css/private-vars.less Outdated Show resolved Hide resolved
webapp/src/css/sidebar-filter.less Outdated Show resolved Hide resolved
webapp/src/css/sidebar-filter.less Outdated Show resolved Hide resolved
webapp/src/css/sidebar-filter.less Outdated Show resolved Hide resolved
webapp/src/css/sidebar-filter.less Outdated Show resolved Hide resolved
Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

@Benmuiruri I did a quick pass and I have reviewed 50% only.
I'll review the other 50% later

Copy link

@ralfudx ralfudx left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

Very nice!! Almost there, just small feedback

@latin-panda
Copy link
Contributor

Feedback above ⬆️
This is what I tested ⬇️

Admin user (with 1 facility assigned and no facility assigned)
  • Device
    • Mobile
    • Desktop
    • Tablet
  • Back button
  • Reload
  • Navigate target
  • Navigate target aggregates
  • Check the browser's console for errors or suspicious warnings
Offline user (with 1 facility and 2 facilities)) - Device - Mobile - Desktop - Tablet - Back button - Reload - With no aggregate permissions - Navigate target - Navigate target aggregates by changing url - should not allow and show `target aggregates are disabled`
  • Enable permissions and wait for the upgrade message should work; no errors
    • Navigate target
    • Navigate target aggregates
    • Aggregate targets details view - like click on one from the list.
  • With old filter and old action bar
Online user (with 1 facility and 2 facilities)) - Device - Mobile - Desktop - Tablet - Back button - Reload - With no aggregate permissions - Navigate target - Navigate target aggregates by changing url - should not allow and show `target aggregates are disabled`
  • Enable permissions and wait for the upgrade message should work; no errors
    • Navigate target
    • Navigate target aggregates
    • Aggregate targets details view - like click on one from the list.
  • With old filter and old action bar

Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

I reviewed the changes, but couldn't test since I'm running out of time for this week.
LGTM! Thanks for fixing all the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users assigned to multiple facility_ids to view aggregate targets and filter by facility_id
3 participants