Coder Social home page Coder Social logo

buddy's Introduction

As I'm working through Brian Holt's Intermediate React course, I am overhauling the styles and making changes as I go.

This is essentially a fork of the original course repo master branch. The initial code is licensed under the Apache 2.0 license.


Things I've done:

Created a new logo and restyled everything, added an image placeholder.

Improved markup accessibility; added focus-visible to handle keyboard-only focus styles.

Used react-autosuggest to create dropdowns.

Wrote more tests.

Implemented likes.

Added plugins:

Upgraded to babel 7.

Set up SSR using this example. Added a separate build step with Parcel instead of babel-node as it's not recommended for production.

Cleaned the data received from the petfinder API.

Added a preloaded latin-only font using this technique to get rid of FOIT.

Enabled gzip and brotli compression in Parcel using parcel-plugin-compress and on the server using express-static-gzip.

Notes:

Petfinder API data is a mess: responses may contain announcements that look exactly like animal profiles, with no logical way to filter them out. I'm leaving it as is for now.

Suspense doesn't support data fetching and SSR yet so I'm using react-lazy-images and react-loadable for now.

I used react-select at first, but as it also relies on Emotion, I didn't manage to make it render the styles on the server (probably due to a conflict with my Emotion instance). React-select has ~1000 open issues, including recent ones with SSR, so I switched to the much more flexible (and lightweight!) react-autosuggest.

There is an issue with Babel: regeneratorRuntime polyfill for async/await is not included with useBuiltIns: "usage".

Parcel tree-shaking is still experimental and bugged:(

Todo

  • Form dropdown & input:focused styles
  • Change favorites state structure to O(1) lookup (optional)
  • Move Results and Pet to common, make Pet rendering more flexible via children
  • Mobile card layout
  • Clean up the media field
  • Photo gallery
  • Split components are built both on client and server - serve them on demand?
  • Search multiple breeds (fetch all in a thunk)
  • Remove no results fallback on startup
  • Cache breedLists for previously searched animals
  • Pagination
  • Show form under header on search icon click if current route is Search, navigate to / if not (instead of the SearchParams route)
  • Favorites route
  • In the details page, link to search all animals of this breed in this location
  • Persistence of liked pets to localStorage via redux-persist
  • Manage scroll position in the search list
  • I might swap Redux for Hooks. Anyway, Redux is a complete overkill in this case and is included just for practice.
  • Shelter maps?

buddy's People

Contributors

penumbra1 avatar btholt avatar 1marc avatar notdrone avatar

Watchers

James Cloos avatar  avatar

buddy's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

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.