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

Store refactor #43

Merged
merged 22 commits into from
Mar 8, 2023
Merged

Store refactor #43

merged 22 commits into from
Mar 8, 2023

Conversation

kamorel
Copy link
Contributor

@kamorel kamorel commented Mar 2, 2023

Description

  • Flattens the store structure to more accurately reflect the COMS DB model. Can now directly access various pieces of information.
  • Certain tables now contain data partitioning, meaning you will only replace data relevant to the new query. Non related data will still remain in the store.
  • Standardized prop imports
  • Standardized error handling
  • Additional index files added for easier importing
  • Added 404 page to router
  • Some minor bug fixes

Types of changes

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@github-actions
Copy link

github-actions bot commented Mar 2, 2023

Coverage Report (Application)

Totals Coverage
Statements: 75% ( 51 / 68 )
Methods: 62.5% ( 5 / 8 )
Lines: 82.61% ( 38 / 46 )
Branches: 57.14% ( 8 / 14 )

@TimCsaky TimCsaky requested a review from loneil March 2, 2023 20:59
frontend/src/components/bucket/BucketList.vue Outdated Show resolved Hide resolved
frontend/src/store/bucketStore.ts Outdated Show resolved Hide resolved
frontend/src/components/bucket/BucketList.vue Show resolved Hide resolved
frontend/src/components/bucket/BucketList.vue Outdated Show resolved Hide resolved
frontend/src/store/permissionStore.ts Show resolved Hide resolved
frontend/src/store/permissionStore.ts Outdated Show resolved Hide resolved
frontend/src/store/permissionStore.ts Outdated Show resolved Hide resolved
This change ensures that we are properly leveraging nested router
definitions correctly and that it shows up on the vue tools inspector as
intended. It also does a first crack at ensuring that only route points
that require query parameter handling leverage the createProps helper.
Lastly, a duplicate route definition is removed.

Signed-off-by: Jeremy Ho <[email protected]>
@kamorel kamorel force-pushed the feature/store-refactor branch from 7125a5f to 89ae5d7 Compare March 3, 2023 17:29
kamorel and others added 7 commits March 3, 2023 14:35
In general, lower level layers should not have dependencies to higher
layers. This change was done in order to decouple and ensure these services
can stand by themselves. We also take this opportunity to improve the type
declarations used.

Signed-off-by: Jeremy Ho <[email protected]>
In general, an authenticated user will need to know the database userId in
order to perform subsequent business logic. Instead of depending on a
separate userstore to cache this information, we instead let the
authentication system handle this for us as the userId's lifecycle is the
same as the logged-in user's session. We also tack on a few more copy
buttons to the developer view.

Signed-off-by: Jeremy Ho <[email protected]>
This commit adds general support for pinia store data to be written into
localstorage. This will eventually give us the benefit of caching data
across page restarts and across tab sessions, which ideally will help us
reduce the number of network calls dispatched to COMS.

Signed-off-by: Jeremy Ho <[email protected]>
The services must be instantiated within the function; otherwise the app
cannot import correctly and boot up.

Signed-off-by: Jeremy Ho <[email protected]>
@kamorel kamorel force-pushed the feature/store-refactor branch from 36fdfac to 8e5e079 Compare March 4, 2023 07:12
@kamorel kamorel marked this pull request as ready for review March 6, 2023 23:46
@kamorel kamorel requested a review from bcgv123 as a code owner March 6, 2023 23:46
@kamorel kamorel requested review from jujaga and TimCsaky March 6, 2023 23:46
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

Coverage Report (Frontend)

Totals Coverage
Statements: 5.42% ( 42 / 775 )
Methods: 0% ( 0 / 179 )
Lines: 8.37% ( 40 / 478 )
Branches: 1.69% ( 2 / 118 )

@jujaga jujaga merged commit 1066fbf into master Mar 8, 2023
@jujaga jujaga deleted the feature/store-refactor branch March 8, 2023 00:35
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.

4 participants