-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Port ReviewEntries to use redux-toolkit #2800
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2800 +/- ##
==========================================
+ Coverage 72.62% 72.66% +0.03%
==========================================
Files 253 253
Lines 9473 9479 +6
Branches 1094 1093 -1
==========================================
+ Hits 6880 6888 +8
+ Misses 2269 2266 -3
- Partials 324 325 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 12 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @imnasnainaec)
src/goals/ReviewEntries/Redux/ReviewEntriesActions.ts
line 43 at r2 (raw file):
} interface wordUpdate {
I thought interfaces are supposed to be in Pascal Case, that is, WordUpdate
.
Code quote:
wordUpdate
src/goals/ReviewEntries/Redux/ReviewEntriesActions.ts
line 81 at r2 (raw file):
* * If a sense is marked as deleted or is utterly blank, it is removed * * If a sense lacks gloss, return error * * If the user attempts to delete all senses, return old senses with deleted senses removed */
If I understand the comment changes, this is a move to use JSDoc function descriptions. If so, bullets should be -
instead of *
.
In addition, JSDoc comments should have @param
descriptions for a function with parameters passed in.
This also applies to the other functions here.
If the goal is not to migrate the TypeScript code to use JSDoc comments, then I find this style more difficult to read (just a personal preference - I am fine with moving to JSDoc if it allows us to generate documents that will be useful to developers).
Code quote:
/** Returns a cleaned array of senses ready to be saved (none with .deleted=true):
* * If a sense is marked as deleted or is utterly blank, it is removed
* * If a sense lacks gloss, return error
* * If the user attempts to delete all senses, return old senses with deleted senses removed */
src/goals/ReviewEntries/Redux/ReviewEntriesActions.ts
line 223 at r2 (raw file):
} export function deleteAudio(
If the goal is to provide JSDoc function descriptions, deleteAudio
and uploadAudio
need descriptions of the function and its parameters.
Code quote:
export function deleteAudio(
src/goals/ReviewEntries/Redux/tests/ReviewEntriesActions.test.tsx
line 109 at r2 (raw file):
}, }); expect(store.getState().reviewEntriesState.sortBy).toEqual(colId);
These calls to expect
are really testing configureStore
from @reduxjs/toolkit
. They are not needed before dispatching deleteWord
.
This comment applies to the other tests as well.
Suggestion:
expect(store.getState().reviewEntriesState.sortBy).toEqual(colId);
expect(store.getState().reviewEntriesState.words).toHaveLength(1);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 8 of 13 files reviewed, 2 unresolved discussions (waiting on @jmgrady)
src/goals/ReviewEntries/Redux/ReviewEntriesActions.ts
line 43 at r2 (raw file):
Previously, jmgrady (Jim Grady) wrote…
I thought interfaces are supposed to be in Pascal Case, that is,
WordUpdate
.
Done.
src/goals/ReviewEntries/Redux/ReviewEntriesActions.ts
line 81 at r2 (raw file):
Previously, jmgrady (Jim Grady) wrote…
If I understand the comment changes, this is a move to use JSDoc function descriptions. If so, bullets should be
-
instead of*
.In addition, JSDoc comments should have
@param
descriptions for a function with parameters passed in.This also applies to the other functions here.
If the goal is not to migrate the TypeScript code to use JSDoc comments, then I find this style more difficult to read (just a personal preference - I am fine with moving to JSDoc if it allows us to generate documents that will be useful to developers).
Switch from * *
to * -
.
I didn't have JSDocs in view, but simple that VSCode provides /** pre-function comment *
information when you hover over that function wherever it's being used. (I supposed that's using JSDocs under the hood.)
src/goals/ReviewEntries/Redux/tests/ReviewEntriesActions.test.tsx
line 109 at r2 (raw file):
Previously, jmgrady (Jim Grady) wrote…
These calls to
expect
are really testingconfigureStore
from@reduxjs/toolkit
. They are not needed before dispatchingdeleteWord
.This comment applies to the other tests as well.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)
Closes #1953
This change is