Coder Social home page Coder Social logo

kiwi-ruby-2017's People

Contributors

jasminwong avatar libbyberrie avatar mermop avatar ndorfin avatar niceking avatar nigelramsay avatar parndt avatar raquelxmoss avatar steveh avatar terrcin avatar tobydallder avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiwi-ruby-2017's Issues

Performance improvements

This isn't so much an issue as a log of performance improvements to the site.

Test setup

WebPageTest

Node: Australia, EC2
Browser: Chrome
Connection: Cable
Number of passes: 3
Type: First and repeat view

Lighthouse 2.0

Running Chrome's new Audit feature: Lighthouse.

WebPageTests

Date SpeedIndex Description
2017-08-24 11PM 3900 Baseline
2017-09-06 9PM 3000 โœ… Images reformatted: 1.5MB to 0.9MB
2017-09-09 1PM 2635 โœ… HTTPS, CloudFlare enabled
2017-09-10 11PM 2660 ๐Ÿ”บ Less Fonts, Static Map, Slow jQ CDN
2017-09-16 12PM 2372 โœ… No jQuery, Asset hashing, 550KB
2017-09-26 5PM 2212 โœ… Preload, async, turbolinks, less fonts
2017-09-28 8AM 2008 โœ… ServiceWorker, Inline CSS
2017-09-29 10PM 1908 โœ… Clean up some of the SW pre-cache
2017-11-01 10AM 599 โœ… Self-hosted fonts, CSS cleanup

Lighthouse Tests

Date PWA Perf A11y Practices Description
Aug-24 27 34 94 58 Baseline
Sep-06 27 50 โœ… 94 58 Images reformatted
Sep-09 45 โœ… 54 โœ… 94 75 โœ… CloudFlare, HTTPS, PWA
Sep-10 45 72 โœ… 97 โœ… 83 โœ… Less fonts, Static map
Sep-16 55 โœ… 88 โœ… 97 85 โœ… No jQuery, Asset hashing
Sep-18 73 โœ… 83 ๐Ÿ”ป 97 100 โญ๏ธ Manifest and link fixes
Sep-26 73 โœ… 91 โœ… 97 100 โญ๏ธ Preload, async, turbolinks
Sep-28 100 โญ๏ธ 97 โœ… 97 100 โญ๏ธ ServiceWorker, Inline CSS
Nov-01 100 โญ๏ธ 97 97 100 โญ๏ธ Self-hosted fonts, CSS cleanup

HTTPS required

Hi nzruby,

I'm working on a fork that'll add ServiceWorkers, but these ServiceWorkers won't work if the site is not served over SSL/TLS.
Who can I get in contact with to organise this certificate? Or can someone please take a look at getting a free certificate through LetsEncrypt.org?

Thanks!
-Shaun

Font-awesome showing up in the builds

Hey @mermop

You've been quiet - hope you're doing OK!

If the build_cleaner script we added is not working as we intended, it could be because webpack uses the .tmp directory for handover to Middleman. That directory might still have the font-awesome files lying around.
If you delete the .tmp directory before a build you should get a nice clean build.

-S

Set up Caching policies

During a build and deployment, we should set the following caching policies in config.rb

Asset Cache-Control, max-age = years
HTML Cache Control for HTML: max-age 5 minutes
Individual Cache Control: service-worker.js max-age: 0, must revalidate.

Continuous deployment

So that we can store environment variables securely without making it harder for people to deploy the website, let's think about bringing in Travis or something.

Maybe we could even.. write a test??

Remove unused assets from the ServiceWorker pre-cache

An audit is required, but it looks like the following files are included in the pre-cache, and they might not used by the client:

Fonts:

/assets/public/fonts/fontawesome-webfont.eot (Not sure where theses fontawesome files come from - remnants of a build folder?)
/assets/public/fonts/fontawesome-webfont.ttf
/assets/public/fonts/fontawesome-webfont.woff
/assets/public/fonts/fontawesome-webfont.woff2
/assets/public/fonts/fontawesome-webfont.svg

/assets/public/fonts/OleoScriptSwashCaps-Regular.woff2 (This is now a logotype on the homepage)
/assets/public/fonts/YoungSerif-Regular.woff2 (Not used)

Images:

/images/sponsor-logos/sponsor_addressfinder_770.png (Not used)
/images/sponsor-logos/addressfinder.png (Not used, was reformatted)
/images/sponsor-logos/boost-horizontal.png (Not used)
/images/sponsor-logos/sponsor_boost_500.png (Not used)
/images/sponsor-logos/sponsor_boost_770.png (Not used)
/images/sponsor-logos/sponsor_boost_tall_770.png (Not used)
/images/sponsor-logos/boost-tall.png (Not used)
/images/sponsor-logos/icelab.svg (Not used)
/images/sponsor-logos/sponsor_loyalty_500.png (Not used)
/images/sponsor-logos/loyalty.png (Not used, was reformatted)
/images/sponsor-logos/sponsor_optimal_workshop_770.png (Not used)
/images/sponsor-logos/optimal.png (Not used, was reformatted)
/images/sponsor-logos/sponsor_rabid_770.png (Not used, was reformatted)
/images/sponsor-logos/sponsor_rabid_500.png (Not used - we should use this on the scholarships page)
/images/sponsor-logos/sponsor_storypark_500.png (Not used - we should use this on the Childcare page)
/images/sponsor-logos/sponsor_storypark_770.png (Not used)
/images/sponsor-logos/sponsor_the-last-pickle_770.png (Not used)
/images/sponsor-logos/the-last-pickle.png (Not used, was reformatted)
/images/sponsor-logos/sponsor_trineo_500.png (Not used)
/images/sponsor-logos/trineo.png (Not used, was reformatted)
We use gembirb-up.svg as the footer logo, but these seem to be copies:
/images/gembirb.png (Not used, source image?)
/images/gembirb.svg (Not used, source image?)
/images/kiwirubylogotype.svg (Not used, source image?)
/images/rubylogo.png (Not used, source image?)
/images/sirocco.gif (Not used on the site - maybe externally?)

There are a few choices we could make with these files after we've audited them:

  • move these files outside of the source folder, so we keep them as originals, but they don't get published to the website
  • we delete them
  • we add their patterns to the offline_cache_ignore.json data file so that the service worker ignores them

Add a Gzip build step

The site should g-zip all content, excluding PNGs and JPGs.
SVGs, Icons, HTML, JS, CSS, XML, Text and JSON can all be gzipped during the end of the build process.

Webfont audit

Hi! ๐Ÿ‘‹

I thought the use of webfonts on the site was a little out of control, so I did an audit and found the following:

  1. It looks like Work Sans is being used for most of the site: >99%
  2. Source Code Pro is intended to be used for sponsors names in the sponsors partial, if the sponsor.show_name boolean is true. But none of the sponsors are represented as such.
  3. Source Sans Pro is only used once in the .hero_date element on the homepage. This could be replaced with a suitable cross-browser font, saving us 2 blocking HTTP requests and ~15KB.
  4. YoungSerif and OleoSwash are declared, imported, make 1 blocking request each, but are never used.

Recommendations:

  1. Leave Work Sans as is.
  2. Remove Source Code Pro
  3. Replace Source Sans Pro with something like Droid Sans or sans-serif
  4. Remove YoungSerif and OleoSwash

Next steps:

We could see a healthy improvement in rendering performance if we remove these fonts. I'm happy to do the work with your blessing :)

-S

Mobile menu function is executing twice

Turbolinks should be responsible for calling the mobile menu script. i.e. the mobile menu script mustn't self-execute, else there'll be two click handlers competing with one another.
โš ๏ธ @mermop โš ๏ธ

Misc. small improvements worth doing

Hi! ๐Ÿ––

Here are some things I could do for the site, if needs be:

  • Wrap the Google Analytics script in a DoNotTrack check. Being nice web neighbours.
  • Incorporate the GA Script in the global JS. Doing so reduces the HTML weight, and adds cacheability to the script that invokes GA.
  • Add Schema.org metadata where it counts.
  • CSS audit - clean up unused CSS, break it up into partials. See: #72
  • Expose sponsors as independent URLs
  • Expose speakers as independent URLs
  • Expose the venue as an independent URL

Tick all those you'd like me to tackle :)

-S

Google Maps loading alternatives?

Would it be possible to consider alternatives for the Google Maps instance on the homepage, please? The reason I'm pushing for an alternative, is that come ServiceWorkers, we want something we can cache. A static image would be great to cache.

We could:

  • Link to a venue page.
  • Replace the inline Google Maps instance with a stylised map.
  • Replace the inline Google Maps instance with a Google Static Maps image.
  • Look at lazy-loading the inline map using the new IntersectionObserver, or at least delaying the load till last.

Having a static image with a link to a Google Maps URI would mean a handset would open the Google Maps app if it was installed.

What do you think @mermop?

Fingerprint assets

We should fingerprint assets (index.css and index.js in particular) to prevent overzealous caching messing with deploys

Remove the duplicate main menu

Hi! ๐Ÿ‘‹

The main menu is repeated, once for mobile, the second for larger screens.
With some breakpoint-related CSS, we can shift one menu from mobile mode to tablet mode pretty easily.

If you're happy with that plan, I'll look at doing the required changes in a PR.

-S

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.