GithubHelp home page GithubHelp logo

breadule's People

Contributors

pauloday avatar

breadule's Issues

Improve timer add boxes

Right now they're pretty janky, they maintain 00:00 formatting but they're in minutes. Initially they should just be an amount of minutes, but later (once foundation is done), they can be more fancy.

Add notes

Add a field for notes while the schedule is running. These are just like instructions but they can only be edited while the schedule is running.

Finish api

  • Update to ring/ring-json for responses
  • Implement post request
  • Ensure db interface is working (I think it is, but double check)

Fix production build

There's an error when running lein with-profile prod uberjar. I think it has something to do with a version mismatch between dependencies, specifically with the ajax library (but I'm not sure). Using lein deps :tree and trying out different exclusions is probably the way to go.

Add public log

Add a public log so I can automatically post my completed bakes. There should be options to hide/delete schedules, in case I have to restart one or something.

Add image notes

Related to #12, but there should be a way to attach images to stages while the schedule is running, and after it's done (as part of the public posting phase).

Display stage start times

Once #5 is done, stages should have a start time next to them while the timer is running. This can be calculated on the fly, so no new variables need to be added to db.cljs. The way this start time is displayed can probably also be used to indicate which stage is currently running, instead of underlining the title of the stage.

For adding this, just add a new calculate-start-time function in timer.cljs. It should return a formatted time string. Use this in stage-title in the stage view file.

Implement DB storage/retrieval

Right now the DB stuff is incomplete. I have stored objects in the DB, but I'm not sure if it's working currently and I haven't retrieved them. There are api endpoints for this, and some DB interaction functions. But they aren't really hooked up.

Split up views

The views have too many big functions. Things like buttons need to be split into separate functions. There should also be more functions for common patterns, like labeled forms. It might be a good idea to make views/util.cljs or something.

Add localstorage

This is going to be available for anyone, so it should use localstorage to keep track of schedules.

Code style

The style is probably not great. Take a look at some large re-frame projects to see how they organize things, variable naming, etc. Things to look at:

  • camelCase vs. dash-separated. Decide on one and standardize
  • How logic is split between views/events/subs. Should views be very simple with business logic in events/subs, or vice versa? Or some mix? Or maybe it they should all be simple and logic is in it's own utils folder/files (I'm leaning towards this one).
  • Spacing on lists of key/value pairs. Most clojure I've seen does it like this:
`(ns breadule.views`
  (:require
   [re-frame.core   :as re-frame]
   [re-com.core     :refer [h-box title single-dropdown md-icon-button]]
   [breadule.subs   :as subs]
   [breadule.events :as events]

Where all the values are lined up with varying amounts of space between the key and value. I like this, but my vscode setup doesn't do it automatically, so it's not in the code right now. This should be done as part of the basic indentation formatting, so set this up (and write down how), then apply it across the codebase. It should be done on things like :require lists, and in the views.

Update timer framework to use timestamps

Right now the timer sets a time for a step, then counts that down once a second. I want to update it so it'll use a starting timestamp, then calculates the current timer/stage based on that and the current time. This will enable a couple of features:

  • If the timer stops (i.e. the page closes), we can pick up where we left off
  • Better logs (when that gets implemented)
  • Give a time that each stage starts
  • Scheduled starts (i.e. start this schedule at 6am tomorrow)

To add this feature:

  • Add a :startTimestamp to db.cljs
  • if :startTimestamp is not nil when the page is loaded (i.e. it came from the db), calculate the current time and start the timer
  • if it is nil, behave as before
  • when the timer is started, also set a starting timestamp

Write README

The current README is an autogenerated one from the re-frame template. Write a better one!

Organize timer code

There's too much stuff inside the views. The timer.cljs file has a lot of non-view stuff. I'm not sure what the idiomatic way for re-frame applications is, but I think there should be pure, non view code separated from display code. Some of it could probably be added to subs/events (e.g. stage-time subscription that returns a formatted string from the stuff in the db).

Add DB storage

Once the ajax stuff is set up, figure out when the data should be stored and implement it. I'm not sure exactly when, but probably all of the check buttons should save the data. Not sure if it should save whenever you type something, but I'm leaning towards no.

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.