Skip to content

fix(hmr): close modal views during livesync #7669

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

Closed
wants to merge 11 commits into from

Conversation

VladimirAmiorkov
Copy link
Contributor

@VladimirAmiorkov VladimirAmiorkov commented Aug 9, 2019

PR Checklist

What is the current behavior?

Any opened modal views are not updated or closed during HMR livesync

What is the new behavior?

Any opened modal views are closed during HMR livesync

Fixes/Implements/Closes #[Issue Number].
#7668

@VladimirAmiorkov VladimirAmiorkov self-assigned this Aug 9, 2019
@cla-bot cla-bot bot added the cla: yes label Aug 9, 2019
@VladimirAmiorkov VladimirAmiorkov removed the request for review from vchimev August 12, 2019 13:45

TKUnit.waitUntilReady(() => !!frame.topmost());
const topmostFrame = frame.topmost();
TKUnit.waitUntilReady(() => topmostFrame.currentPage && topmostFrame.currentPage.isLoaded);
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add topmostFrame.canGoBack() to make sure the app hasn't restarted.

@@ -209,6 +236,18 @@ function _test_onLiveSync_ModuleReplace_Multiple(context: ModuleContext[]) {
TKUnit.assertEqual(pageBeforeNavigation, pageAfterBackNavigation, "Pages are different!");
}

function _test_onLiveSync_ModalViewClosed(context: ModuleContext) {
const buttonPage = <Page>createViewFromEntry(({ moduleName: modalViewPageModuleName }));
Copy link
Contributor

@vchimev vchimev Aug 14, 2019

Choose a reason for hiding this comment

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

buttonPage is more like modalViewPage ;)

@VladimirAmiorkov VladimirAmiorkov changed the base branch from master to release August 14, 2019 08:17
@VladimirAmiorkov VladimirAmiorkov changed the base branch from release to master August 14, 2019 08:17
@VladimirAmiorkov
Copy link
Contributor Author

Closing this PR in favor of #7679

@VladimirAmiorkov VladimirAmiorkov deleted the amiorkov/hmr-modals-fix branch August 14, 2019 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants