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

[feat] Users screen with more samples #54

Merged
merged 3 commits into from
Dec 21, 2023
Merged

[feat] Users screen with more samples #54

merged 3 commits into from
Dec 21, 2023

Conversation

matejmolnar
Copy link
Collaborator

This pull request is aiming to solve issue #39

Changes

  • Add Users scene which utilises SampleUserRouter.
  • Add showcase of a GET request by fetching/displaying multiple users serially or parallelly.
  • Add showcase of a POST request by creating a new user with a custom responseDecoder due to the dateDecodingStrategy.
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-12-11.at.14.53.07.mp4

@matejmolnar matejmolnar requested a review from a team December 11, 2023 13:54
Copy link
Collaborator

@cejanen cejanen left a comment

Choose a reason for hiding this comment

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

I left one question which I would like to know. Other we're good here

import Networking

@MainActor
final class UsersViewModel: ObservableObject {
Copy link
Contributor

Choose a reason for hiding this comment

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

@matejmolnar @cejanen Why do we sometimes use a service as well in the VMs and sometimes we don't?

Eg. the upload also has a UploadService 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

Usually for samples we don't. For samples we try to keep code as simple as possible just to showcase the library usage. Because upload service logic is shared in multiple VMs it made sense to extract it own service class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although I am still not entirely sure why is the UploadAPIManager implementation so different and more complex than the DownloadAPIManager 🤔 but that's a topic for another debate 😄

Copy link
Collaborator

Choose a reason for hiding this comment

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

you can suggest simplification for sure!

Copy link
Contributor

@gajddo00 gajddo00 Dec 21, 2023

Choose a reason for hiding this comment

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

@matejmolnar I think that was my first comment and conclusion on the Upload PR as well, that it could have been almost 1:1 with the download manager.

@matejmolnar matejmolnar requested a review from cejanen December 18, 2023 08:41
cejanen
cejanen previously approved these changes Dec 18, 2023
Copy link
Collaborator

@cejanen cejanen left a comment

Choose a reason for hiding this comment

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

If we want to unify upload/download let's do it in separate PR

import Networking

@MainActor
final class UsersViewModel: ObservableObject {
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can suggest simplification for sure!

@cejanen cejanen requested a review from a team December 18, 2023 19:42
gajddo00
gajddo00 previously approved these changes Dec 21, 2023
Copy link
Contributor

@gajddo00 gajddo00 left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me

@matejmolnar matejmolnar merged commit 205d731 into dev Dec 21, 2023
@matejmolnar matejmolnar deleted the 39-more-samples branch December 21, 2023 12:03
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.

4 participants