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

[Ruizhi] OpenTweet #5

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

[Ruizhi] OpenTweet #5

wants to merge 11 commits into from

Conversation

dtmelrz
Copy link

@dtmelrz dtmelrz commented Jan 16, 2024

Minimum requirement

  • Fork the repo
  • Parse the json file included in the project
  • Display the tweets in the order the json file defines them. The app should display the author, the tweet and the date it was tweeted at. Tweets are variable length, so the cells must be properly sized to the content
  • When done, send a pull request to this project

Bonuses (in no particular order)

  • Highlight the mentions (@username) and/or links in a different font/color
  • Display a tweet's thread when tapping on a giving tweet. Due to the very simplistic data model made available to you, it's probably best to simplify this: if the user taps on the first tweet of a thread, display all the replies in ascending chronological order, if the user taps on a reply to another tweet, only show the tapped tweet and the tweet it's replying to.
  • Display avatar images (usig NSURLSession)
  • Preview a tweet when its associated cell is long pressed

Description

*I suggest reviewing the PR commit by commit - each commit should explain itself by its title & description:)
Here is a walkthrough of the MVVM architecture in this project,

Feed/Timeline
Tweet(model) <-------> TimelineViewModel <-------> TimelineViewController (View)

Thread display
Tweet(model) <-------> TweetViewModel <-------> TweetViewController (View)

Utils
--FormatDateUtils for date formatting
-- Networks for network call(s)

Things to improve

  • Show each tweet and its replies in a nested layout
  • Expandable(collapsable) table view e.g when a cell is collapse, only the tweet would show; when it is expanded, the tweet's replies would show below
  • Support pagination/infinite scroll
  • Interactions on the avatar and the mention of each tweet

Demo

Screenshot 2024-01-15 at 10 42 27 PM Screenshot 2024-01-15 at 10 42 43 PM Screenshot 2024-01-15 at 10 43 57 PM Screenshot 2024-01-15 at 10 44 27 PM
open_tweet_demo.mov

Dante Li added 11 commits January 14, 2024 11:10
Also tested if the data is properly decoded from the local file.
Establish the data pipeline between VC and VM.
Also, click a cell to navigate to the tweet's details in a VC.
1. Prefetch the "reply to" tweet and replies for each tweet
2. Display the thread consisting of "reply to" and replies on another VC
3. make sure tweet(s) of each section presenting in ascending chronological order
@dtmelrz dtmelrz changed the title [Ruizhi] Open Tweet [Ruizhi] OpenTweet Jan 16, 2024
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.

None yet

1 participant