Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To-do creator #163

Open
NathanCheshire opened this issue Jul 20, 2022 · 4 comments
Open

To-do creator #163

NathanCheshire opened this issue Jul 20, 2022 · 4 comments
Assignees

Comments

@NathanCheshire
Copy link
Owner

Make a to-do keeping widget with preferences in the frame for what the check color or shape can be, categories, and multiple lists. .todo extension

@NathanCheshire NathanCheshire self-assigned this Aug 12, 2022
@NathanCheshire
Copy link
Owner Author

NathanCheshire commented Aug 12, 2022

Actually lets store a todo as a json file. Json for a todo:

{
    "name":"clean room",
    "state":"CHECKED",
    "section":"Room",
    "color":"50EF68",
    "created_at":2745983453,
    "updated_at":2352342342,
    "checked_at":2352342432,
    "unchecked_at":""
}

@NathanCheshire
Copy link
Owner Author

Allow filtering by section, color, alphabetical, reverse, etc. Color sorting works by hex digits so we can directly compare using hex numbers and >/<.

@NathanCheshire
Copy link
Owner Author

Make this pretty and similar to notes widget

@NathanCheshire
Copy link
Owner Author

NathanCheshire commented Mar 10, 2023

/**
 * A todo item for the todo list widget.
 */
public final class TodoItem {
    /**
    * The name/text of this todo item.
    */
    private String name;

    /**
    * The state this todo item is currently in.
    */
    private State state;

    /**
    * The section this item is nested under.
    */
    private Section section;

    /**
    * The text color for this item. 
    */
    private Color textColor;

    /**
     * The color for the check/dash mark.
     */
    private Color checkColor;

    /**
    * The instant at which the item was created at.
    */
    private Instant createdAt;

    /**
    * The instant at which the text was updated at.
    */
    private Instant textUpdatedAt;

    /**
     * The instant at which the state was updated at.
     */
    private Instant stateUpdatedAt;

    /**
     * The valid states of a TodoItem.
     */
    private enum State {
        CHECKED,
        UNCHECKED,
        DASHED,
    }

    /**
     * Constructs a new todo item.
     *
     * @param name the name/text of the todo item
     */
    public TodoItem(String name) {
        Preconditions.checkNotNull(name);
        Preconditions.checkArgument(!name.isEmpty());

        this.name = name;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant