-
Notifications
You must be signed in to change notification settings - Fork 10
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
refactor: more TypeScript migration #499
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #499 +/- ##
===========================================
- Coverage 98.48% 74.34% -24.15%
===========================================
Files 58 63 +5
Lines 1385 1863 +478
Branches 220 293 +73
===========================================
+ Hits 1364 1385 +21
- Misses 13 462 +449
- Partials 8 16 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Just wanted to remember you, that there already is https://github.com/ROpdebee/mb-userscripts/tree/wip-blind-edits-rewrite |
Yeah, that's a pretty big rewrite though. I'd like to get back to that eventually, but here I'm just focusing on refactoring them enough to get them to pass typechecking, linting, building and eventually deploying. Also, I don't like bulk copy work codes' implementation. Very messy. 😅 Edit Oooh boy, Supercharged is 1000 lines of pain 😢 Less pain than the work codes, but still pain. Especially that jQuery UI widget. |
I didn't remove jQuery in the artwork comparison dialog, because it uses jquery-ui and because I'm afraid I'll break something. More jQuery removal is probably something we should do later, but I've decided against doing it in this migration pass. I also updated all dependencies.
76e361f
to
f419257
Compare
Makes sense to ship both of these in the same script. Not convinced of the new name though.
/deploy-preview |
This PR changes 9 built userscript(s):
|
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
I've superficially tested all of these, and tested Supercharged in a bit more depth because the changes were a bit more complicated there. Seems to work fine on my end, but I suggest leaving this open for a while longer to make sure there are no regressions. I'll probably post in the forums too to ask people to try out the previews and report any regressions. |
The selector query was broken for video tracks.
/deploy-preview with latest fixes |
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
e43f8e6
to
5cfe324
Compare
fced6f0
to
a13b841
Compare
Co-authored-by: David Kellner <[email protected]>
src/mb_work_code_toolbox/index.ts
Outdated
document.querySelectorAll('iframe').forEach((iframe) => { | ||
if (!iframe.contentWindow) return; | ||
|
||
onWindowLoaded(() => { |
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.
How the hell did this ever work in the rewritten version? We're asynchronously adding stuff to an array but then consuming the array synchronously 🤦
Noting for later: Supercharged is missing some separator on release events, c227924 wasn't a good fix.
|
pretty brute force, needs to be checked again in the future. but chances are i'll just drop all of these commits and split the whole PR anyway. Just need to do some quick fixes.
/deploy-preview let's see if this still works? We need to regenerate CAA Dimensions because the preview version was probably updated to a more recent main release while Supercharged is still expecting the new interface (it's very messy currently). |
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
refactor: more TypeScript migration (#499)
I'm not refactoring these a lot (yet), just migrating to TypeScript so we can benefit from all the benefits. Also removing jQuery where possible (mainly because I've already removed it from the dependencies and don't want to re-add it). Migrating to JSX where it makes sense too. And fixing linter warnings, of course.
Coverage is probably going to take a nosedive but it was a lie anyway. I've tested the new versions manually to ensure they still work.
mb_blind_votes.user.js
mb_bulk_copy_work_codes.user.js
mb_qol_inline_recording_tracks.user.js
mb_qol_seed_recording_disambiguation.user.js
mb_qol_select_all_update_recordings.user.js
mb_supercharged_caa_edits.user.js
mb_validate_work_codes.user.js
I'll probably merge
validate work codes
intobulk copy work codes
and rename the latter too.