Skip to content

Support a “modal” prop for tabbed iOS apps#1578

Merged
yogevbd merged 15 commits into
wix:masterfrom
audubongit:feat-add-modal-tabs
May 2, 2018
Merged

Support a “modal” prop for tabbed iOS apps#1578
yogevbd merged 15 commits into
wix:masterfrom
audubongit:feat-add-modal-tabs

Conversation

@kevboh
Copy link
Copy Markdown
Contributor

@kevboh kevboh commented Jul 26, 2017

This adds support for a modal boolean prop when starting a tab-based app on iOS. If set to true, tapping that tab will not select it and instead emit a "modalTabSelected" event navigation event, which can be listened to in order to present a modal on tab tap (or do anything else, I suppose).

If there's a better/accepted way to do this already, please let me know and close this PR. Thanks.

@gvillenave
Copy link
Copy Markdown

+1, can we get this merged?

@guyca guyca mentioned this pull request Feb 22, 2018
@adnanbabar
Copy link
Copy Markdown

@kevboh Thank you so much for this!

I merged your pull into my Fork and it's working like a dream!

Hope your pull gets merged soon.

@guyca guyca added the v1 label Feb 22, 2018
Kevin Barrett added 2 commits March 14, 2018 07:45
@adnanbabar
Copy link
Copy Markdown

@guyca Any update on the merge for this, please?

Copy link
Copy Markdown

@wbyoung wbyoung left a comment

Choose a reason for hiding this comment

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

I'd like to see this as well. Thanks for the work & hopefully it gets merged.

The naming here doesn't really make all that much sense to me, though. The button isn't triggering a modal, it's instead simply never activating the screen. It's a nice building block for more than just modals, so I think it'd be far more clear to rename it to something other than modal, i.e. nonActivating.

Also, is there a reason that this shouldn't be implemented for Android as well?

Comment thread docs/top-level-api.md Outdated
navigatorStyle: {}, // override the navigator style for the tab screen, see "Styling the navigator" below (optional),
navigatorButtons: {} // override the nav buttons for the tab screen, see "Adding buttons to the navigator" below (optional)
navigatorButtons: {}, // override the nav buttons for the tab screen, see "Adding buttons to the navigator" below (optional)
modal: false // prevent tab selection and send a 'modalTabSelected' navigator event instead (optional)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This should contain iOS only for clarity.

@adnanbabar
Copy link
Copy Markdown

@guyca Any update on this, please??

yogevbd
yogevbd previously approved these changes Apr 24, 2018
@yogevbd yogevbd merged commit 5cd2972 into wix:master May 2, 2018
yogevbd added a commit that referenced this pull request May 2, 2018
yogevbd added a commit that referenced this pull request May 2, 2018
@sunb123
Copy link
Copy Markdown

sunb123 commented May 24, 2018

Can this be done in RNN V2?

chilinh added a commit to chilinh/react-native-navigation that referenced this pull request May 26, 2018
* r_master: (31 commits)
  Fix syntax error: "screen" is read-only (wix#3237)
  Revert "- Fixes freeze of passProps on iOS (wix#3220)" (wix#3222)
  - Fixes freeze of passProps on iOS (wix#3220)
  allows you to show a lightbox directly after dismissing on ios (wix#1466)
  Enable RTL support on LeftButton (wix#3154)
  Trigger build
  Prevent navBar header background transition in modals, fixes black background in modals navBar
  Link to root of movieapp repo (wix#3112)
  Test [skip ci]
  Revert "Support a “modal” prop for tabbed iOS apps (wix#1578)"
  Revert "fix build issue"
  fix build issue
  fixed a bug modal viewController was not deallocated when to call dismissAllModals (wix#2843)
  Support a “modal” prop for tabbed iOS apps (wix#1578)
  Add iPad landscape launch image (wix#2473)
  Now passing an activity to clearHostOnActivityDestroy (wix#3133)
  Change CI var env to JENKINS_CI
  Avoid NPR in SET (wix#3115)
  Update README.md
  Update README.md
  ...
@guyca
Copy link
Copy Markdown
Collaborator

guyca commented May 29, 2018

@sunb123 This will be supported in v2, tracking in #2766

@brenwell
Copy link
Copy Markdown

brenwell commented Jun 4, 2018

Is there an example usage anywhere?

@brenwell
Copy link
Copy Markdown

brenwell commented Jun 4, 2018

Was this reverted?

reimertz pushed a commit to mavencook/react-native-navigation that referenced this pull request Sep 14, 2018
* feat: support a “modal” prop for tabbed ios apps

* fix: apply temp fix for react-native-navigation#1502 (#1)

* fix: enable fab icon scaling (wix#2)

* v1.1.340 [ci skip]

* Update FloatingActionButtonCoordinator.java

* Update top-level-api.md

* Update package.json
reimertz pushed a commit to mavencook/react-native-navigation that referenced this pull request Sep 14, 2018
@ftognetto
Copy link
Copy Markdown

Hello, is there a way this will be merged and will work on android too?

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.