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

[android] change fragment transactions #10088

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

vallemar
Copy link
Contributor

This is a second attempt at this PR #8791. @farfromrefug could you check it? on my mobile it works and the flash of the maps have disappeared

@cla-bot cla-bot bot added the cla: yes label Nov 12, 2022
@farfromrefug
Copy link
Collaborator

@vallemar that was fast. You don't need changes in core/application. Could you please remove them from that PR?

@vallemar
Copy link
Contributor Author

@farfromrefug if it refers to this file packages/core/application/index.android.ts if I don't put the changes the application gives an error when opening, I haven't tried one by one. I will find which one is necessary and update the branch

@NathanWalker NathanWalker added this to the 8.4 milestone Nov 18, 2022
@vallemar
Copy link
Contributor Author

I have seen that they have added this to 8.4 amazing! I'm sure this needs some change, there were times it worked for me and other times it didn't, but I think it was because of how I have my local environment. I'm not going to be able to do anything for the whole weekend, I just took the pc to the technician because I think the graphics card is broken

@NathanWalker NathanWalker modified the milestones: 8.4, 8.5 Nov 24, 2022
@nx-cloud
Copy link

nx-cloud bot commented Dec 7, 2022

Nx Cloud Report

CI is running for commit 9753520.

📂 Click to track the progress, see the status, the terminal output, and the build insights.


Sent with 💌 from NxCloud.

@vallemar
Copy link
Contributor Author

Guys, I'm testing @farfromrefug fork that has these changes and I have to say that I think the difference in Android when browsing is quite a bit, with the current ns-core package I lose the animation because it gets stuck when entering a page with a lot of components and with the fork the animation makes it perfect and it doesn't seem to get stuck

@farfromrefug
Copy link
Collaborator

@vallemar it is quite a big change. We need to test that quite a bit. Not sure what the best approach would be to ensure there is no regression. Firs nx report seems to report a tsc issue on this. @NathanWalker I dont see what command line it is failing on to reproduce locally. Can you tell me ?
@vallemar did you try that PR does it works fine for you?

@vallemar
Copy link
Contributor Author

vallemar commented Dec 21, 2022

@farfromrefug I had it working but there were times that it had some failures to start, I don't know if it was because I changed the core in node_modules or because. On top of that, another commit has slipped in, sorry. I would have to try it again but when I try to run the core on my pc my pc crashes

@farfromrefug
Copy link
Collaborator

@vallemar OK if you can force push without the unwanted commit that would be great.
About your case where it fails if you can create a reproducible example I could fix it

@vallemar
Copy link
Contributor Author

@farfromrefug Using this version my application is working perfectly and without blinking in the navigation. The only thing is that I have these two warnings and I don't know why, since the BackstackEntry type is being exported in the d.ts

WARNING in ../../../../git/NativeScript/packages/core/ui/frame/index.android.ts 516:57-71
export 'BackstackEntry' (imported as 'BackstackEntry') was not found in '.' (possible exports: Frame, FrameBase, NavigationType, _stack, actionBarVisibilityProperty, attachStateChangeListener, defaultPage, getFrameById, goBack, moduleLoaded, reloadPage, setActivityCallbacks, setFragmentCallbacks, setFragmentClass, topmost)

WARNING in ../../../../git/NativeScript/packages/core/ui/frame/index.android.ts 516:91-105
export 'BackstackEntry' (imported as 'BackstackEntry') was not found in '.' (possible exports: Frame, FrameBase, NavigationType, _stack, actionBarVisibilityProperty, attachStateChangeListener, defaultPage, getFrameById, goBack, moduleLoaded, reloadPage, setActivityCallbacks, setFragmentCallbacks, setFragmentClass, topmost)

video5843545908083428893.mp4

@farfromrefug
Copy link
Collaborator

@vallemar can you try to replace import { ExpandedEntry } from './fragment.transitions.android'; in with import type { ExpandedEntry } from './fragment.transitions.android'; in index.android.ts

@vallemar
Copy link
Contributor Author

@farfromrefug this does not solve the problem, the error comes from BackstackEntry not from ExpandedEntry

@farfromrefug
Copy link
Collaborator

Yes but I thought it would be this. Strange I don't have the error in my fork. Need to look at this PR locally

@farfromrefug
Copy link
Collaborator

@vallemar i fixed the warning but i cant commit in your branch. You need to change the first line of core/ui/frame/index.android.ts with this

import { AndroidFrame as AndroidFrameDefinition, AndroidActivityCallbacks, AndroidFragmentCallbacks, NavigationTransition } from '.';
import type { BackstackEntry } from '.';

@vallemar
Copy link
Contributor Author

@farfromrefug done! Thanks!

@vallemar
Copy link
Contributor Author

vallemar commented Feb 12, 2023

I am using @farfromrefug fork, I am noticing that in the navigation the lottie components take a while to load (I think the lists also take longer to display). I'm not sure if it's because of these changes, because of the component itself or because of something else, I'm just leaving it here as a note to check before continuing with this

@farfromrefug
Copy link
Collaborator

@vallemar you need to give more context. What kind of navigation ?

@vallemar
Copy link
Contributor Author

vallemar commented Feb 12, 2023

@farfromrefug it's a simple forward navigation, using the Fade transition, here's a video showing the delay

Screenrecorder-2023-02-12-12-58-15-973.mp4

in the En ruta button it seems to be more noticeable because it makes the button grow and with the background it is more noticeable (it is the first one that I show in the video)

@farfromrefug
Copy link
Collaborator

@vallemar ok would be good to create comparable example. Forward navigation should make no difference. Backward navigation should be very different though

@NathanWalker NathanWalker removed this from the 8.5 milestone Mar 17, 2023
@vallemar
Copy link
Contributor Author

I think this should be taken up again, I am having navigation delays when using NS but I don't see them if I use the fork...

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.

None yet

3 participants