You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since PR #1686, overriding a default action is easy, you just need to write a block.click for the same button.
There were many elements that made me think that you could also override the default action for a specific part or write a new action or cmd for a specific part:
Presence of the widget key for [[block.click]] in the blocks doc.
@MaxVerevkin explaining his idea for widget_key+named_arguments in 2 merged PR conversations here and here.
The fact that default blocks can already specify click actions to some parts.
But, apparently the widget key in [[block.click]] is not implemented or need more documentation, when I use it, the action or cmd are not applied, even on existing parts like prev, play...
I tried with names arguments too (.str(name:'player')) but it makes the configuration fail.
Following @MaxVerevkin, this is what i'd like to do for the music block:
But, apparently the widget key in [[block.click]] is not implemented or need more documentation, when I use it, the action or cmd are not applied, even on existing parts like prev, play...
I tried with names arguments too (.str(name:'player')) but it makes the configuration fail.
Yeah, the name: ... was just an idea and nothing more. It would be convenient to use the placeholder name in widget field of click handler, but I didn't implement it because it would produce even more JSON blocks.
Technically prev, play and other "buttons" do have names, but they are undocumented and should not be relied on.
So yes, the widget key is sort of useless right now.
Since PR #1686, overriding a default action is easy, you just need to write a
block.click
for the samebutton
.There were many elements that made me think that you could also override the default action for a specific part or write a new
action
orcmd
for a specific part:widget
key for[[block.click]]
in the blocks doc.widget_key+named_arguments
in 2 merged PR conversations here and here.But, apparently the
widget
key in [[block.click]] is not implemented or need more documentation, when I use it, theaction
orcmd
are not applied, even on existing parts likeprev
,play
...I tried with names arguments too (.str(name:'player')) but it makes the configuration fail.
music
block:The text was updated successfully, but these errors were encountered: