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 tasks loading #883

Merged
merged 12 commits into from
Oct 14, 2024
Merged

Conversation

maximilianoertel
Copy link
Collaborator

@maximilianoertel maximilianoertel commented Oct 14, 2024

Proposed changes

This PR fixes the identified issues regarding the loading of tasks within the dashboard.

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

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

Copy link

github-actions bot commented Oct 14, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 5.08% 390 / 7677
🔵 Statements 4.98% 421 / 8452
🔵 Functions 6.09% 115 / 1888
🔵 Branches 2.42% 110 / 4530
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/components/tasks/TaskCrowding.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127, 2
src/components/tasks/TaskFluency.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127
src/components/tasks/TaskLetter.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127
src/components/tasks/TaskLevante.vue 0% 0% 0% 0% 19, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-71, 63-68, 64-65, 67, 70, 70, 73-75, 74, 77-87, 80-84, 81-83, 90-128, 91-98, 93-97, 95-96, 100, 102-103, 105-109, 111, 113, 115-122, 117, 120-121, 124-127
src/components/tasks/TaskMEP.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127, 2
src/components/tasks/TaskMultichoice.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127
src/components/tasks/TaskPA.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127
src/components/tasks/TaskRan.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127, 2
src/components/tasks/TaskSRE.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127
src/components/tasks/TaskSWR.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127
src/components/tasks/TaskVocab.vue 0% 0% 0% 0% 18, 25-32, 34, 36-39, 37, 37-38, 40-42, 41, 44-46, 45, 45, 48-50, 54-60, 57, 62-70, 63-67, 64, 66, 69, 69, 72-74, 73, 76-86, 79-83, 80-82, 89-128, 90-97, 92-96, 94-95, 99, 101-102, 104-109, 111, 113, 115-122, 117, 120-121, 124-127
Generated in workflow #715 for commit dea85ee by the Vitest Coverage Report Action

Copy link

github-actions bot commented Oct 14, 2024

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

https://roar-staging--pr883-ref-318-query-compos-2dpomvjl.web.app

(expires Mon, 21 Oct 2024 17:46:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460

Copy link

cypress bot commented Oct 14, 2024

roar-dashboard-e2e    Run #8290

Run Properties:  status check passed Passed #8290  •  git commit dea85ee26a: E2E Tests for PR 883 "Fix tasks loading" from commit "dea85ee26a10f73a4d56064753...
Project roar-dashboard-e2e
Run status status check passed Passed #8290
Run duration 03m 51s
Commit git commit dea85ee26a: E2E Tests for PR 883 "Fix tasks loading" from commit "dea85ee26a10f73a4d56064753...
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 14

@maximilianoertel maximilianoertel marked this pull request as ready for review October 14, 2024 17:43
@maximilianoertel maximilianoertel requested a review from a team as a code owner October 14, 2024 17:43
@maximilianoertel maximilianoertel self-assigned this Oct 14, 2024
@maximilianoertel maximilianoertel added the bug Something isn't working label Oct 14, 2024
Base automatically changed from ref/318/query-composables-merge to ref/318/query-composables October 14, 2024 18:05
@richford richford merged commit ab039e9 into ref/318/query-composables Oct 14, 2024
25 checks passed
@richford richford deleted the ref/318/query-composables-tasks branch October 14, 2024 18:11
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.

3 participants