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

using alamofireimage for transitions when loading thumbnails and graphs #513

Conversation

krugerk
Copy link
Contributor

@krugerk krugerk commented Nov 12, 2024

It was already being used in the Today Extension view but not for the graphs and graph thumbnails elsewhere in the app. Using it simplifies the code and allows for easily adding transitions. When scrolling the gallery or loading a goal, the user experience is enhanced by using smooth rather than jarring animations and transitions.

self.clearGoalGraph()
}
})
beeLemniscateView.isHidden = !currentlyShowingGraph
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It, this MR, does appear to have the consequence of the bee lemniscate not appearing very often.

})
beeLemniscateView.isHidden = !currentlyShowingGraph

imageView.af.setImage(withURLRequest: request,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@theospears
Copy link
Collaborator

I think this changes some current behavior which was intentional. In particular, the intended behavior is:

  1. The bee lemniscate only appears while beebrain is active (i.e. the goal is being recalculated in the backend asynchronously), it's not intended to show while images are loading. This matches the behavior of the web app.
  2. If we already have a graph image for a goal, but then get a new url from the server, don't show a loading screen, instead show the old graph until the new one is downloaded and ready.

It was already being used in the Today Extension view but not for
the graphs and graph thumbnails elsewhere in the app.
Using it simplifies the code and allows for easily adding transitions.
When scrolling the gallery or loading a goal, the user experience
is enhanced by using smooth rather than jarring animations and transitions.
@krugerk krugerk force-pushed the tweak/alamofireimage-included-but-only-downloader-utilized branch from da7d818 to 336f304 Compare November 15, 2024 22:36
@theospears
Copy link
Collaborator

Going to close this out given the above, but comment here if you don't think that's the right action.

@theospears theospears closed this Dec 1, 2024
theospears pushed a commit that referenced this pull request Jan 13, 2025
## Summary
Uses UIView.transition(with:...) when transitioning to the graph image
(on the goalvc). The sudden swap of one image for the other was rather
abrupt.


## Validation
ran app in simulator

fixes #608
and is not quite as overreaching as #513
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.

2 participants