Skip to content

Conversation

@raotaohub
Copy link
Contributor

rewritten according to components/progress.tsx

@vercel
Copy link

vercel bot commented Jun 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aplayer-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 6:04am

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 4, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 908c8c7:

Sandbox Source
aplayer-react-demo Configuration

@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Merging #22 (40e47a6) into master (52271e0) will decrease coverage by 0.05%.
The diff coverage is 14.28%.

❗ Current head 40e47a6 differs from pull request most recent head 908c8c7. Consider uploading reports for the commit 908c8c7 to get more accurate results

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
- Coverage   26.33%   26.29%   -0.05%     
==========================================
  Files          17       18       +1     
  Lines        1257     1316      +59     
  Branches       46       48       +2     
==========================================
+ Hits          331      346      +15     
- Misses        925      969      +44     
  Partials        1        1              
Impacted Files Coverage Δ
src/components/controller.tsx 0.00% <0.00%> (ø)
src/components/volume.tsx 0.00% <0.00%> (ø)
src/utils/computePercentage.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Owner

@SevenOutman SevenOutman left a comment

Choose a reason for hiding this comment

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

Hi @raotaohub, thanks for refreshing this edit to be up-to-date with the latest codebase! The changes look good to me, but there're still some minor changes I would like you to make.

return (
<div
className={clsx("aplayer-volume-wrap", {
"aplayer-volume-bar-wrap-active": isDragging,
Copy link
Owner

Choose a reason for hiding this comment

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

aplayer-volume-bar-wrap-active class does not seem necessary here. It's already added on the .aplayer-volume-bar-wrap element.

volume: number;
muted: boolean;
onToggleMuted: () => void;
onChangeVolume: (vaolume: number) => void;
Copy link
Owner

Choose a reason for hiding this comment

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

A typo.

Suggested change
onChangeVolume: (vaolume: number) => void;
onChangeVolume: (volume: number) => void;

Comment on lines 24 to 36
test("Return 0 if volumeBarRef.current is undefined", () => {
expect(
computePercentageOfY(new MouseEvent("mousedown"), {
current: null,
})
).toBe(0);
expect(
computePercentageOfY(new MouseEvent("mousedown"), {
current: null,
})
).toBe(0);
expect(
computePercentageOfY(new MouseEvent("mousedown"), {
current: null,
})
).toBe(0);
});

Copy link
Owner

Choose a reason for hiding this comment

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

As there's more than one functions being test here, please group their tests accordingly using the describe API, so that the tests look clearer.

@raotaohub
Copy link
Contributor Author

hi @SevenOutman .
Thanks for pointing out , now corrected.(used rabase)

Copy link
Owner

@SevenOutman SevenOutman left a comment

Choose a reason for hiding this comment

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

LGTM now, thanks!

@SevenOutman SevenOutman merged commit 60fd80e into SevenOutman:master Jun 6, 2023
@github-actions
Copy link

github-actions bot commented Jun 6, 2023

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants