Coder Social home page Coder Social logo

crown-pa-docs-site's Issues

Server-side render initial requests

Load tests should be done to see if this is worthwhile - the current splash screen aproach may mask slow loading quite well, which saves a lot of server-side code

eslint

add eslint rules and build steps etc

Migrate to Gulp 4

Move the build process over to gulp 4.

  • change gulp.start to gulp.series or gulp.parallel
  • change run-sequence to gulp.series

Root path doesn't work

The site works, but not from the root, only from subpaths.

Since version 0.2.0

It looks like a click handler isn't registered on the crown-docs-splash element, or it's children.

Transpile more selectively

In fixing #52 everything's got es5ified, which is sad for guys using the latest and, arguably, greatest browsers.

The original plan was to use nomodule to serve transpiled code to old browsers, and idiomatic code to browsers that support modules, but this lead to issues with safari, which supports modules, but chokes on some of the custom elements bits (although the polyfill should handle this, so something funky's going on still).

Due to the need for an es5 custom elements shim/loader, which requires all code to be transpiled to es5, the most practical way of handling legacy browsers is just to transpile everything to es5. babel-preset-env could be used to do this more selectively, but this adds quite a headache for what is, really, a small site.

I still like the idea of an all-or-nothing approach, as it makes maintenance really easy. However, given that the latest safari is pretty popular, a three-route approach could be taken

  • idiomatic loads in via modules, and is not transpiled. Code should be written using the latest ECMAscript features, but cannot be committed to master (and then tagged/released) until it runs in chrome stable. Tests need adding to travis for this, and github setting up accordingly
  • safari loads in via modules ideally, although a bundle is probably easier, and is transpiled to last-2-versions safari
  • legacy loads in via a single rolluped bundle transpiled down to es5

The loader script will decide which of these is the right approach to use.

Service worker takes many reloads to cache all assets

It takes about 5 reloads to cache enough assets for the site to load. In the meantime, all kinds of failures occur.

The shadycss polyfills are a problem after a couple of reloads

Then the githubs start loading, each rount trip requiring a reload

Progressive enhancement isn't very progressive

Browsers that don't support js modules get left in the dark ๐Ÿ˜ž

This affects older versions of Safari quite badly

  • check feature detection for service worker
  • find alternative for css grid for older browsers
  • add rollup step to build
  • add transpilation step to build (babel)
  • add nomodule code to load nasty big bundle

This could be worth reflecting in the ui somehow

markdown image URLs need rewriting

Requests for images need to be rewritten, as the images don't exist at the path specified.

The markdown should still be a relative path, as this makes composition on github far easier.

Need authentication to run firebase

When running firebase serve, the console reports this:

Visit this URL on any device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=206911858&redirect_uri=http%3A%2F%2Flocalhost%3A9005

Waiting for authentication...

It automatically loads the Google oAuth page above and waits for a login to be entered (which I don't have!).

Add splash screen

Create a splash screen to choose which set of docs to look at:

  • The Living Room
  • Bishopshalt
  • PA Concepts
  • Something else, maybe an "about the site"

This will consist of four squares which, when clicked, will expand, then fade away to reveal the main docs site.

Whilst the animation is happening, the correct docs can be loaded in the background, like they've been there all along.

Build to staging folder

Currently, the build runs tests, then builds, which is slow.

By building to a temporary folder, the actual build can be done in parallel with the tests (which themselves could run in parallel).

If the tests pass, the old build can be deleted, and the new build can take it's place. If not, the new build can be deleted, or stored for analysis.

  • build to temp folder
  • add signalling for whether all build steps passed
  • add step to end of build to do folder swap

this might be a good use case for pump

minify code

Use uglify-es and gulp-uglify

Also needs/benefits from pump - if this looks nice, consider using throughout build.

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.