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

[Recorder] Add backstops for if cursor departs button #3077

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Apr 24, 2024

Mostly fixes #3073

Pro: If the record button is clicked/pressed while a previous recording is still active, that previous recording is finished before a new one is started.
Con: If the record button is clicked/tapped just to end a recording that is still going, a second recording blip will also be created (but at least that is easily deleted).

Pro: If focus shifts away from the button, that will also activate the end of the recording. This works if a user clicks elsewhere.
Con: This doesn't always work if the user taps/presses elsewhere, because the initial recording touch doesn't consistently shift focus to the button in the first place.


This change is Reviewable

@imnasnainaec imnasnainaec added bug Something isn't working frontend audio labels Apr 24, 2024
@imnasnainaec imnasnainaec self-assigned this Apr 24, 2024
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 75.10%. Comparing base (576733e) to head (63fbed3).

Files Patch % Lines
src/components/Pronunciations/AudioRecorder.tsx 0.00% 4 Missing ⚠️
src/components/Pronunciations/Recorder.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3077      +/-   ##
==========================================
- Coverage   75.12%   75.10%   -0.03%     
==========================================
  Files         269      269              
  Lines       10373    10378       +5     
  Branches     1227     1228       +1     
==========================================
+ Hits         7793     7794       +1     
- Misses       2219     2224       +5     
+ Partials      361      360       -1     
Flag Coverage Δ
backend 84.05% <ø> (+0.02%) ⬆️
frontend 66.88% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a safe step in the right direction, the first Con seems not ideal but it will interact with the improvement @jmgrady was considering of displaying a message and removing accidental recordings. I'm not sure if the interaction will be useful or confusing.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit bf97594 into master Apr 25, 2024
18 checks passed
@imnasnainaec imnasnainaec deleted the record-wander branch April 25, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio bug Something isn't working frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AudioRecorder] Recording fails if click/touch ends outside of the button
2 participants