GithubHelp home page GithubHelp logo

bdc-js's People

Contributors

bwhmather avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bdc-js's Issues

Add Todo MVC example

See https://github.com/tastejs/todomvc/blob/master/app-spec.md for detailed specification.

No todos

  • When there are no todos, #main and #footer should be hidden.

New todos

  • New todos are entered in the input at the top of the app.
  • The input element should be focused when the page is loaded, preferably by
    using the autofocus input attribute.
  • Pressing Enter creates the todo, appends it to the todo list, and clears
    the input.
  • Make sure to .trim() the input and then check that it's not empty before
    creating a new todo.

Mark all as completed

  • The mark all completed checkbox toggles all the todos to the same state as
    itself.
  • The make all completed button should be cleared after the "Clear completed"
    button is clicked.
  • The "Mark all as complete" checkbox should also be updated when single todo
    items are checked/unchecked.

Item interaction

  • Clicking an item checkbox marks the todo as complete by updating its
    completed value and toggling the class completed on its parent <li>
  • Double-clicking an item <label> activates editing mode, by toggling the
    .editing class on its <li>.
  • Hovering over the todo shows the remove button (.destroy)

Editing

  • When editing mode is activated it will hide the other controls and bring
    forward an input that contains the todo title
  • The item should be focused when editing starts.
  • The edit should be saved on both when the enter key is pressed, and the editing class
    should be removed.
  • The edit should also be saved when focus is lost.
  • Make sure to .trim() the input and then check that it's not empty.
  • If it's empty the todo should instead be destroyed.
  • If escape is pressed during the edit, the edit state should be left and any changes be discarded.

Counter

  • Displays the number of active todos in a pluralized form.
  • Make sure the number is wrapped by a <strong> tag.
  • Also make sure to pluralize the item word correctly: 0 items, 1 item, 2
    items. Example: 2 items left

Clear completed button

  • Removes completed todos when clicked.
  • Should be hidden when there are no completed todos.

Persistence

  • Your app should dynamically persist the todos to localStorage.
  • If possible, use the keys id, title, completed for each item.
  • Make sure to use this format for the localStorage name: todos-[framework].
  • Editing mode should not be persisted.

Routing

The following routes should be implemented:

  • #/ (all - default)
  • #/active
  • #/completed (#!/ is also allowed).
  • When the route changes, the todo list should be filtered on a model level
    and the selected class on the filter links should be toggled.
  • When an item is updated while in a filtered state, it should be updated
    accordingly. E.g. if the filter is Active and the item is checked, it should be hidden.
  • Make sure the active filter is persisted on reload.

Include runtime type assertions in debug build

BDC doesn't currently do any input validation. This means that bad input, at best, results in difficult to decode exceptions from deep inside clobber. While it probably isn't possible to add validation to the prod build without exceeding 1024 bytes, it would be good to have some checks in the debug build to help during development.

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.