-
-
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
Implement Pronunciations state/actions/reducer. #847
Conversation
…r stand-alone Pronunciations state.
src/components/Pronunciations/AudioPlayer.tsx, line 81 at r1 (raw file):
Rider noticed a |
src/components/Pronunciations/AudioPlayer.tsx, line 47 at r1 (raw file):
Do we want to be using
|
src/components/Pronunciations/AudioPlayer.tsx, line 181 at r1 (raw file):
This could be simplified to:
|
src/components/Pronunciations/PronunciationsReducer.tsx, line 22 at r1 (raw file):
I'm not sure how we feel about fall-through
|
src/components/Pronunciations/PronunciationsReducer.tsx, line 32 at r1 (raw file):
Same down here with |
Functionally, this worked well and I didn't experience the issues from #330. |
Codecov Report
@@ Coverage Diff @@
## master #847 +/- ##
==========================================
+ Coverage 51.35% 51.36% +0.01%
==========================================
Files 238 240 +2
Lines 6605 6621 +16
Branches 419 422 +3
==========================================
+ Hits 3392 3401 +9
- Misses 2902 2909 +7
Partials 311 311
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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: 0 of 12 files reviewed, 2 unresolved discussions (waiting on @imnasnainaec and @johnthagen)
src/components/Pronunciations/AudioPlayer.tsx, line 47 at r1 (raw file):
Previously, johnthagen wrote…
Do we want to be using
undef
everywhere in TypeScript, or is there a reason we neednull
in this case?
undef
plays nicer with?
done
src/components/Pronunciations/AudioPlayer.tsx, line 81 at r1 (raw file):
Previously, johnthagen wrote…
Rider noticed a
Promise
here is ignored. Is that okay? Anythingasync
we want to do here?
done
src/components/Pronunciations/AudioPlayer.tsx, line 181 at r1 (raw file):
Previously, johnthagen wrote…
This could be simplified to:
<ButtonConfirmation open={deleteConf} textId="buttons.deletePermanently" titleId="pronunciations.deleteRecording" onClose={() => setDeleteConf(false)} onConfirm={deleteAudio} />
done
src/components/Pronunciations/PronunciationsReducer.tsx, line 22 at r1 (raw file):
Previously, johnthagen wrote…
I'm not sure how we feel about fall-through
case
s, but this could be simplified to:case PronunciationsStatus.Playing: case PronunciationsStatus.Recording: return { ...defaultState, ...action, };
done
src/components/Pronunciations/PronunciationsReducer.tsx, line 32 at r1 (raw file):
Previously, johnthagen wrote…
Same down here with
Default
andRESET
.
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 12 of 12 files at r1, 1 of 2 files at r2, 1 of 1 files at r3.
Reviewable status: complete! all files reviewed, all discussions resolved
Extract recording from ReviewEntries state and expand with playing for stand-alone Pronunciations state.
With this pr, clicking any play or record icon will halt an active recording.
Resolves #330
This change is