Giter Club home page Giter Club logo

react-todo's Introduction

React todo component

A react todo component is created using material UI

image

Storybook

https://upnotes-io.github.io/react-todo/

Installation

// with npm
npm i react-todo-component

// with yarn
yarn add react-todo-component

Testing

yarn storybook

Usage

Here is a quick example to get you started, it's all you need:

import React from 'react';
import ReactDOM from 'react-dom';
import {Todo} from 'react-todo-component';

ReactDOM.render(
    <Todo />,
  document.getElementById('root')
);

Contribution guide

If you're reading this, you're awesome! Thank you for helping us.

  • Clone git repository on your local git clone [email protected]:upnotes-io/react-todo.git
  • Run yarn install to install dependencies.
  • We are using storybook. Just run yarn run storybook to test on local.
  • Pick a issue and comment you are working on it.
  • Create your feature branch, do changes and create pull request.

Step to release the npm module

  1. Create a new account in npm. https://www.npmjs.com/signup
  2. Create a new access token and select publish as a type https://www.npmjs.com/settings/upnotes/tokens
  3. Add secret to your repo or organization as NPM_TOKEN https://github.com/organizations/upnotes-io/settings/secrets/actions/new
  4. Create a new tag and use that tag to create the release. Creating a new release will trigger the workflow.

Publishing to github pages:

Adding deploy keys to your repo:

  1. https://github.com/JamesIves/github-pages-deploy-action/tree/dev#using-an-ssh-deploy-key-
  2. https://docs.github.com/en/developers/overview/managing-deploy-keys#setup-2

react-todo's People

Contributors

anasmansy avatar avinier avatar bhujoshi avatar gkasoff avatar harshithasivalingala avatar jisundr avatar kamalkishor1991 avatar param-singh avatar pranesh239 avatar prateek3255 avatar ravencolevol avatar serickson67 avatar shahanahmed86 avatar sukhacoder02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-todo's Issues

full dark mode

make want to make it also dark
image

UI is not matching with dark mode

Css improvements

  • Need to figure out the best possible way to write CSS so that it is customizable. Anyone who wants to use this component should be able to style according to their needs.

Add new todo item on pressing enter in between todo list rows

Pressing enter for creating new row works for the first item but it does not work for rest of the rows.
https://upnotes-io.github.io/react-todo/

  1. If cursor is in the middle the line should get split into 2 with dividing the text into 2 lines and cursor remains in the next line.
  2. By pressing enter in the end of the line should cause new row to be created in the next line and the curser shoud be in the next line.
  3. By pressing enter in the begining of the line should cause the row to be created at the top and the cursor should remain in the current line.

Basically 2ed and 3ed points are special conditions to the first point so if first usecase is implemented correctally the 2ed and 3ed should automatically work.

Wrap text with limit of 1200 chars

Right now the text does not wrap.

  1. Show only 2 lines with blur at the bottom of every line if it is not active and show full text when clicked.
  2. At one point of time only one checkbox can be active.
  3. Trancate the text to 1200 chars when user tries to paste more than 1200 and show error when user tries to add more chars than 1200.
    Referance:

image

Missing Components

I think there are below-mentioned things that need to be implemented:

  • prettier
  • eslint integrated with airbnb standard
  • husky as a pre-commit hook that'll call lint-staged scripts
  • lint-staged that will check prettier, then linting, and then proceed with the commit
  • unit testing with jest
  • e2e testing with cypress

airbnb is a suggestion

require more accurate instruction for Contributor guided

I have setup the following instruction but I got some errors like this

warning package.json: "dependencies" has dependency "husky" with range "^8.0.3" that collides with a dependency in "devDependencies" of the same name with version "^8.0.0"
warning [email protected]: "dependencies" has dependency "husky" with range "^8.0.3" that collides with a dependency in "devDependencies" of the same name with version "^8.0.0"
..

I don't know how to solve it.

Improve the final build for npm

  • Find out a way to build just the TodoApp component.
  • Define the peer dependencies properly and test by using package in other places.
  • Need to find out the best possible way to build a lib.

update on delete icon

when hover on delete icon
befor
change backgruond color to
after

can i work on this as my first conterpution

Node Version

The project run perfectly fine on node:16 version. So we can do either of two:

  • add these lines in package.json file:
  "engines": {
    "node": "^16.20",
    "yarn": "^1.22"
  },
  "engineStrict": true
  • or work on the migration from v16 to the v22 version of nodejs.

Cannot run storybook

Error on yarn run storybook

System Environment

  • macOS 13.4.1

Description
Can not run on a terminal or Zsh

Steps to Reproduce

  1. First clone repos, It's perfectly fine
  2. When I run yarn install
    [1/4] ๐Ÿ”  Resolving packages...
    [2/4] ๐Ÿšš  Fetching packages...
    [3/4] ๐Ÿ”—  Linking dependencies...
    warning " > @mui/[email protected]" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning " > @mui/[email protected]" has incorrect peer dependency "react-dom@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/[email protected]" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/[email protected]" has incorrect peer dependency "react-dom@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/[email protected]" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/[email protected]" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/system > @mui/[email protected]" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/system > @mui/[email protected]" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning " > [email protected]" has unmet peer dependency "webpack@>=2".
    warning " > @storybook/[email protected]" has unmet peer dependency "require-from-string@^2.0.2".
    warning " > [email protected]" has incorrect peer dependency "react@^18.0.0".
    warning " > [email protected]" has incorrect peer dependency "react-dom@^18.0.0".
    [4/4] ๐Ÿ”จ  Building fresh packages...
    $ husky install
    husky - Git hooks installed
    โœจ  Done in 12.10s.```
    
    
  3. After that, yarn run storybook
    yarn run v1.22.19
    $ start-storybook -p 6006
    info @storybook/react v6.5.13
    info
    info => Loading presets
    
    attention => Storybook now collects completely anonymous telemetry regarding usage.
    This information is used to shape Storybook's roadmap and prioritize features.
    You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
    https://storybook.js.org/telemetry
    
    info Addon-docs: using MDX1
    info => Using implicit CSS loaders
    (node:21123) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
    you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.
    
    See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
    (Use `node --trace-deprecation ...` to show where the warning was created)
    info => Using default Webpack4 setup
    10% building 1/1 modules 0 active
    info => Ignoring cached manager due to change in manager config
    10% building 1/7 modules 6 active /Users/nyanlin/github/react-todo/node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.jsnode:internal/crypto/hash:71
      this[kHandle] = new _Hash(algorithm, xofLen);
                      ^
    
    Error: error:0308010C:digital envelope routines::unsupported
        at new Hash (node:internal/crypto/hash:71:19)
        at Object.createHash (node:crypto:133:10)
        at module.exports (/Users/nyanlin/github/react-todo/node_modules/webpack/lib/util/createHash.js:135:53)
        at NormalModule._initBuildHash (/Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:417:16)
        at handleParseError (/Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:471:10)
        at /Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:503:5
        at /Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:358:12
        at /Users/nyanlin/github/react-todo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
        at iterateNormalLoaders (/Users/nyanlin/github/react-todo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
        at /Users/nyanlin/github/react-todo/node_modules/loader-runner/lib/LoaderRunner.js:205:4 {
      opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
      library: 'digital envelope routines',
      reason: 'unsupported',
      code: 'ERR_OSSL_EVP_UNSUPPORTED'
    }
    
    Node.js v18.6.0
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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.