Skip to content

Simple motivational To-Do app built using HTML, CSS, and JavaScript

Notifications You must be signed in to change notification settings

larevolucia/task-wrangler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

191 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaskWrangler

Table of Contents

Summary

Many people feel overwhelmed when managing their to-do lists, making it difficult to stay motivated. Traditional to-do apps often overcomplicate things with excessive features while neglecting simplicity and motivation. As a result, these apps can become cumbersome to use, causing users to lose focus on their goals and abandon task management altogether.

TaskWrangler goes back to basics and is designed to be a simple, beginner-friendly to-do app aimed at making task management intuitive and motivating.

The app enables users to:

  • Organize tasks effectively by adding, editing, and deleting tasks.
  • Organize tasks based on their status of completeness.
  • Prioritize tasks by setting due dates and highlighting overdue items with visual cues.
  • Track progress visually with insightful charts.

By focusing on simplicity, usability, and motivation, TaskWrangler empowers users to manage their tasks consistently without feeling overwhelmed.

image

🔗 Live Link to access site: TaskWrangler


📌 Site Goals

Core Functionality

  • Allow users to create, edit, and delete tasks easily.
  • Provide status updates (e.g., "To Do", "In Progress", "Completed") for better task management.
  • Enable users to set and view due dates for their tasks.

Visualization and Tracking

  • Implement an Insights page with a chart to visualize overall task completion.
  • Highlight overdue tasks with visual indicators.

User Experience

  • Design a clean and responsive UI for seamless navigation on all devices.
  • Ensure data persistence so tasks remain saved after page refreshes.

Scalability

  • Make the app easy to expand in the future, with potential features like task categories, prioritization, filtering, or user authentication.

👤 User Stories

The Planner

These users are naturally organized and detail-oriented. They use the app to maintain their structure and ensure nothing is overlooked.

Needs:

  • A clean and straightforward interface for inputting tasks.
  • Features like status management/categorization and due dates for precise task tracking.

Behavior:

  • Frequently updates and organizes tasks.
  • Likes visual indicators of progress for a quick overview of accomplishments.

User Stories:

The Juggler

These users juggle multiple responsibilities at work and home. They need the app to streamline their tasks and reduce stress.

Needs:

  • Categorization to separate work, personal, and other types of tasks.
  • Visual cues for overdue or high-priority tasks.

Behavior:

  • Adds many tasks but may only complete a few daily.
  • Uses filters or categories to focus on specific areas.

User Stories:

The Inspirer

These users are less focused on task management and more on personal growth and motivation. They find inspiration in milestones and uplifting content.

Needs:

  • Regularly updated motivational quotes or messages.
  • A visually appealing progress bar or milestone tracker.

Behavior:

  • Logs in to see motivational content even when tasks are minimal.
  • Values the app for its inspiration as much as its functionality.

User Stories:


📂 Backlog

The following features were originally planned but were not implemented in this phase due to a shift in priorities. Instead, we focused on enhancing the user experience by introducing:

Features Not Implemented:

1️⃣ Motivational Quotes at Milestones (The Juggler)

2️⃣ Task Categorization (The Inspirer)

These features remain on the backlog for potential future development as TaskWrangler continues to evolve.


🎨 Design

Colors

Considering the primary function of the app is managing tasks, it was decided to keep with simple color scheme. Worldwide recognizable colors were selected for tracking progress: green, yellow, red.

For the base of the app, a neutral blue was chosen, since it is a calming color that doesn't clash with the traffic light scheme. A white hex was selected for the background and a black hex was selected for the text color.

Color Palette image

Fonts

For TaskWrangler, Inter was selected as the primary font, used for the body text and logo, and Roboto as the secondary font for headings and toast notifications to optimize readability and maintain a clean, modern aesthetic.

Why Inter for Body & Logo?

  • Highly readable for long-form text, ensuring tasks and descriptions are easy to scan.
  • Modern and neutral, fitting TaskWrangler’s minimalist design.
  • Strong identity when used in the logo, reinforcing brand consistency.

Why Roboto for Headings & Toast Notifications?

  • Bold and structured, making H1 and H2 stand out for clear visual hierarchy.
  • Slightly condensed design, optimizing space for notifications without reducing legibility.
  • Pairs well with Inter, balancing a clean UI with strong contrast where needed.

Buttons

Button States image

Anchor

Anchor States image

Wireframes

Mobile Design image

🚀 Features

1. Navigation

Provides a clean and accessible navigation system for seamless interaction with the app. Users can easily create tasks, view task lists, and access insights.

  • Focus management: Uses document.activeElement tracking to return focus to the last interacted element after closing modals.
  • Keyboard navigation: Supports Tab key navigation across buttons, links, and modals.
  • ARIA attributes: Ensures screen reader compatibility with aria-labelledby, role="list", and aria-live for live updates.
  • Sticky Navigation: The header remains fixed at the top using position: sticky, improving accessibility.
responsive-design

Reference: Hidde Blog, Zach Patrick and More

2. Create Tasks with Ease

Allows users to add new tasks with essential details such as title, description, and due date.

  • Modal Form Implementation: Task creation is handled within a dynamically generated modal.
  • Form Validation:
    • Ensures title is required before submission.
    • Prevents past due dates using min="${getTodayDate()}".
    • Displays error messages using JavaScript.
  • LocalStorage Integration:
    • Tasks are stored in localStorage and retrieved on page load.
  • Keyboard Shortcuts:
    • Enter key submission for faster input.
    • Escape key to close the form.
create-task

Reference: DEV.to, GeeksForGeeks and More

3. Task Management (CRUD)

3.1 Task List View

Displays all tasks in card format, each showing status, due date, and action buttons.

  • Dynamic HTML Generation: Tasks are rendered dynamically using innerHTML within #tasks-container.
  • Accessibility Features:
    • Uses role="list" and role="listitem" for semantic structuring.
    • aria-labelledby links task titles to their containers for screen readers.
  • Overdue Task Highlighting:
    • If a task’s due date is past today’s date, the task is assigned an overdue class that applies a red color.
image

3.2 Read Task Details

  • Clicking a task card opens a modal displaying status, description, and due date.
  • Implemented using a dynamically created div inside #content-container.
  • Read view also includes action buttons to minimize back and forth on the UI.
  • Uses trapFocus() function to lock focus within the modal.
image

Reference: Codepen, StackOverflow and More

3.3 Edit Task Status

  • Users can change a task’s status (To-Do → In Progress → Done) directly from the list view.
  • Dropdown Selection: A simple dropdown menu is provided for easy status selection.
  • Auto-Save & UI Update:
    • Upon selection, the task status is immediately updated in localStorage and reflected in the UI without requiring a page reload.
  • Accessibility Support:
    • Fully navigable via keyboard (Tab and Enter keys).
  • Visual Feedback:
    • Color-coded indicators adjust automatically to reflect the new status.
    • A toast notification confirms successful status updates.
change-status

3.4 Edit Task

  • Users can update title, description, status, and due date.
  • Previous values: Pre-fills form with task current values for users' convenience.
  • Prevent Unnecessary updates: Compares current and new values before updating localStorage and sends notification of use cases (edit success, no edits).
  • Prevent Overdue Edits:
    • If a task is overdue, past dates are still allowed for consistency. Earliest date is set to original due date using min=${currentTask[0].dueDate}.
  • Auto-save on Submit: Updates localStorage and UI without page reload.
image

3.5 Delete Task

  • Confirmation Modal: Before deletion, users receive a confirmation prompt.
  • Persistent Storage Update: Task is removed from localStorage, and UI is updated dynamically.
  • Keyboard Navigation: Supports Enter key selection and Escape key to cancel.
delete-task

4. Smart Toast Notifications

Provides real-time feedback on task actions such as creation, updates, and deletions.

  • Dynamic Toast Generation:
    • Uses document.createElement("div") to create toast containers dynamically.
  • Auto-dismissal:
    • Uses setTimeout() to remove notifications after 5 seconds.
  • Keyboard Accessibility:
    • Tab focusable and closable using Escape key.
  • Color-coded Feedback:
    • Success (green): Task added successfully.
    • Error (red): Failed to save task.
    • Info (blue): Info about action.
    • Warning (yellow): Missing required fields.
image image

Reference: Used code from GeeksForGeeks with minimal changes

5. Advanced Keyboard Navigation

  • Tab Trapping: trapFocus() ensures users can only navigate within an open modal.
  • Escape Key Handling: handleEscapeKey() allows quick modal closing.
  • Keyboard Shortcuts:
    • Enter submits forms and confirms actions.
    • Tab cycles through interactive elements.
trap-focus

Reference: Hidde Blog, Zach Patrick and More

6. Insights & Analytics (Task Progress Charts)

Uses Google Charts API to visualize task progress.

image

6.1 Status Breakdown Chart

  • Pie Chart Representation of tasks categorized as To-Do, In Progress, and Done.
  • Data Fetching: Reads localStorage and processes counts via reduce().
  • Color Coding: Uses same colors used on task cards for consistency.
    • To-Do (yellow)
    • In Progress (blue)
    • Done (green)
  • Dynamically updates as tasks are added/edited.

6.2 Overdue Task Analysis

  • Overdue vs On-Time Tasks Pie Chart
  • Highlights overdue tasks in red and on-time tasks in green.
  • Dynamically updates as tasks are added/edited.

6.3 Responsive Charts

  • Auto-resizes on window resize using window.addEventListener("resize", drawCharts).
  • Charts adapt to screen size, maintaining clarity.

Additional Enhancements

  • LocalStorage Integration:
    • Tasks persist between sessions without requiring a backend.
  • Error Handling:
    • Catches JSON.parse() failures and resets localStorage to prevent app crashes.
  • ARIA Compliance:
    • Uses aria-live="polite" for toast notifications to be screen reader-friendly.
    • aria-labelledby ensures task descriptions are properly linked.
  • Lightweight & Fast:
    • No external dependencies beyond Google Charts API.

Testing

Manual Testing

Issue #5

User actions

  • Create a task (mouse, keyboard)
  • Edit a task (mouse, keyboard)
  • Open task card details (mouse, keyboard)
  • Delete a task (mouse, keyboard)
  • Form Validation:
    • Save task (create / edit) without title
    • Save task (create / edit) with date in past
  • Move focus with tab on modal (expected to be trapped in modal)
  • Close modals with escape key
  • Save tasks (create / edit) with enter on submit button
  • Read insights chart
  • Navigate to GitHub in new tab

Technical testing

  • Used Developer Tools and Console to validate changes in localStorage (Developer Tools > Application > Storage > Local Storage)

Automated Testing

Issue #26

  • Jshint.com: No errors or warnings.

  • Jigsaw CSS Validator: No errors. Warnings related to Google Fonts and use of variables are shown.

  • W3C HTML Validatior: No errors or warnings.

  • Accessibility Checker: Audit Score 95

  • WAVE: No errors. One alert related to both logo and "Tasks" links on nav directing user to same page.

  • Lighthouse: Tests performed for mobile device

    Desktop Tasks
    Desktop Insights
    Mobile Tasks
    Mobile Insights

Bugs & Issues

All issues are documented in this Project View

Bug Fixes and Updates

This document contains a list of bugs and their corresponding fixes, organized by ticket creation date.

List of Fixed Issues

1. Create Task Not Working / Add new task button inconsistency

  • Issue: #18, #25
  • Summary of Fix: Change 'create-task' id from icon to button.
  • Commit: 4e7aad2

2. CloseModal can't access form container

  • Issue: #19
  • Summary of Fix: The formContainer variable was changed from a local to a global scope, allowing the CloseModal function to properly access and close the form container.
  • Commit: 63fa163

3. CloseModal function inconsistent behavior

  • Issue: #20
  • Summary of Fix: Ensured the modal is fully removed from the DOM after being triggered once, resolving the inconsistent behavior of the CloseModal function.
  • Commit: b283efa

4. Impossible to Edit Overdued Task

  • Issue: #21
  • Summary of Fix: Changed min attribute on form to match the original dueDate instead of today.
  • Commit: 42891af

5. Cards appear side by side instead of stacked

  • Issue: #27
  • Summary of Fix: Adjusted the CSS by modifying the display property of the task-container to ensure cards are stacked vertically as intended.
  • Commit: 3816ee6

36. emptyStateMessage is not defined

  • Issue: #28
  • Summary of Fix: Declared the emptyStateMessage variable before calling it to prevent the "ReferenceError: emptyStateMessage is not defined" error in the drawCharts function.
  • Commit: 1c92d82

7. Tasks not updating

  • Issue: #29
  • Summary of Fix: Re-added code that was accidentally removed when creating the conditional logic that displays toast notifications for both unchanged and changed tasks.
  • Commit: 8db3584

8. W3C validator issues

  • Issue: #31
  • Summary of Fix: Addressed W3C validation errors and warnings in index.html and insights.html by correcting the HTML structure and ensuring compliance with W3C standards.
  • Commit: 376cc57, 717fb83

9. Jigsaw error: f0f0f0 is not a color

  • Issue: #32
  • Summary of Fix: Corrected the color value from f0f0f0 to #f0f0f0 to comply with valid color formats, resolving the Jigsaw validation error.
  • Commit: f95a81a

10. WAVE alerts and errors

  • Issue: #33
  • Summary of Fix: Fixed accessibility issues identified by the WAVE tool, including missing headings and low contrast text, to enhance the website's accessibility.
  • Commit: f95a81a, f61438d, 48715dd, 97461cf

11. DueDate line break on Overdue Task

  • Issue: #35
  • Summary of Fix: Adjusted the CSS adding a min-width to prevent line breaks in the due date display for overdue tasks, ensuring the date appears on a single line.
  • Commit: 1d109ad

12. Last focused element lost after Toast Notification / Delete task

  • Issue: #30
  • Summary of Fix: Initial fix implemented tabindex to contentContainer element and directed the focus to that element after delete. Later that was moved to taskListContainer. Final fix moved the notifications code to an idenpendent js file and introduce parameters for lastFocusedEl and a fallbackFocusEl. The new parameters allowed more flexibility to define behavior in different scenarios and prepares for further use when scaling the application.
  • Commit: 78ae558, 0c7afb1, 29fdb24

13. Focus resets to taskListContainer

  • Issue: #37
  • Summary of Fix: Explicit reset of focus on closeModal and closeToast resets the focus even after user has navigated to other elements using tab. Conditional was added at the end of each function to check if the focus was already on a valid element, preventing explicit reset after user navigated elsewhere.
  • Commit: 2673c2c, 2d34ec0

14. Multiple Empty Task List messages on Insights page

  • Issue: #38
  • Summary of Fix: Added conditional to handleEmptyInsights to only append message if the message doesn't already exists.
  • Commit: 03716e9

15. Change Status on Mobile not working

  • Issue: #40
  • Summary of Fix: Created addEventListener for input as change event was not triggering updateTaskStatus() on iOS
  • Commit: 2a24fbc

Unfixed issues

1. Jigsaw warnings: Font Imports and variables

  • Issue: #26
  • Justification: It's common practice to use imports for fonts and variables for styling.

2. WAVE alerts: Redundant link: Adjacent links go to the same URL

  • Issue: #33
  • Justification: It's common practice for logo to also redirect to home.

3. Error loading charts

  • Issue: #36
  • Summary of Fix: DataTable was undefined when loading the screen. I couldn't fix it, but to mitigate it, I added a try...catch to prevent app from crashing. Error seems non-critical as the charts eventually do load without crashing. Common user is unlikely to notice any issue.
  • Commit: d664ec4

Deployment

This project was deployed using GitHub Pages. Steps to deploy are as follow:

  1. Go to your repository on GitHub.com
  2. Select 'Settings' on the repository top menu.
  3. Select 'Pages' on the left side menu.
  4. Under 'Build and deployment', go to 'Branch' dropdown and select 'main'.
  5. Ensure that the selected folder is /root
  6. Once done, click on 'Save'.
  7. You should receive a deployment confirmation, followed by the web address.

Technologies Used

Languages

  • HTML5
  • CSS
  • JavaScript

Resources Used


Credits

Logo Attribution

Acknowledgments

  • Friends and family who tested the application to provide valuable feedback.
  • My mentor for pushing me to improve the code

About

Simple motivational To-Do app built using HTML, CSS, and JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published