Code Monkey home page Code Monkey logo

twitter's Introduction

Hi there ๐Ÿ‘‹

I'm Nicolas Amabile, a Uruguayan software developer with 8+ years of experience in mobile and web development looking forward to pursuing the dream of becoming a digital nomad.

twitter's People

Contributors

dependabot[bot] avatar nicolas-amabile avatar

Stargazers

 avatar

Watchers

 avatar  avatar

twitter's Issues

Redux hooks

Implement redux with hooks:

mapStateToProps => useSelector
mapDispatchToProps => useDispatch

Doc here

The input keeps the text value even after the tweet is created

IMPORTANT

Issue #7 is a blocker for this issue and needs to be solved first.

Description

Right after a new tweet is submitted, the text field still shows the text.

Steps

  • Type something in the Tweet input
  • Hit the submit button

Expected: The new tweet is added and the input clears the value.
Actual: The input keeps the text value even after the tweet is created.

Tweet date - "Today", "Yesterday" or "DD MMM" format

If the tweet was published today, then shows the label "Today".
If the tweet was published yesterday, then shows the label "Yesterday"
If the tweet was published before yesterday, then shows the date with the format: "DD MMM"

Persist the pending tweet on local storage

If you are typing a new tweet and refresh the page before publishing, the value is lost.
It would be great if we can store the pending value on local storage so we can refresh the page and keep the value.

window.localStorage.setItem('pendingTweet', value);

Extra credits:
Build a custom hook that receives the item name (eg: pendingTweet) and encapsulate the localStorage feature.

Desired behaviour:

  • Start typing a new tweet
  • Refresh the page
  • The input value should be pre populated

Implement hooks

Migrate old components lifecycles and the use of the local state to use React Hooks.

"Tweet" button does not work

There is an error when clicking in the "Tweet" button:

Screen Shot 2019-11-25 at 11 04 43

Since this is one of the core features of the app, it would be great if we can add automated tests that cover this flow ๐Ÿ™Œ

Follow/unfollow contacts

Implement the following/unfollowing feature.

In the sidebar, there is a list of suggested contacts.
If the user is not following the contact:

  • The button shows the text "Follow"
  • onClick => Dispatch the action for "following" contact and reflect the update on the screen.

If the user is already following the contact:

  • The button shows the text "Unfollow"
  • onClick => Dispatch the action for "unfollowing" contact and reflect the update on the screen.

Tweet component styling

Make the tweet section look like this:
Screen Shot 2020-09-09 at 09 49 08

Feel free to use the following image as placeholder for the icons:
Screen Shot 2020-09-09 at 09 51 23

IMPORTANT:
Notice that the button style changes when it's enabled/disabled.
That logic is captured in #3. Please address that one first.

Enforce min and max chars for tweet

At the moment we are not controlling the number of characters for the tweet:

  • Do not allow the user to submit an empty tweet: Button should be disabled until the text input has at least 1 char.
  • Do not allow the user to type more than 60 chars.

Extra:

  • Make sure there are automated tests that cover those two scenarios.

Retweet

When the user clicks in the retweet icon ๐Ÿ”ƒ, a new tweet should be created, and it should include a field called retweetedBy with the following format: ๐Ÿ”ƒ ${currentUser.name} Retweeted

The new tweet appears on the tweets list.

Like tweet

Each tweet record has an array of likes. Each element of this array has the following shape:
{ "userId": "2" }

If the current user ID is not included in the list:

  • The UI should show the blue hart: ๐Ÿ’™
  • onClick executes the "like tweet" action and refresh the new status on the screen.

If the current user ID is included in the list:

  • Then the UI should show the red hart: โค๏ธ
  • onClick removes the like and refresh the new status on the screen.

In both cases, the number of likes is also updated on the screen

Only show tweets from contacts

Right now, all tweets appear on the list.
Make sure that only tweets from contacts are being displayed on the screen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.