Skip to content

Fix modal closing animation on web/desktop#1960

Merged
jasperhuangg merged 3 commits into
masterfrom
marcaaron-fixModalClosing
Mar 24, 2021
Merged

Fix modal closing animation on web/desktop#1960
jasperhuangg merged 3 commits into
masterfrom
marcaaron-fixModalClosing

Conversation

@marcaaron

@marcaaron marcaaron commented Mar 19, 2021

Copy link
Copy Markdown
Contributor

Details

Switching to react-navigation broke modal animations.

react-navigation does not offer a complete solution for dismissing modals by clicking on overlays see this feature request, but with this PR we can get rid of the use of Modal for large screens / web.

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/157247

Tests

  1. Test opening and closing various right docks modals on all platforms

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

2021-03-23_14-56-10.mp4

Mobile Web

2021-03-23_14-55-42.mp4

Desktop

tested w/out screen grab

iOS

2021-03-23_15-20-25.mp4

Android

tested w/out screen grab

@marcaaron marcaaron self-assigned this Mar 19, 2021
Comment thread src/libs/Navigation/AppNavigator/createCustomRootStackNavigator.js Outdated
@marcaaron marcaaron changed the title [WIP] Fix modal closing animation on web/desktop Fix modal closing animation on web/desktop Mar 24, 2021
@marcaaron marcaaron marked this pull request as ready for review March 24, 2021 01:57
@marcaaron marcaaron requested a review from a team as a code owner March 24, 2021 01:57
@botify botify requested review from jasperhuangg and removed request for a team March 24, 2021 01:57
@marcaaron marcaaron marked this pull request as draft March 24, 2021 01:59
@marcaaron marcaaron removed the request for review from jasperhuangg March 24, 2021 01:59
@marcaaron

Copy link
Copy Markdown
Contributor Author

Sorry not ready yet.

Fix custom root stack navigator

always render a view at least

scrap custom navigator

add cardstyleinterpolator.js

add back the custom stack nav

tone down the output

fix conflicts and add ClickAwayHandler

modified

fix names
@marcaaron marcaaron force-pushed the marcaaron-fixModalClosing branch from 7725a8c to 6706d16 Compare March 24, 2021 02:07
@marcaaron marcaaron marked this pull request as ready for review March 24, 2021 02:10
@marcaaron marcaaron requested a review from a team March 24, 2021 02:11
@botify botify requested review from jasperhuangg and removed request for a team March 24, 2021 02:11
@jasperhuangg jasperhuangg merged commit f96ebbd into master Mar 24, 2021
@jasperhuangg jasperhuangg deleted the marcaaron-fixModalClosing branch March 24, 2021 10:10
@s77rt

s77rt commented Mar 13, 2023

Copy link
Copy Markdown
Member

This PR caused a regression. The implemented ClickAwayHandler is selectable. On double clicking a button, instead of having a modal open then close, it will open but won't close as the second click was captured by the browser to perform Select All action.

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.

3 participants