player-ui / player

Home Page:https://player-ui.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Core: Transform reference action asset role

hborawski opened this issue · comments

The reference react action asset currently renders a < icon when the value of the action indicates that the user would go backwards in the flow. Rather than have assets on each platform implement this check, we can move it into the transform and expose a generic property in the action metadata to make the coupling between icon and value looser.

  • Move logic for determining isBackAction into the action transform and populate a role property in the metaData when applicable.

  • Update the react asset to use metaData.role instead of checking the value directly.

Hi @hborawski
I am interested in working this feature of player. Can you assign me this and it's references ?

@abhisheksrivastava177 do you have a fix for this issue?
Hey @mercillo , I can have a crack at it if @abhisheksrivastava177 does not have a fix

Working on it now

Hey @hborawski and @mercillo , a quick question. If we add a ref property in the asset then going ahead all the FRF can specify that if they need an icon or not. For the already implemented back button, we need to make sure they keep showing the icon. Is that what the transform would be used for? Is it to make sure the changes are backward compatible with older back buttons.

I think previously, we're only checking to see if the value contains Prev to see if its a back button.
but if the value contains Prev we can add the metadata in the transform

metaData: { "role": "back}

Yes this is to consolidate existing logic, not to add arbitrary icons to the action asset