Skip to content

Main Todo List View <section class="main"> #51

Closed
@nelsonic

Description

@nelsonic

The "Main" view in the Todo List Application displays the actual list.
Try it: http://todomvc.com/examples/vanillajs/
todomvc-main-section-todo-list-html

This is the HTML copied directly from the browser:

<section class="main" style="display: block;">
  <input class="toggle-all" type="checkbox">
  <label for="toggle-all">Mark all as complete</label>
  <ul class="todo-list">
    <li data-id="1533501855500" class="completed">
      <div class="view">
        <input class="toggle" type="checkbox">
        <label>Learn Elm Architecture</label>
        <button class="destroy"></button>
      </div>
    </li>
    <li data-id="1533501861171" class="">
      <div class="view">
        <input class="toggle" type="checkbox">
        <label>Build Todo List App</label>
        <button class="destroy"></button>
      </div>
    </li>
    <li data-id="1533501867123" class="">
      <div class="view">
        <input class="toggle" type="checkbox">
        <label>Win the Internet!</label>
        <button class="destroy"></button>
      </div>
    </li>
  </ul>
</section>

Acceptance Criteria

  • Todo List items should be displayed as list items <li> in an unordered list <ul>.
  • Each Todo List item <li> should contain a <div> with a class="view" which "wraps":
    • <input class="toggle" type="checkbox"> - the "checkbox" that people can "Toggle" to change the "state" of the Todo item from "active" to "done" (_which updates the model From: model.todos[id].done=false To: model.todos[id].done=true
    • <label> - the text content of the todo list item
    • <button class="destroy"> - the button the person can click/tap to delete a Todo item.

Note: the "toggle-all" (above the "main" list) is a separate issue/feature: #50

This issue is part of the TodoMVC Feature List [Epic] #48

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions