Skip to content

Conversation

@adids1221
Copy link

@adids1221 adids1221 commented Dec 1, 2025

Description

Adds iconBackground property support to backButton options, matching the functionality available for rightButtons and leftButtons.
This enables circular and rounded background shapes behind the back button icon, consistent with regular button styling.

Changes:

  • Added iconBackground?: IconBackgroundOptions; to OptionsTopBarBackButton TypeScript interface
  • Android: Parse and merge iconBackground in BackButton class, apply via ButtonPresenter.applyNavigationIcon()
  • iOS: Add iconBackground property to RNNBackButtonOptions, parse and merge, render using RNNIconDrawer

Technical Details:

  • Android: Reuses existing IconBackgroundDrawable infrastructure via applyIconBackgroundDrawable() method
  • iOS: Uses RNNIconDrawer directly (simpler approach, no need for full icon creator system), added one more case.
  • Both platforms support: color, disabledColor, cornerRadius, width, height properties

Changelog

BackButton - Added iconBackground property support. Back button icons can now display circular or rounded backgrounds matching the styling of regular navigation buttons.

Additional info

MADS-4884

markdevocht
markdevocht previously approved these changes Dec 7, 2025
@adids1221
Copy link
Author

@markdevocht, should I merge master already?
Or wait for the Shai Hulud fix?

Copy link
Collaborator

@d4vidi d4vidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks @adids1221!
Could you add a visual of some sort describing what you need?
Also, please be sure to add at least one visual (e2e) test to cover this use case 🙏🏻

@markdevocht @gosha212 let's discuss whether this is the right approach (=API) once we understand the use case better

@d4vidi d4vidi self-assigned this Dec 24, 2025
@adids1221 adids1221 requested a review from markdevocht January 14, 2026 14:34
@adids1221 adids1221 requested a review from d4vidi January 14, 2026 14:41
@adids1221
Copy link
Author

@markdevocht thank you for the help!

The issue solved by adding the if statment in RNNIconDrawer.
Added detox test as requested.

Copy link
Contributor

@markdevocht markdevocht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I saw @d4vidi left a comment in his review about finding another way of doing it.

UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

if (color && color != UIColor.clearColor) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the color != UIColor.clearColor

os: '15.5',
type: 'iPhone 16',
os: '18.2',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is your change? if so, make sure to update all the snapshots from the snapshot tests. BUT I don't think you should update this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted to your config.

@adids1221 adids1221 requested a review from markdevocht January 14, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants