Problem
ActionableItemButtons took its buttons as a serialized items: ActionableItem[] array and rendered them itself. That config-object indirection meant every caller had to build an array of {key, text, onPress, isPrimary} descriptors, push entries conditionally, and thread presentation concerns back through the component as props — shouldUseLocalization, primaryTextNumberOfLines, and a styles: {text, button} bag. The component also owned localization, calling translate(item.text as TranslationPaths) behind a boolean flag, which required an unsafe cast and left each call site unable to render anything a plain Button descriptor could not express.
Solution
Convert ActionableItemButtons to composition: it now accepts children and only owns layout, keeping layout (horizontal / vertical) plus a single style prop and dropping items, shouldUseLocalization, primaryTextNumberOfLines, the styles bag, and the exported ActionableItem type. Each of the six call sites in src/pages/inbox/report/actionContents/ now renders ButtonComposed children directly with <Button.Text>{translate(...)}</Button.Text>, so localization happens at the call site with properly typed keys, conditional buttons become ordinary JSX conditionals instead of array pushes, and per-button styling no longer travels through the container. Net effect is 409 additions against 388 deletions across 7 files with no user-visible change.
PR
#97905
Issue Owner
Current Issue Owner: @ZhenjaHorbach
Problem
ActionableItemButtonstook its buttons as a serializeditems: ActionableItem[]array and rendered them itself. That config-object indirection meant every caller had to build an array of{key, text, onPress, isPrimary}descriptors, push entries conditionally, and thread presentation concerns back through the component as props —shouldUseLocalization,primaryTextNumberOfLines, and astyles: {text, button}bag. The component also owned localization, callingtranslate(item.text as TranslationPaths)behind a boolean flag, which required an unsafe cast and left each call site unable to render anything a plainButtondescriptor could not express.Solution
Convert
ActionableItemButtonsto composition: it now acceptschildrenand only owns layout, keepinglayout(horizontal/vertical) plus a singlestyleprop and droppingitems,shouldUseLocalization,primaryTextNumberOfLines, thestylesbag, and the exportedActionableItemtype. Each of the six call sites insrc/pages/inbox/report/actionContents/now rendersButtonComposedchildren directly with<Button.Text>{translate(...)}</Button.Text>, so localization happens at the call site with properly typed keys, conditional buttons become ordinary JSX conditionals instead of array pushes, and per-button styling no longer travels through the container. Net effect is 409 additions against 388 deletions across 7 files with no user-visible change.PR
#97905
Issue Owner
Current Issue Owner: @ZhenjaHorbach