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

feat: new hook useSpeech #1378

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

malavshah9
Copy link

Hook description

Hook for playing text using the SpeechSynthesis API.

Valid use-case for the hook

  • Playing text when a component mounts.
  • Playing text when a component unmounts.
  • Playing text when a component receives new props.
  • Playing text when a component receives new state.
  • Playing text when a user clicks a button.
  • Playing text when a user hovers over an element.
  • Playing text when a user scrolls to a certain point on the page.
  • Playing text when a user types in an input.
  • Playing text when a user submits a form.
  • Playing text when a user presses a key.
  • Playing text when a user presses a key combination.
  • Playing text when a user presses a key combination and holds it down.

Checklist

@malavshah9
Copy link
Author

@JoeDuncko @xobotyi Please review this PR

@malavshah9
Copy link
Author

@JoeDuncko @xobotyi Please review this PR

@xobotyi
Copy link
Contributor

xobotyi commented Sep 21, 2023

ill review it sometime this week

@malavshah9
Copy link
Author

@xobotyi Any update on PR review?

src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
@malavshah9
Copy link
Author

@xobotyi Any update on review?

@xobotyi
Copy link
Contributor

xobotyi commented Oct 8, 2023

On review - no, tests - failing =)

@malavshah9
Copy link
Author

@xobotyi Fixed test cases. You can check now.

@malavshah9
Copy link
Author

@xobotyi Any update on this?

@codecov
Copy link

codecov bot commented Oct 15, 2023

Codecov Report

Merging #1378 (79ab0e9) into master (c898241) will decrease coverage by 1.17%.
Report is 40 commits behind head on master.
The diff coverage is 60.60%.

@@            Coverage Diff             @@
##           master    #1378      +/-   ##
==========================================
- Coverage   99.62%   98.46%   -1.17%     
==========================================
  Files          62       63       +1     
  Lines        1072     1105      +33     
  Branches      169      174       +5     
==========================================
+ Hits         1068     1088      +20     
- Misses          2       12      +10     
- Partials        2        5       +3     
Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)
src/useSpeech/index.ts 59.37% <59.37%> (ø)

... and 9 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

src/useSpeech/__docs__/story.mdx Outdated Show resolved Hide resolved
src/useSpeech/__tests__/dom.ts Outdated Show resolved Hide resolved
src/useSpeech/index.ts Outdated Show resolved Hide resolved
@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2023

youi also have to add the hook to radme. otherwise - looks good

@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2023

also linting is failing

@malavshah9
Copy link
Author

@xobotyi Added hook in readme.md

I checked linting but it is not failing. Let me know by which command it is failing.

@xobotyi
Copy link
Contributor

xobotyi commented Nov 2, 2023

You can see linting annotations within files tab of pull request.

Linter should be run with yarn lint command

@malavshah9
Copy link
Author

@xobotyi Fixed linting. You can check now.

@xobotyi
Copy link
Contributor

xobotyi commented Nov 6, 2023

you should also add tests for pausing resuming, etc. you should target 100% coverage and in this case is it easily achievable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants