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
Milestone 1.3.2: Import WaveSurfer using yarn and add typedefs for it #9279
Conversation
Assigning @vojtechjelinek for the first-pass review of this pull request. Thanks! |
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.
Nice! Thanks, LGTM!
@kevinlee12 @kevintab95 @DubeySandeep @aks681 @marianazangrossi PTAL |
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.
Lgtm for the one codeowner file.
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.
lgtm!
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.
LGTM for code-owner file. Thanks @nishantwrp!
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.
LGTM from code-owner's perspective, Thanks @nishantwrp!
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.
@nishantwrp, Thanks for the PR, I have left a few questions for the changes below, PTAL!
@@ -48,7 +48,8 @@ require('services/context.service.ts'); | |||
require('services/editability.service.ts'); | |||
require('services/id-generation.service.ts'); | |||
require('services/user.service.ts'); | |||
const WaveSurfer = require('third-party-imports/wave-surfer.import.ts'); | |||
|
|||
import WaveSurfer from 'wavesurfer.js'; |
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.
Do wee need parenthesis around WaveSurfer
?
Also, can you please share the image of the audio waves in the translation tab after this change?
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.
package.json
Outdated
@@ -112,6 +112,7 @@ | |||
"gifshot": "^0.4.5", | |||
"lodash": "^4.17.14", | |||
"mathjs": "^6.6.4", | |||
"moment": "^2.24.0" | |||
"moment": "^2.24.0", | |||
"wavesurfer.js": "^3.3.3" |
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.
Can you please test this feature thoroughly (as you update the version from 2.2.1 to 3.3.3)?
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.
The translation was being played correctly. What other things do I need to test?
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.
Slider bar, rendering, check the console, wave for small audio wave for big audio (intime or size). etc.
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.
Actually I’m not sure about the expected behaviour. Can you do that please?
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.
Btw, can you set it to "3.3.3"
without ^
so that it doesn't get updated automatically and the coherence with the type definitions is kept.
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.
Done
typings/wavesurfer-defs.d.ts
Outdated
@@ -0,0 +1,73 @@ | |||
// Code - https://raw.githubusercontent.com/katspaugh/wavesurfer.js/master/src/wavesurfer.js |
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.
Wanted to check whether we need to update this whenever we update the wave surfer version?
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.
Yup, will add a lint check later on for this too.
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.
Do we have any (github) issue for that? Also, how would we catch this till we have this check?
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.
Ah, actually the lint check will not check that the code link is correct. It will be there so that the dev is aware that the type defs were for a previous version and they may have changed now.
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.
Still, my question persists i.e, until we don't have that "warning through lint checks" how would we catch this during any update?
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.
I guess we can do that manually, as I don't think type defs would be updated so frequently.
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.
@DubeySandeep Since I'm mostly responsible for library upgrades I can make sure that the type definitions are correct until we have the lint check.
typings/wavesurfer-defs.d.ts
Outdated
@@ -0,0 +1,73 @@ | |||
// Code - https://raw.githubusercontent.com/katspaugh/wavesurfer.js/master/src/wavesurfer.js |
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.
Also, why are we using the master branch file here? Should we use this file from v3.3.3?
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.
Oh, yeah correct. 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.
Have you tested the type.defs with the file in v3.3.3 (as it can be different from master branch)?
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.
Yup! Did that just now.
@DubeySandeep Addressed your comments. PTAL! |
@DubeySandeep @marianazangrossi PTAL |
Codecov Report
@@ Coverage Diff @@
## develop #9279 +/- ##
===========================================
- Coverage 53.54% 53.54% -0.01%
===========================================
Files 875 874 -1
Lines 36278 36284 +6
Branches 4295 4295
===========================================
+ Hits 19424 19425 +1
- Misses 15908 15913 +5
Partials 946 946
|
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.
LGTM as codeowner!
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.
@nishantwrp, Just a last few minor comments, PTAL!
@@ -112,6 +112,7 @@ | |||
"gifshot": "^0.4.5", | |||
"lodash": "^4.17.14", | |||
"mathjs": "^6.6.4", | |||
"moment": "^2.24.0" | |||
"moment": "^2.24.0", | |||
"wavesurfer.js": "3.3.3" |
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.
Can you please create an issue to add '^` here once we have the warning functionality? [This will help us to track this task]
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.
Done #9287
typings/wavesurfer-defs.d.ts
Outdated
@@ -0,0 +1,81 @@ | |||
// Code (Release 3.3) - https://github.com/katspaugh/wavesurfer.js/blob/4421b44e205c76359407ae995dcb8b8453f903a1/src/wavesurfer.js |
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.
Release 3.3.3*
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.
Done!
typings/wavesurfer-defs.d.ts
Outdated
@@ -0,0 +1,81 @@ | |||
// Code (Release 3.3) - https://github.com/katspaugh/wavesurfer.js/blob/4421b44e205c76359407ae995dcb8b8453f903a1/src/wavesurfer.js |
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.
Should we use this URL: https://raw.githubusercontent.com/katspaugh/wavesurfer.js/3.3.3/src/wavesurfer.js
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.
Done!
Overview
1. This PR fixes or fixes part of #[fill_in_number_here].#63512. This PR does the following: Import WaveSurfer using yarn
Essential Checklist
PR Pointers