-
Notifications
You must be signed in to change notification settings - Fork 68
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
Allow new stream key format as input in matches #3111
Conversation
|
no it doesn't only allow |
Question: should we only use non english ones in countdown module if no english stream is specified? e.g.
would allow more precise data without cluttering up display (and would also reduce js runtime compared to displaying them all) |
For stuff like matchtickers that seems reasonable, but IMO all entered streams should be shown on matches, maybe inside something collapsible to not take up as much space by default. Otherwise this will lead to editors forgetting to add these, or try to add these, but won't notice in case they are added incorrect. |
I agree with this :D |
added countdoen module and made it so that countdown module only displays english streams if english streams are set |
Comment for future hjpa :p |
for myself in a few weeks:
|
- since we now have it on the git ... :) - retested on the other commons (changed from es5 to es2017 compared to what was mentioned in the PR summary)
8609438
to
d0e76ce
Compare
Can we decide whether it's going to be |
i don't particularly care |
Countdown doesn't show streams on finished matches (old pages) anyway? But we could just do a remapping in one place before everything else, no? i.e. like how you had it in the crossed out module:countdown changes in OP. |
totally fine with dropping one entirely |
const icon = streamKeys[ dataSetName ]; | ||
const platform = dataSetName.toLowerCase(); | ||
if ( timerObjectNode.dataset[ 'stream' + dataSetName ] ) { | ||
streamsarr.push( '<a href="' + mw.config.get( 'wgScriptPath' ) + '/Special:Stream/' + platform + '/' + liquipedia.countdown.getStreamName( timerObjectNode.dataset[ 'stream' + dataSetName ] ) + '"><i class="lp-icon lp-icon-21 lp-' + icon + '"></i></a>' ); |
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.
Maybe extract the string building into a function that takes icon, dataSetName and index as parameter?
Co-authored-by: mbergen <mail@mbergen.de>
superseded by #4372 |
Summary
Currently matches do not accept stream keys in the form of
twitch_en_1
.Additionally in
Module:Countdown
the lines 36-49 are redundant, they do nothing except increase runtime (it processes new keys but pushes them with the same key again into the args table so factually no change accomplished).And on discord there was the question about allowing >1 stream per platform in match countdowns.
Additional changes that i would push after this PR got merged:https://liquipedia.net/commons/index.php?title=Module%3ACountdown%2Fdev&type=revision&diff=503976&oldid=503648 (lines 36-49 are redundant, they do nothing except increase runtime (it processes new keys but pushes them with the same key again into the args table so factually no change accomplished))https://secret.liquipedia.net/commons/index.php?title=MediaWiki%3ACommon.js%2FCountdown.js&type=revision&diff=5213&oldid=5176 (you know what to replace thesecret
with^^)How did you test this change?
dev
mind the broken logos are because secret commons is "slightly outdated" and are unrelated to my suggested changes