Git Product home page Git Product logo

public-chat's People

Contributors

fidelya1988 avatar parzhitsky avatar

Watchers

 avatar  avatar

public-chat's Issues

Create username-related components

Create components for displaying and configuring the name of the current user.

See [Sketch] Main page, [Chat username] Get automatically, and [Chat username] Change manually

<UsernameDisplay /> component

  • the username (together with a short, but descript message) is shown below <MessageCompose /> component;

    Blocked by #10

  • if the combined text is too long to display in one line, the is added at the end;
  • username itself has a clickable style (i.e., it is bold, it has an underline, the cursor changes on hover, etc.);
  • clicking on the username renders the component for changing the username;
  • clicking on any text other than username does not do anything;

<UsernameChangeDialogBox /> component

See [Chat username] Change manually for the most detailed description of the component's behavior.

  • it looks like a dialog box:
    • it is positioned at the center of the viewport (both horizontally and vertically);
    • as long as the component is visible, the elements outside of it are slightly dimmed and are not interactive;

      See backdrop-filter property.

    • clicking outside of the component does not close the component;
  • it behaves as described here;

Create the layout for the main page

Create the layout for the main page.

See [Sketch] Main page.

  • the layout is flexible; it looks basically the same on all screens of all sizes;
  • the layout always takes 100% of both viewport width and height; there are no scrollbars around the page;
  • the layout may impose reasonable lower limits on viewport size (e.g., min-width: 400px); in this case, scrollbars are allowed on smaller screens;
  • the layout must be implemented as a React component, to support other layouts in the future, if needed;

Create <MessageHistory /> component

Create a React component for displaying chat message history.

  • messages are displayed old-to-new: the most recent messages are at the bottom of the view;
  • <MessageHistory /> delegates displaying separate messages to <MessageDisplay />

    Blocked by #9.

Setup environments

  • setup production environment
  • setup staging environment
  • setup pull-request environments

Delete the rest of the unused code

Create <MessageCompose /> component

Create a component for composing new messages.

See [Sketch] Main page

  • it contains an editable <textarea> for message body;
    • the size of the input is fixed (see this);
    • the message body is trimmed (on input event) from leading and trailing whitespace;
  • it contains a button to submit new messages;
    • the button is disabled, if:
      • the message body is empty (whitespace-only messages are considered empty);
      • the app is not ready (see state.app.ready);
      • there's an app-wide error (see state.app.error);
  • on submit (if the submit button is enabled):
    • the component outputs message body in plain text (primitive string);
    • the <textarea> is cleared (this disables the submit button, and maybe has some other effects);

Add tests

Add unit / integration tests, and setup CI to automatically run them on rull requests

Create <MessageDisplay /> component

Create a component for displaying a message.

  • it contains message author name;
    • author name is displayed in single line, without character overflow;
    • too long names end with ;
  • it contains message timestamp in human-readable form, considering device's locale (see Date.toLocaleString());
  • it contains the message body (read-only);
    • the main message text is displayed as-is, and not being parsed as HTML, Markdown, Pug, etc.

Implement infinite scroll in <MessageHistory />

Improve add infinite scroll functionality to <MessageHistory /> component.

  • component uses existing implementation of <MessageHistory />

    Blocked by #7

  • only a handful of message-related DOM elements are displayed at a time;
    • this allows for a smooth, non-chunky UI;
  • component uses an existing third-party React module for the infinite scroll to happen;

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.