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

SubmissionView to store + minor general refactors #68

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Conversation

kyle1morel
Copy link
Collaborator

@kyle1morel kyle1morel commented Apr 19, 2024

Description

Moves the state data from the SubmissionView into a new submissionStore. All components now read and write to this store. Numerous emits have been removed as the up/down prop passing is no longer required.

PR also includes some general refactoring, and couple minor bug fixes.

a37343e Refactor NoteModal to correctly use default props
0d4658a Refactor SubmissionView + child components to use a store

Types of changes

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

All components now reference a single submissionStore. Number of emits seriously cut down
@kyle1morel kyle1morel requested a review from wilwong89 as a code owner April 19, 2024 20:29
Copy link

Coverage Report (Application)

Totals Coverage
Statements: 47.66% ( 539 / 1131 )
Methods: 37.44% ( 85 / 227 )
Lines: 60.74% ( 362 / 596 )
Branches: 29.87% ( 92 / 308 )

Copy link

github-actions bot commented Apr 19, 2024

Coverage Report (Frontend)

Totals Coverage
Statements: 23.42% ( 510 / 2178 )
Methods: 21.43% ( 87 / 406 )
Lines: 26.68% ( 321 / 1203 )
Branches: 17.93% ( 102 / 569 )

frontend/src/store/submissionStore.ts Show resolved Hide resolved
frontend/src/store/submissionStore.ts Show resolved Hide resolved
frontend/src/store/submissionStore.ts Show resolved Hide resolved
frontend/src/store/submissionStore.ts Show resolved Hide resolved
frontend/src/store/submissionStore.ts Show resolved Hide resolved
Copy link

codeclimate bot commented Apr 19, 2024

Code Climate has analyzed commit 15465bb and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 5

The test coverage on the diff in this pull request is 13.9% (50% is the threshold).

This pull request will bring the total coverage in the repository to 37.9% (0.2% change).

View more on Code Climate.

@kyle1morel kyle1morel force-pushed the refactor/store branch 2 times, most recently from 09cba9e to a37343e Compare April 19, 2024 21:18
@kyle1morel kyle1morel force-pushed the refactor/store branch 3 times, most recently from 47766e9 to 7c05f98 Compare April 23, 2024 18:13
Minor other tweaks - SubmissionForm always editable
@kyle1morel kyle1morel merged commit 8a1bcce into master Apr 23, 2024
19 of 22 checks passed
@kyle1morel kyle1morel deleted the refactor/store branch April 23, 2024 18:57
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.

2 participants