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

OpenTweet Coding Challenge #12

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

OpenTweet Coding Challenge #12

wants to merge 8 commits into from

Conversation

dayvauld
Copy link

OpenTweet Coding Challenge

This was a fun challenge. A bit open ended so you could go in any direction 😄

Changes

  • Implemented challenge in MVVM-C (Model-View-ViewModel-Coordinator) pattern
  • Added basic unit tests and a simple ui test to test navigation
  • Added a SwiftUI cell view (TweetCellView.swift) for fun, can be easily added by replacing the UIView cell configuration in

TweetCell.swift

override init(frame: CGRect) {
    super.init(frame: frame)
    // remove view init code
  }
  
  override func prepareForReuse() {
    super.prepareForReuse()
    contentConfiguration = nil
    // view.reset()
  }
  
  func configure(tweet: Tweet) {
    if #available(iOS 16.0, *) {
      self.contentConfiguration = UIHostingConfiguration {
        TweetCellView(tweet: tweet)
      }
    }
    // view.configure(tweet: tweet)
  }

Improvements

  • Error handling could be improved and presented to user, with possible action to retry
  • Mapping the thread data (parent tweet, replies) to each tweet is expensive with a large list of tweets

Screenshots

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.

1 participant