sillsdev / TheCombine

This is a tool for supporting the rapid word collection workshop and post workshop clean-up
https://sillsdev.github.io/TheCombine/
MIT License
17 stars 13 forks source link

Prevent cross-entry recording interference #3157

Closed imnasnainaec closed 3 hours ago

imnasnainaec commented 1 month ago

Resolves #3151

(Had some failing unit tests; fixed by #3156)


This change is Reviewable

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 28.12500% with 23 lines in your changes missing coverage. Please review.

Project coverage is 74.80%. Comparing base (12f00ab) to head (a385e9e).

Files Patch % Lines
src/components/Pronunciations/Recorder.ts 0.00% 12 Missing :warning:
src/components/Pronunciations/AudioRecorder.tsx 0.00% 8 Missing :warning:
src/components/Pronunciations/RecorderIcon.tsx 75.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3157 +/- ## ========================================== - Coverage 74.83% 74.80% -0.04% ========================================== Files 277 277 Lines 10622 10636 +14 Branches 1270 1276 +6 ========================================== + Hits 7949 7956 +7 - Misses 2310 2316 +6 - Partials 363 364 +1 ``` | [Flag](https://app.codecov.io/gh/sillsdev/TheCombine/pull/3157/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sillsdev) | Coverage Δ | | |---|---|---| | [backend](https://app.codecov.io/gh/sillsdev/TheCombine/pull/3157/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sillsdev) | `83.92% <ø> (+0.06%)` | :arrow_up: | | [frontend](https://app.codecov.io/gh/sillsdev/TheCombine/pull/3157/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sillsdev) | `66.74% <28.12%> (-0.10%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sillsdev#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jasonleenaylor commented 3 hours ago

src/components/Pronunciations/Recorder.ts line 23 at r2 (raw file):

   * If so, returns the `id` used with `startRecording()`.
   * If not, returns `undefined`. */
  isRecording(): string | undefined {

currentRecordingId or getActiveRecorder or getRecorderId - functions that start with is are expected to return a bool value.