Code Monkey home page Code Monkey logo

bookmarkd's People

Contributors

akinsho avatar oliverjam avatar piotrberebecki avatar zooeymiller 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  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bookmarkd's Issues

Wyled components

I raise this issue more as a point of disucssion that as a critcisim.

In your app.js file, you have defined what looks very much like a normal css file in your javascript.

I understand the appeal of styled components use case if you want to apply unique styling to individual small component. But I don't think this use case holds and benefits, and it adds a lot of noise to your App.js file - you could just import a file for app wide css files.

Thoughts?

Inconsistent function declarations

Your function declarations vary from parentheses free arrow functions with implicit returns x => x
to traditional javascript declarations function(x) { return x }.

Ideally you should be consistent throughout the project - as this makes it a lot easier to parse the code in future, and avoids confusion about which JS features are available.

Set up redux

We've set up react with create-react-app but we need to get Redux set up as well.

Purify functions

Currently we have some impure functions, we need to make the all of our functions (as much as they can be) pure, so that they are testable and predictable.

Update README

It's not obvious from your README what this app does.

Save state for offline use

A big part of our app being offline ready is going to be saving the state offline and updating it whenever we get a glimpse of network connection, this can be done through a combination of redux-offline and our service worker.

  • save state offline
  • upload state to DB when network present

Populate books background array

We are basing the background image of hte book cards on the first letter of the Author's name, so we need 26 backgounds to account for each potential author's name.

Never use var

Use const.

or sometimes let - but probably not let, unless you REALLY need to.

Organise initial state

We need to sort out our plan for what the initial state is going to look like (and thus ongoing state).
We need to do #35 before doing this because we need that info for setting our initial state.

Redux Offline

  • Persist page number offline
  • Cache requests made offline for later

Unintentional mutations

This line bookInfo = bookInfo.sort((a, b) => is dangerous.

calling .sort on an array mutates the original array. This means that reassigning bookInfo to a sorted version of itself is a redundant.

More importantly this could cause very weird and hard to track down bugs if you later expand this piece of code.

Set Service Worker up to cache epub files

We have our service worker set up to cache all of our front end files, but now we need to make it cache any epub files that are served from our remote amazon storage.

Acquire and host ePubs

We need to get some epubs up and hosted so that we can make our app actually works!
Initially we need around 100 books, we can update the library of books at a later date.

Set up component boilerplate

We need to initialise the structure of our application, we have used create-react-app but need to tailor it to our particular use case.

Add more metadata to our books objects

We want to add a blurb and genre to our book objects so that we can filter and give the user more info about each book.
The metadata in the ebook doesn't give us this so we'll need to use an API in the back end to get more info about the books.

  • add genre
  • add blurb

Unnecessary constant declarations

This is a bit of personal preference but here:

    const expectedTheme = 'green';
    const expectedThemeAction = {
      type: types.CHANGE_THEME,
      theme: expectedTheme,
    };

I can't see any benefit to defining expectedTheme

Add 'SHOW_TEMP_MESSAGE' action

we need an action which will show a temporary message for lots of reasons (displaying that book is available offline, letting the user know they can refresh to get more info, etc)

Optimise caching

we need to clone the stream of our fetch requests for the epubs so that we can feed one stream straight the the browser and one stream directly into the cache otherwise "the body will already be consumed" 🤘

  • optimise pre-caching
  • set cache storage when book is opened without interrupting opening of book

Finalise design

We need to finalise design before we can properly work on #29 so we need to decide on a design.

Reader UI changes

  • Change background colour
  • Change font size
  • Change text justification

Add initial styles

We need to add styles to our app, particularly the navbars, we need to make sure they're accessible too.

  • Setup base theme
  • Style top navbar
  • Style bottom navbar
  • Style snackbar
  • Style book card
  • Style book grid

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.