Skip to content
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

Closed
wants to merge 16 commits into from

Conversation

hjpalpha
Copy link
Collaborator

@hjpalpha hjpalpha commented Jul 10, 2023

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:

How did you test this change?

dev

@mbergen
Copy link
Collaborator

mbergen commented Jul 14, 2023

so this explicitly allows only en as infix, why is that?
I misread the section that changes old keys to have the infix to it enforcing it.

@hjpalpha
Copy link
Collaborator Author

hjpalpha commented Jul 14, 2023

so this explicitly allows only en as infix, why is that?

no it doesn't only allow en as infix
i only used en in the example
inputs in old format (|youtube=, |twitch=) assume to be en though

@hjpalpha
Copy link
Collaborator Author

Question: should we only use non english ones in countdown module if no english stream is specified?

e.g.

  • if twitch_en_1 and twitch_de_1are set they both would be stored (for e.g. the app) but only the english one would be shown on the wiki
  • but if only twitch_de_1 is set it would show the german broadcast since no broadcast in preferred language (en) is given

would allow more precise data without cluttering up display (and would also reduce js runtime compared to displaying them all)

@mbergen
Copy link
Collaborator

mbergen commented Jul 25, 2023

Question: should we only use non english ones in countdown module if no english stream is specified?

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.

@iMarbot
Copy link
Collaborator

iMarbot commented Oct 26, 2023

Question: should we only use non english ones in countdown module if no english stream is specified?

e.g.

  • if twitch_en_1 and twitch_de_1are set they both would be stored (for e.g. the app) but only the english one would be shown on the wiki
  • but if only twitch_de_1 is set it would show the german broadcast since no broadcast in preferred language (en) is given

would allow more precise data without cluttering up display (and would also reduce js runtime compared to displaying them all)

I agree with this :D

@hjpalpha
Copy link
Collaborator Author

hjpalpha commented Nov 2, 2023

added countdoen module and made it so that countdown module only displays english streams if english streams are set
so that language streams are only stored (as data for e.g. the app)

standard/countdown.lua Show resolved Hide resolved
standard/countdown.lua Outdated Show resolved Hide resolved
@iMarbot
Copy link
Collaborator

iMarbot commented Jan 4, 2024

Comment for future hjpa :p

@hjpalpha
Copy link
Collaborator Author

hjpalpha commented Jan 4, 2024

for myself in a few weeks:

  • kick the legacy stuff
  • add the js changes

@hjpalpha hjpalpha requested a review from iMarbot January 23, 2024 12:53
@hjpalpha hjpalpha added the stylesheets changes to stylesheets label Jan 23, 2024
standard/links_stream.lua Outdated Show resolved Hide resolved
@hjpalpha hjpalpha requested a review from Rathoz January 23, 2024 19:21
standard/links_stream.lua Outdated Show resolved Hide resolved
@hjpalpha hjpalpha requested a review from Rathoz January 24, 2024 09:31
@hjpalpha hjpalpha added javascript Changes to JavaScript files and removed stylesheets changes to stylesheets labels Jan 25, 2024
@iMarbot
Copy link
Collaborator

iMarbot commented Mar 5, 2024

Can we decide whether it's going to be afreeca or afreecatv btw? Currently it's a bit of a mess.

@hjpalpha
Copy link
Collaborator Author

hjpalpha commented Mar 5, 2024

Can we decide whether it's going to be afreeca or afreecatv btw? Currently it's a bit of a mess.

i don't particularly care
just keep in mind that it will potentionally break old pages

@iMarbot
Copy link
Collaborator

iMarbot commented Mar 5, 2024

i don't particularly care just keep in mind that it will potentionally break old pages

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.

@hjpalpha
Copy link
Collaborator Author

hjpalpha commented Mar 5, 2024

i don't particularly care just keep in mind that it will potentionally break old pages

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
just should do the announcement of it not working anymore a few days before pushing live imo

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>' );
Copy link
Collaborator

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?

javascript/commons/Countdown.js Outdated Show resolved Hide resolved
Co-authored-by: mbergen <mail@mbergen.de>
@hjpalpha
Copy link
Collaborator Author

superseded by #4372

@hjpalpha hjpalpha closed this Jun 26, 2024
@hjpalpha hjpalpha deleted the streams-in-matches branch July 12, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: standard javascript Changes to JavaScript files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants