react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

Bottom tab Badge style

Open swabbass opened this issue 3 years ago • 6 comments

Changes:

  • transform old options for new badge options (backwards compatibility).
  • add new Options with textColor, Closes: #6889.
  • Android native side implemented.
  • updated docs and deprecations.
  • IOS in progress...

Old way (deprecated):

  Navigation.mergeOptions(this.props.componentId, {
      bottomTab: {
        badgeColor: 'red',
        badge: 'hello',
      },
    });

New way:

  Navigation.mergeOptions(this.props.componentId, {
      bottomTab: {
        badge: {
          text: 'content',
          textColor: 'green',
          backgroundColor: 'blue',
        },
      },
    });

Demo

https://user-images.githubusercontent.com/7227793/108303324-65bc0080-71ae-11eb-8fec-04b71a1dc703.mov

swabbass avatar Feb 18 '21 03:02 swabbass

What's the status for this PR? Super excited for it 🚀

lindesvard avatar Jun 30 '21 08:06 lindesvard

What's the status for this PR? Super excited for it 🚀

It is waiting for iOS, implementation, unfortunately, we got a couple of high priority stuff to deal with, but if you want to contribute or know someone who wants to, we will be glad to give you a hand.

swabbass avatar Jun 30 '21 10:06 swabbass

It is waiting for iOS, implementation, unfortunately, we got a couple of high priority stuff to deal with, but if you want to contribute or know someone who wants to, we will be glad to give you a hand.

Thanks for the fast reply! Understand that you're busy. I'm just glad that you looking at this issue.

Whats left on the iOS side? Because I thought both were done when I glanced at the changed files. Can see if our iOS developer have some time over!

lindesvard avatar Jul 02 '21 08:07 lindesvard

It is waiting for iOS, implementation, unfortunately, we got a couple of high priority stuff to deal with, but if you want to contribute or know someone who wants to, we will be glad to give you a hand.

Thanks for the fast reply! Understand that you're busy. I'm just glad that you looking at this issue.

Whats left on the iOS side? Because I thought both were done when I glanced at the changed files. Can see if our iOS developer have some time over!

Thanks, :], yeah sure I "wrote" the ios part (as a rookie), it has a small bug and maybe a couple of final touches. The bug is, same js code need to be called twice in order to make badge changes like colour/text..., on ios only, the native side of ios is similar to android though, I'm really sure that experienced ios dev will catch it right away, it might be something I'm missing with the "UI thread" on ios :]

swabbass avatar Jul 02 '21 12:07 swabbass

@swabbass can you also add badge.fontSize and badge.fontFamily options for more flexible customization?

tyson90 avatar May 13 '22 12:05 tyson90

+1

xgenem avatar Mar 15 '23 19:03 xgenem