Giter Club home page Giter Club logo

commenting-tool's Introduction

Development

In the project directory, you can run:

yarn install

then

yarn start

Open http://localhost:3000 to view it in the browser.

Libraries

My Approach

  • create json file with what the comments data look like and I insert some dummy data on it, data will have its id, user name, id, image, comment date, comment text and the parent id which is the id of the main comment and array of threads that this comment has.
  • created custom hook called useComment to seperate the logic from the UI and to get the comments data from json file first, adding new comment or adding replying on nested threads, handle pagination, handling setting a thread as a main comment when this thread has a lot of nested comments.
  • created another custom hook called useScroll to listen to user scrolling behaviour and to detect if user scrolled to the bottom of the screen to get more comments.
  • created Components such as: Avatar to display user's image.
    CommentInput which contain of the editor input
    CommentItem to display the Comment
    CommentsList to handle displaying all comments with its threads recursivly.
  • used tailwind utilies and color themes for styling.

My Approach for improving the UX

  • added infinite scrolling so user can paginate smoothly.
  • showing new thread section when user has many threads.

##Idea to improve UX 1- add funcionality to the editor input so user can style the comment.
2- add collapse for comments so user can have the control of hidding and showing nested comments.
3- add more actions such as like, upvote to make user engage more with the comments.

ScreenShots

Desktop A screenshot of Laptop Screen Desktop With Thread A screenshot of Tablet Screen Tablet
A screenshot of Laptop Screen Mobile
A screenshot of Laptop Screen

commenting-tool's People

Contributors

alaaelmohr avatar

Watchers

 avatar  avatar

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.