karambirov / githubsearch Goto Github PK
View Code? Open in Web Editor NEWGitHub iOS client with minimum third-party dependencies.
License: MIT License
GitHub iOS client with minimum third-party dependencies.
License: MIT License
Codable and Realm objects should not be in the same class. It would be better if Realm object has convenience init with Codable object like so:
class UserRealm: Object {
// ...
convenience init(with: User) {
// ...
}
}
For navigation the app uses Tab Bar with Navigation Controller inside of it.
What needs to be done:
The networking layer should be able to request search queries.
What needs to be done:
If a user taps "Favorite" in Details, the repository saves to the Realm file (it works correctly, the entry appears in Realm Browser). However, fetching in Favorites doesn't work โ the table stays empty.
When a cell is reused its labels are not replaced with the new ones. Instead, they just appear on top of the old labels.
If you try to search something you'll get a list of results. But if you try to do a new search, the table won't be updated with the new results.
If a user taps the clear button in the search field, the table should become empty.
It is not the responsibility of SearchViewController to reuse and configure cells.
The views inside of a cell should be joined in one content view. Thus there should be another view that contains all of the UI elements. In RepositoryCell should be used only instance of that view.
Just after search's table view has been populated with data from a network everything works as expected. But if you decide to switch tab to Favorites and back, Search will be black (maybe it's been deallocated).
Maybe it worth it to create a service for searching instead of doing a search in VC.
What needs to be done:
The second screen of the app is Favorites. A user should have the ability to see all favorite repositories without an Internet connection.
What needs to be done:
Open a 'About repository' interface.
Reason:
When you click the 'Unfavorite' button, the repository is delete from Realm
func delete(_ object: Object) {
// Deletes an object from the Realm. Once the object is deleted it is considered invalidated.
write { $0.delete(object) }
}
Now, the repository is considered invalidated and can no longer be accessed.
When finally click the 'Favorite' button, you access the deleted repository, so that APP crashed.
@objc func favoriteButtonTapped() {
if !viewModel.repository.isFavorite { // crash
...
UI must be user-friendly, so a user should be aware of loading, errors, absence of results.
When a user reached the end of the search results a new request should be sent.
If you try to open from Search a repository that already has been saved, navigation bar button title in Details will be "Favorite".
create(_:completion:)
won't be used. So it needs to be deleted.fetch(_:predicate:sorted:completion:)
should't be generic.From Details screen user should be able to open Readme screen.
In addition to #20, there should be a generic view controller for Search and Favorites because they share the same functionality.
The Detail shows information about a repository such as an owner's full name, login, profile image, repo's name and description.
What needs to be done:
Right now all errors in the app are printed into the console. There should be correct error handling, not just printing.
https://www.swiftbysundell.com/articles/providing-a-unified-swift-error-api/
https://www.swiftbysundell.com/basics/result/
https://www.swiftbysundell.com/articles/the-power-of-result-types-in-swift/
https://www.swiftbysundell.com/tips/result-type-convenience-apis/
A user should be able to delete a repository from Favorites without opening details screen.
To open Details there should be some kind of navigation service. Because ViewController shouldn't be aware of how to open other screens.
The first screen of the app is Search. A user should have the ability to search GitHub repositories.
What needs to be done:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.