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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(split links): rewrite "MB: Paste multiple external links" to TypeScript, fix shortcomings #473
Conversation
The script is fully broken at the moment, and there are multiple issues that have been open for a while. Addressing these issues will possibly require many changes, so we may as well rewrite to TS along the way. Still some type errors, will be fixed later.
Also rewrote pretty much the whole thing. Ref: metabrainz/musicbrainz-server#2544
Codecov Report
@@ Coverage Diff @@
## main #473 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 46 46
Lines 1008 1020 +12
Branches 168 170 +2
=========================================
+ Hits 1008 1020 +12
Continue to review full report at Codecov.
|
e056541
to
56311be
Compare
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 have to admit that I have not installed this script because I rarely have multiple links to paste.
So I only left a few remarks and did not test 馃槆
Co-authored-by: David Kellner <52860029+kellnerd@users.noreply.github.com>
Thanks @kellnerd for the pointer.
refactor(split links): rewrite "MB: Paste multiple external links" to TypeScript, fix shortcomings (#473)
refactor(split links): rewrite "MB: Paste multiple external links" to TypeScript, fix shortcomings (#473)
refactor(split links): rewrite "MB: Paste multiple external links" to TypeScript, fix shortcomings (#473)
Why did it release new versions of ECAU and CAA Dims?? Edit Oh it's the input setter |
Another day, another TypeScript rewrite? This one became neglected ever since I first wrote it 馃槄
Fixes #471, root cause was metabrainz/musicbrainz-server#2544. Fix was easy enough, but I decided to get rid of the event listeners and instead wrap MB's methods to intercept the links and do all of the processing there. I also got rid of the
_reactInternals
hack and just used normal event dispatching.Fixes #43 (finally!) by moving the checkbox outside of the table so we don't have to delete and re-insert it all of the time.
Fixes #42: Now runs on all external links editors that I know of (edit pages, create/add pages, and inside of the nested iframe dialogs, also on the relationship editor).
Tested manually, no unit tests for this since I think an E2E test would be much better suited (whenever those arrive 馃檮)
Now back to neglecting this script for another year 馃檪