Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change modal logic #798

Merged
merged 5 commits into from
Feb 10, 2021
Merged

Conversation

WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Feb 3, 2021

Description

PR introducing 3 changes.

  • disabled the ability to modify the status bar appearance in non-fullScreen modals since it destroys the animation (see gifs in Wrong icon color when push modal on iOS #767) and introduces the necessity to control the color of status bar in every modal, which does not work well e.g. with phones with iOS <13 since there are only fullScreen modals there. The system seems to pretty well deal with all the cases where this change could be problematic, so I think it is worth to do this.
  • extended an if clause in RNSScreenStackHeaderConfig.m to fix the bug when trying to change options via navigation.setOptions while being in fullScreenModal. Till now, when the code reached the changed line, if did not go into if due to nav being nil for fullScreenModal, which resolved to nextVC also being nil. We now check if nav is nil, which should mean that we are in fullScreenModal, and if vc is not nil at the same time, we want to update the screen.
  • Removed running tsc --noEmit in TestsExample project since it made the CI fail for some reason with .tsx files.

Fixes #767.

Changes

Changed RNSScreen.m to not include option for changing status bar appearance in non-fullScreen modals.
Changed RNSScreenStackHeaderConfig.m to fix the bug with fullScreen modals.
Added tsconfig.json in TestsExample to be able to test TS code in it.
Removed checking files from folders other than src in the main tsconfig.json.

Test code and steps to reproduce

Test642.tsx in TestsExample project.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@hirbod
Copy link
Contributor

hirbod commented Jun 6, 2023

@WoLewicki for me, this breaks the ability to get correct colors. We have formSheets and modal and iOS (16.4) inverts the colors for me. So its turning the time to white on white background and white on a black background. I want to control this but tried like 1 hour until I found this. Is there no way for us to control this now?

@WoLewicki
Copy link
Member Author

It was so long ago that I have no idea tbh 😅 Did this problem appear on 16.4? Or was it always like this?

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.

Wrong icon color when push modal on iOS
3 participants