Refactor WebLinkMatcher.ts and add additional.#1924
Conversation
# ExtLinks.css: - Re-order ExtLinks.css by logo image name alphabetically. - - With exception for those those that have a logo in a different repository, move those to the top. - Clean up usage of background-image vs background. - Fix icon matching with links that only matched to http:// to also work with https:// - Add icon matching with links that did have icons, but were not being used. - Add additional icon matching with new icons (see: VocaDB/ExtIcons#7) - Icon matching via ^ match or * match has been left mostly the same, could still be a discussion point. - Clean up styling. # WebLinkMatcher.ts - Add additonal Weblink matchers relating to VocaDB/ExtIcons#7
Susko3
left a comment
There was a problem hiding this comment.
To me, this PR is impossible to review. It's possible that you accidentally changed a link category or dropped some icon. It would be way easier to check that if this PR was split into separate commits that do one of the steps you mention in the description.
Also, every line in the diff is marked as changed, even if it remained the same. Have the line-endings accidentally been changed? Maybe make the line-ending change a separate commit, or don't do it. https://docs.github.com/en/get-started/git-basics/configuring-git-to-handle-line-endings
Seems like the project is operating with LF line endings which automatically got converted to CRLF on my end. That last one's still going to be a pain to review just by nature of sorting all of the ExtLinks alphabetically. |
Some matchers would only match with http or https URLs.
…t where neccesary.
- bsky - dojin-music
| background-image: url('/Content/ExtIcons/ototoy.png'); | ||
| } | ||
|
|
||
| a.extLink[href^='http(s?)://potune.jp/'] |
There was a problem hiding this comment.
I have also removed the incorrect a.extLink[href^='http://ototoy.jp/'] here.
See: VocaDB/ExtIcons#7 - ah-soft - ai-voice - bandlab - dreamtonics - genius - github - marshmallow-qa - musixmatch - project sekai fandom wiki - reddit - voicevox - voisona
|
PR updated and everything is now split into separate commits. Something to note: |
Susko3
left a comment
There was a problem hiding this comment.
I've checked that the individual commits make changer per their description. Everything else seems fine, apart from the following:
- Re-add accidentally removed link matchers. - Fix brace.
| } | ||
|
|
||
| /* image outside of ExtIcons folder because it is also used elsewhere*/ | ||
| a.extLink[href^='http(s?)://soundcloud.com/'], |
There was a problem hiding this comment.
Have you tested this? Regex doesn't seem to be supported in CSS attribute selectors.
I suggest you either
a) go back to separate http:// and https://
b) change the matcher to be [href*='://soundcloud.com/'] (anywhere in url, but including :// to avoid false-positives)
There was a problem hiding this comment.
Went with b as to not have unnecessary duplication.
|
Whoops, the review went wrongly, just search for "?" and you'll see the problems. |
|
Got them! |
FinnRG
left a comment
There was a problem hiding this comment.
Thank you both for your work on this.

ExtLinks.css:
WebLinkMatcher.ts