Skip to content

fix(ios): revert regression from PR #10096 - #10120

Merged
NathanWalker merged 9 commits into
mainfrom
farfromrefug-patch-1
Dec 28, 2022
Merged

NathanWalker merged 9 commits into
mainfrom
farfromrefug-patch-1

Conversation

@farfromrefug

@farfromrefug farfromrefug commented Dec 5, 2022 •

Copy link
Copy Markdown
Collaborator

#10096

The changes in ui/page/index.ios.ts where not meant to be there. And it broke back navigation event 6148955#commitcomment-92040756

For reference there is a github mystery here
https://github.com/NativeScript/NativeScript/blame/c957b487a8d98e529df5432aed5b7126a83a6020/packages/core/ui/page/index.ios.ts
https://github.com/akylas/NativeScript/blame/main/packages/core/ui/page/index.ios.ts

Both blames say the part (around line 127) date from before the core refactoring but with a different code :s
I am sorry about this i am baffled by this...
and thanks to @tombien for discovering this!

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

#10096

The changes in `ui/page/index.ios.ts` where not meant to be there.
@nx-cloud

nx-cloud Bot commented Dec 5, 2022 •

Copy link
Copy Markdown

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ccfa6ed. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@rigor789

rigor789 commented Dec 21, 2022 •

Copy link
Copy Markdown
Member

A test failed in the original PR (#10096), as well as here:

Test: TAB-VIEW-ROOT.test_offset_zero_should_raise_same_events FAILED:  At /0/2 
  actual:   'Tab0 Frame0 Page0 navigatingTo' and 
  expected: 'Tab0 Frame0 Page0 loaded'       differ.

I believe the actual is now expected - but the test has not been updated to reflect that. Other than that - wouldn't loaded need to be called as well?

Tab0 Frame0 Page0 navigatingTo loaded

(haven't looked at the actual test, just looking at the failed test in CI)

Looking at the test, these are not a sequence, but actual events - so just probably need to change the assertions.

@farfromrefug

Copy link
Copy Markdown
Collaborator Author

@rigor789 the change in frame should NOT be reverted! I need to fox this

NathanWalker and others added 3 commits December 27, 2022 20:55
without duplicating `Page` events
I added a comment because i think this would require a refactoring
@farfromrefug

Copy link
Copy Markdown
Collaborator Author

@rigor789 @NathanWalker i fixed this correctly now by only adding the notify of the event for the Frame.
I also added a comment to explain the situation and the emphasis on the fact that all that should be refactored / fixed. To me it seems iOS does not send those events at the right time.

I also added navigation tests back (only some as others were failing) and added tests for the Frame events

@NathanWalker

Copy link
Copy Markdown
Contributor

nicely done @farfromrefug thank you!

@NathanWalker
NathanWalker merged commit a4f28b8 into main Dec 28, 2022
@NathanWalker
NathanWalker deleted the farfromrefug-patch-1 branch December 28, 2022 17:23
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.

3 participants