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

A coordinator handles the app's navigation #626

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

krugerk
Copy link
Contributor

@krugerk krugerk commented Jan 26, 2025

Summary

Navigation was somewhat scattered throughout the app and the gallery had a central role. This merge request introduces a class for handling the app's navigation. Eventually it could also help with scenarios like starting the app from cold start with the running timer for a particular goal shown.

For UI changes including screenshots of before and after is great.

Validation

Running the app in the simulator.
Navigating around:

  • signing in
  • signing out
  • viewing gallery
  • opening goal from gallery
  • opening edit datapoint
  • canceling edit datapoint
  • opening settings and its children
  • opening goal from spotlight result tap
  • opening app from tapping notification

Fixes #622

Other Locations:

  • EditDatapointVC dismisses directly upon deleting a datapoint
  • EditDatapointVC dismisses directly upon successfully updating a datapoint
  • AlertVC are still handled around where they are displayed
  • GoalVC shows the SafariVC
  • TimerVC dismisses itself (indirectly)

}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
var section = indexPath.section
guard let cell = tableView.dequeueReusableCell(withIdentifier: self.cellReuseIdentifier) as? SettingsTableViewCell else { return UITableViewCell() }
if HKHealthStore.isHealthDataAvailable() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

admittedly, these are not directly related to the introduction of the coordinator

@krugerk krugerk force-pushed the feature/coordinator-for-navigation branch from b0f4fd8 to 2408680 Compare January 26, 2025 10:24
@krugerk krugerk force-pushed the feature/coordinator-for-navigation branch from 2408680 to dc06f35 Compare January 26, 2025 11:50
probably broke with the transition from appDelegate to sceneDelegate
whereas tapping the result would merely open the app; now it also opens the goal
coordinator?.start()
}

func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixes #622

Copy link
Contributor Author

Choose a reason for hiding this comment

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

proposed #628 for just the fix

@krugerk krugerk marked this pull request as ready for review January 26, 2025 13:17
@krugerk krugerk requested a review from a team as a code owner January 26, 2025 13:17
@krugerk krugerk requested review from theospears and removed request for a team January 26, 2025 13:17
krugerk added a commit to krugerk/BeeSwift that referenced this pull request Jan 31, 2025
@krugerk
Copy link
Contributor Author

krugerk commented Feb 23, 2025

Ah, it looks like this was closed because the wrong number was mentioned in a merged commit.

@theospears theospears reopened this Feb 23, 2025
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.

Goal not opened in app when tapping spotlight result
2 participants