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

Remove unnecessary view UI updates #485

Open
brocollie08 opened this issue Aug 7, 2024 · 0 comments
Open

Remove unnecessary view UI updates #485

brocollie08 opened this issue Aug 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@brocollie08
Copy link
Contributor

Is your feature request related to a problem? Please describe.

There's no straight forward way to tell if a view update is immediately followed by a transition.

E.g In case of a pending transaction: input is populated with data but the focus remains, the data models aren't updated until focus is removed.
If we transition out of the current view in this state, a pending transaction exists to update the data models before the transition executes, this is mostly intended behaviour aside from the fact that there are now going to be 2 view updates via ViewInstance.hooks.onUpdate hook
1 view update for the new view being transitioned into, the other view update being the view that was transitioned from.

There's not inherently a problem with updating both views, but it is inefficient and the UI portion of the old view is stale and irrelevant. The update cannot be completely eliminated as the data could still be relevant, but the onUpdate hook call for the old ViewInstance can be skipped

Describe the solution you'd like

This could be done in a number of ways:

  • tracking transition status when views are attempted to be updated
    or
  • checking the view to be updated against current view being shown
@brocollie08 brocollie08 added the enhancement New feature or request label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant