Create new UITabBarItem instance on each bottomTab update (#6018)
Fix an issue where bottomTab.testID doesn't get updated on mergeOptions unless a new UITabBarItem is created. Look like an issue in iOS where tabBarItem.accessibilityIdentifier doesn't get updated unless a new tabBarItem is created.
Detach bottomTabPresenter from basePresenter (#5970)
Refactor bottomTabs options applying mechanism. Both bottomTab and bottomTabs presenters were part of the base UIViewController class which was wrong. This commits moves them to the BottomTabsController.
This refactor mostly contains the following
* Detach bottomTabPresenter from basePresenter
* Create tabBarItem appearance on presenter init
* Refactor bottomTabPresenter
* Refactor bottomTabPresenter
* Move appearance creation to bottomTabsController
* Merge child options with direct child controller
Apply topBar appearance options on current child navigationItem (#5994)
This commit changes how stack child options are applied on iOS 13. Until now, options were applied directly to the navigationItem of the stack which is shared between all children.
This commit applies options on the navigationItem of each child instead. This fixes issues with color transitions when popping and pushing children to the stack.
Move all topBar.title options to topBarTitlePresenter (#5883)
Fix TopBar title animation. This commit changes how RNN handles title and subtitle.
Until now, RNN created a custom view for title and subtitle which interfered with the way the system animated the TopBar title.
With this commit the custom view is created only when both subtitle and title are declared, otherwise RNN uses the system behavior.
* Migrate project to workspace
This commit moves all unit tests to the playground workspace
* Fix ios unit tests
* Build pods before testing
* Build typescript before running iOS tests
* Remove xcode 10 support
Break all the PRs :(
iOS and Android code base used different naming conventions - this commit aims to unify naming conventions. I probably missed a few properties here and there so this will be an ongoing effort.
* Enabled option was wrongly consumed after it was merged. That meant that the next time SideMenu options were applied, the wrong enabled value was applied
* supportedInterfaceOrientations didn't take default orientation value into account
* mergeOptions didn't save the new options in the ViewControllers current options
* SideMenu always returned the centre ViewController as the current child and didn't take open SideMenu into account
Fixes #5444
This commit adds initial support for passing null as a valid value for color properties.
When a color property is applied, if it wasn't specified then the default color is applied. Now, when null is passed, no color will be applied
leaving the last color applied as is.
This is useful when showing an Overlay and you'd like to keep the current StatusBar color unaffected. Another usecase would be when you'd like to avoid coloring an icon in BottomTabs.
* bind viewController to presenters using bindViewController
* Merge options to the specific provided layout
* Moved custom titleView creation to RNNRootViewController
* Moved default options to presenters, moved options applying to presenters, resolved options in RNNOptionsResolver
* Fixes merge options
* Fixes topBar transition on pop
* Prevent titleView creation when react titleView exists
* Fixed unit tests
* Options refactor WIP
* Detach applied options from DTO - WIP
* Added option types and option parsers
* Unit test passes
* Added presenters for each parent type
* Fixes unit tests
* Rename StringParam to Text, changed bottomTabs.drawBehind and topBar.drawBehind default to false
* set layout.backgroundColor default to white
* Added unit tests for RNNViewControllerPresenter
* Set layout.backgroundColor default nil
* Fixes buttons color missing options
* Fix unit test
* fix button color parsing
* Moved default options to presenters
* default options fixes
* Fixes e2e
* Fixes unit tests
* Resolve child options on childWillAppear
* Recrusively setDefaultOptions on rootViewController tree
* Fixes default values
* Fixes tests
* Renamed RNNRootViewProtocol to RNNParentProtocol and added RNNLeafProtocol
* fixed unit test
* Better options resolving
* Revert "Revert "Refactor options (#3962)""
This reverts commit c266041b85.
* Revert "Revert "Fixes shared element transition""
This reverts commit 005f039f7c.
* Revert "Revert "Adresses #3963 - stack options applied to children""
This reverts commit be09cb0e9a.
* Revert "Revert "Added unit test coverage for RNNNavigationController""
This reverts commit 199cebd221.
* Merge stack options
This commits adds support for merging stack options by the stack’s componentId
Also while I’m at it - use fade animation when setting root
* Merge BottomTabs options
Merge BottomTabs options when calling mergeOptions with BottomTabs componentId
* Fixes options
* Refactored bottomTab and bottomTabs
* Initial commit before switching to our fork of AHBottomNavigation
* Bump AHBottomNavigation version
* More work on BottomTab options
Need to merge some child options when a child is attached to parent
* Fix tests
* DefaultOptions refactor
* defaultOptions are now merged before applying options
* Handle BottomTab options in dedicated presenter
* Create BottomTabs in BottomTabsController.createView() instead of constructor
* Set bottomTab TypeFace
* Update Android installation guide
* fixed unit tests
* Fix unit tests
Kind of a workaround
* Handle NPE in getPreferredHeight
If a view hasn't been attached yet, return 0 height
* Apply BottomTab text and icon color individually
wix-playground/AHBottomNavigation does not support setting color for the entire tab (icon and text),
instead it supports setting color individually to text and icon. Another change is that it no longer supports
default color for icons. If icon color is undefined - it won't tint the icon.
* Add getCurrentChild to ParentController contract
* Clear backButton when setting stack root
* Add ViewController.resolveCurrentOptions
resolveCurrentOptions merges the controllers options with all of its current children
* StackController refactor
* Create pushed child view only in StackController.createView
* When initialising a stack with multiple children, only create the top child's view
* StackController constructor now accepts children
* When pushing child to stack, apply options that change LayoutParams
* Apply BottomTabs layout options when tab views are created
* bototmTab changes in iOS
* options fix
* Fixes options propagating
* setRoot({root:{}})
* support setRoot with root, modals, overlays
* Update setRoot calls in playground app to new api
* Update setRoot on Android to new api
currently only supporting root node
* Update setRoot on iOS to new api
* fix unit tests
* Refactor TopBar options, introduce title options
* Update background to new api
* Refactored topBar options on iOS
* Initial react component in TitleBar android
* set height to react view in TitleBar
* fix tests and lint
* ios unit tests fix