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 participant homepage loading state #889

Conversation

maximilianoertel
Copy link
Collaborator

@maximilianoertel maximilianoertel commented Oct 15, 2024

Proposed changes

This PR fixes the flashing loading states on the Participant homepage.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (non-breaking change that does not add functionality but makes code cleaner or more efficient)
  • Documentation Update
  • Tests (new or updated tests)
  • Style (changes to code styling)
  • CI (continuous integration changes)
  • Repository Maintenance
  • Other (please describe below)

Checklist

  • I have read the guidelines for contributing.
  • The changes in this PR are as small as they can be. They represent one and only one fix or enhancement.
  • Linting checks pass with my changes.
  • Any existing unit tests pass with my changes.
  • Any existing end-to-end tests pass with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • If this PR fixes an existing issue, I have added a unit or end-to-end test that will detect if this issue reoccurs.
  • I have added JSDoc comments as appropriate.
  • I have added the necessary documentation to the roar-docs repository.
  • I have shared this PR on the roar-pr-reviews channel (if I have access)
  • I have linked relevant issues (if any)

Justification of missing checklist items

n/a

Further comments

n/a

Ref https://github.com/yeatmanlab/roar/issues/318
Fixes #886

@maximilianoertel maximilianoertel requested a review from a team as a code owner October 15, 2024 16:44
@maximilianoertel maximilianoertel self-assigned this Oct 15, 2024
@maximilianoertel maximilianoertel added the bug Something isn't working label Oct 15, 2024
Copy link

github-actions bot commented Oct 15, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 5.07% 390 / 7679
🔵 Statements 4.98% 421 / 8453
🔵 Functions 6.09% 115 / 1887
🔵 Branches 2.42% 110 / 4538
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/pages/HomeParticipant.vue 0% 0% 0% 0% 109-113, 115, 117-118, 121-125, 123, 123-124, 127-128, 130-132, 131, 131, 134-136, 135, 135, 138-139, 145-147, 153-155, 157-159, 158, 158, 161, 161, 161-162, 162, 168-170, 172-174, 176-178, 177, 180-182, 181, 184-187, 185, 185-186, 190-194, 196-206, 200-204, 201-203, 205, 208-210, 212-215, 217, 219-221, 223-261, 224, 226-227, 229, 231-247, 232, 234-241, 235, 237-240, 238-239, 243-246, 244-245, 250-256, 251-255, 252-254, 257-261, 258-260, 265-269, 271-275, 278-281, 279-280, 285-327, 286-325, 287-311, 290-292, 297, 297-308, 313-322, 315-321, 316-320, 317-319, 318, 324, 326, 329-331, 330, 330, 333-335, 334, 334, 338-347, 339-346, 342, 350-352, 351, 355-357, 356, 356, 360-366, 361, 361, 363-365, 368-397, 372, 372, 375-377, 376, 379-380, 380, 383-391, 386-388, 387, 390, 394, 1, 9, 11, 26, 44-45, 56, 61, 1-32, 1-47, 49
src/pages/HomeSelector.vue 0% 0% 0% 0% 37, 37-38, 38-39, 39, 41-43, 45-46, 48, 50-53, 51-52, 55-56, 58, 60-63, 61, 61-62, 65-67, 66, 66, 69-71, 73-75, 77, 79, 79-85, 84, 87-94, 89-93, 90, 92, 96-97, 100, 104, 104, 106-107, 109, 111-115, 112-114, 117-118, 118, 120-123, 121-122, 127-129, 132-140, 135-137, 136, 142-148, 143-146, 144-145, 147, 147, 1, 3, 5
Generated in workflow #732 for commit a42ea2d by the Vitest Coverage Report Action

Copy link

github-actions bot commented Oct 15, 2024

Visit the preview URL for this PR (updated for commit a42ea2d):

https://roar-staging--pr889-ref-318-query-compos-4lc4wl7t.web.app

(expires Tue, 22 Oct 2024 16:57:40 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460

Copy link

cypress bot commented Oct 15, 2024

roar-dashboard-e2e    Run #8385

Run Properties:  status check passed Passed #8385  •  git commit a42ea2db19: E2E Tests for PR 889 "Fix participant homepage loading state" from commit "a42ea...
Project roar-dashboard-e2e
Run status status check passed Passed #8385
Run duration 03m 41s
Commit git commit a42ea2db19: E2E Tests for PR 889 "Fix participant homepage loading state" from commit "a42ea...
Committer Maximilian Oertel
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32

@richford richford merged commit 8bd03d8 into ref/318/query-composables Oct 15, 2024
22 checks passed
@richford richford deleted the ref/318/query-composables-participant-loading branch October 15, 2024 17:26
richford added a commit that referenced this pull request Oct 15, 2024
* Introduce useOrgUsersQuery composable

* Add unit tests for useOrgUsersQuery

* Fix linter offenses

* Introduce useTasksQuery composable

* Extend withSetup test util to accept app options

* Add unit tests

* Introduce useAddTaskMutation

* Improve task addition error handling

* Improve view model handling

* Introduce useUpdateTaskMutation and add mutation keys

* Add mutation unit tests

* Introduce useAddTaskVariantMutation and useUpdateTaskVariantMutation composables

* Fix useTasksQuery and implement on Manage Variants page

* Renamed task variants query

* Fix ref val usage in useTaskVariantsQuery

* Add unit tests for useTaskVariantsQuery

* Introduce useTasksQuery and optimise conditional task loading

* Extend useUserType for super admin handling

* Apply super admin user type check changes to HomeSelector

* Introduce useAdministrationsQuery composable

* Remove obsolete user claims query

* Fix administrations loading spinner

* Introduce useUpdateUserMutation

* Cleanup and remove obsolete logging

* Add unit tests for useUpdateUserMutation

* Add useUserDataQuery unit tests

* Leverage useUserType for isSuperAdmin status

* Add missing import

* Regenerate package-lock due to npm/cli#4828

* Prepare for composable queries

* Replace user claims query with useUserClaimsQuery

* Use userType composable

* Introduce useAdministrationsQuery composable and apply on administrator homepage

* Fix loading state

* Fix linter offenses

* Restore itemsPerPage to original value

* Restore package files

* Upgrade tanstack and install dev tools

* Remove comment

* Remove incorrect parameters

* Introduce useUserAssignments composable

* Fix reactivity and minor issues

* Introduce revised useAdministrationsQuery composable

* Extend useTasksQuery to fetch by task IDs

* Move useTasksQuery function to helper

* Fix tasks query fetching and constants

* Update useTasksQuery unit tests

* Fix loading & query reactivity

* Introduce useSurveyReponsesQuery composable

* Add useSurveyResponsesQuery unit tests

* Add useUserAssignmentsQuery unit tests

* Fix reactivity in query composables

* Remove duplications in favour of computeQueryOverrides helper

* Fix vue warning

* Improve computeQueryOverride reactivity and testability

* Add unit tests for useUserStudentDataQuery

* Overhaul useUserDataQuery unit tests

* Add useUserClaimsQuery unit tests

* Overhaul useUserClaimsQuery unit tests

* Simplify useTaskVariantsQuery unit tests

* Align useTasksQuery unit test names

* Overhaul useSurveyResponsesQuery unit tests

* Add useAdministrationsQuery unit tests

* Add useDsgfOrgQuery unit tests

* Add useLegalDocsQuery unit tests

* Add computeQueryOverrides unit tests

* Switch from uid to roarUid for survey response querying

* Migrate score report queries to existing query composables

* Introduce useAdministrationAssignmentsQuery composable

* Add useDistrictsQuery unit tests

* Split district query into separate composables

* Introduce useSchoolQuery composable

* Introduce useClassQuery composable

* Introduce useGroupQuery composable

* Fix doc comments

* Introduce useFamilyQuery composable

* Fix useAdministrationsQuery unit tests

* Introduce new fetchDocumentsById query helper

* Replace useClassQuery with useClassesQuery composable

* Restructure district queries

* Replace useSchoolQuery with useSchoolsQuery composable

* Replace useGroupQuery with useGroupsQuery composable

* Replace useFamilyQuery with useFamiliesQuery

* Extend useDistrictsListQuery tests

* Replace manual administration query with useAdministrationsQuery

* Introduce new useAdministrationsStatsQuery composable

* Migrate ProgressReport to individual org queries

* Introduce reusable useOrgQuery composable for dynamic org querying

* Migrate remaining page queries to composables

* Switch to router based report routing

* Add unit tests

* Renamed page to match naming

* Adapt useUserDataQuery to optionally fetch by manual user ID

* Introduce useUserAdministrationAssignmentsQuery composable

* Replace manual query with useAdministrationsQuery

* Introduce tempoary useUsrRunPageQuery composable

* Add useUserAdministrationAssignmentsQuery unit tests

* Fix linter offenses

* Fix comment typos

* Make TanStack dev tools load conditionally

* Fix administration assignments query

* Remove staging conditional in favour of env var

* Temporarily disable progress and report filtering tests

* Replace administrations query with useAdministrationsQuery composable

* Replace districts and schools queries with composables

* Align query omposables and fix reactivity issues

* Replace classes query with useClassesQuery composable

* Fix linter offenses

* Fix query state reactivity

* Replace groups query with useGroupsQuery composable

* Replace families query with useFamiliesQuery composable

* Refactor CreateAdminitration page data handling

* Fix query state handling

* Remove console logs and obsolete comments

* Refactor consent handling for administrators

* Apply Consent Modal changes to remaining pages

* Fix query reactivity

* Fix document path destructuring

* Add markdown/html sanitization

* Add remaining consent types

* Add loop breaker

* Remove obsolete import

* Add useSignOutMutation

* Fix and improve signout mutation

* Apply signOut mutation across pages

* Remove query key indexes from queries

* Combine ClassLink and Clever into single SSO landing page

* Refactor store sso source

* Add (intentional) typos

* Fix home selector routing for sso flow

* Introduce useTasksDictionaryQuery composable

* Replace authStore tasks dictionary in favour of query composable

* Remove obsolete import

* Remove onUpdated hook for task dictionary refresh

* Use AUTH_SSO_PROVIDERS instead of string literals

* Clear query data before sign-out redirect

* Fix vue-query hook usage error

* Improve error handling and logging

* Add inline initStateFromRedirect comments

* Add unit tests

* Introduce useDeleteAdministrationMutation mutation

* Improve administration loader

* Fix error handling in fetchByDocId

* Update JSDoc

* Update src/components/auth/RegisterStudent.vue

Co-authored-by: Kyle Montville <[email protected]>

* Update src/components/auth/RegisterStudent.vue

Co-authored-by: Kyle Montville <[email protected]>

* Improve error handling

* Updated copy to match form option

* Revert "Improve error handling"

This reverts commit 4fa5c46.

* Fix post-signout firekit initialisation

* Fix linter offenses

* Fix SWR task loading

* Fix Vocab task loading

* Fix SRE task loading

* Fix Ran task loading

* Fix PA task loading

* Fix Multichoice task loading

* Fix MEP task loading

* Fix Levante task loading

* Fix Letter task loading

* Fix Fluency task loading

* Fix Crowding task loading

* Fix tasks loading (#883)

* Fix SWR task loading

* Fix Vocab task loading

* Fix SRE task loading

* Fix Ran task loading

* Fix PA task loading

* Fix Multichoice task loading

* Fix MEP task loading

* Fix Levante task loading

* Fix Letter task loading

* Fix Fluency task loading

* Fix Crowding task loading

* Fix administration selection

* Fix administrations list rendering (#888)

* Fix participant homepage loading state (#889)

* Fix flashing loading states on participant homepage

* Fix refs

---------

Co-authored-by: Emily Arteaga <[email protected]>
Co-authored-by: Kyle Montville <[email protected]>
Co-authored-by: Adam Richie-Halford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants