Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Search for labels in-app #2309

Closed
wants to merge 4 commits into from

Conversation

BrianLitwin
Copy link
Member

@BrianLitwin BrianLitwin commented Oct 18, 2018

Connected to #2263

In most files, the changes are adding a GithubClient parameter so that it can be passed to the LabelDetails model, which is passed along to init and present a RepositoryIssuesViewController.

Also, I removed the RepositoryDetails parameter from the RepositoryIssuesViewController initializer and replaced it with owner and name. This was so that we didn't have to pass around a reference to RepositoryDetails as well, and also because we were only using the name and owner fields of RepositoryDetails anyway.

vid:

ezgif com-optimize



I've checked manually that it works when labels are embedded in other contexts as well. Only place it doesn't work is on the main RepoIssuesSectionController list, which as @Huddie suggested, we should enable as well.

- To init and present a RepositoryIssuesViewController, need a GithubClient
to pass in.
- Instead of initializing using RepositoryDetails, only use owner and repo. Makes it easier to present a new RepoIssuesVC without needing a reference to RepositoryDetails. The only info from RepoDetails that we were using anyway was was owner and name.
@@ -10,11 +10,13 @@ import Foundation

final class LabelDetails {

let client: GithubClient
Copy link
Member

Choose a reason for hiding this comment

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

Is there another way to pass the client around beside attaching it to a model? This puts a lot of baggage in these models (the client object is basically a full app session!)

Copy link
Member Author

Choose a reason for hiding this comment

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

Re-tried this in a new PR - didn't do enough homework on how this is handled elsewhere in the app. Thanks for the feedback!

@BrianLitwin BrianLitwin deleted the SearchForLabels branch October 21, 2018 20:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants