front

The Frontiers Issue with Guest Editor President Barack Obama - President Barack Obama on Bureaucracy VS. Moonshots

WIRED guest editor President Barack Obama, WIRED editor in chief Scott Dadich and MIT Media Lab director Joi Ito discuss where the center of artificial intelligence research is and where it might be.




front

The Frontiers Issue with Guest Editor President Barack Obama - President Barack Obama on How We'll Embrace Self-Driving Cars

WIRED guest editor President Barack Obama, WIRED editor in chief Scott Dadich and MIT Media Lab director Joi Ito discuss ethical concerns around artificial intelligence used in self-driving cars.




front

The Frontiers Issue with Guest Editor President Barack Obama - President Barack Obama on the True Meaning of Star Trek

POTUS is a Trekkie! WIRED guest editor President Barack Obama, WIRED editor in chief Scott Dadich and MIT Media Lab director Joi Ito discuss the original Star Trek series and what it reveals about our common humanity.




front

The Frontiers Issue with Guest Editor President Barack Obama - President Barack Obama on What AI Means for National Security

WIRED guest editor President Barack Obama, WIRED editor in chief Scott Dadich and MIT Media Lab director Joi Ito discuss the challenges of cyber security in the age of artificial intelligence.




front

The Frontiers Issue with Guest Editor President Barack Obama - President Barack Obama on the Future of AI

President and WIRED guest editor Barack Obama discusses the future of artificial intelligence with WIRED editor in chief Scott Dadich and MIT Media Lab director Joi Ito.




front

Exploring the Next Frontiers

Panelists from the White House Frontiers Conference discuss the new frontiers of space, science, medicine, transportation, and cities. And their must haves for frontier expeditions.




front

Frontier problems in quantum mechanics / Lee Chang, Molin Ge

Zhang, Li, 1925- author




front

Confronting Dystopia [electronic resource] : The New Technological Revolution and the Future of Work / edited by Eva Paus




front

Explore/create: my life in pursuit of new frontiers, hidden worlds, and the creative spark / Richard Garriott with David Fisher

Hayden Library - GV1469.34.A97 G37 2017




front

Web Tools #349 - DOM Snippets, Front-end Frameworks, Media, Uncats

Web Tools Weekly

Issue #349 • March 26, 2020

Advertisement via Syndicate
Have Happier, More Productive Video Meetings
Team.video makes it easier and faster for remote teams to work together by offering user friendly video meetings with agendas, collaborative notes, and emoji responses. No download required and it’s free to use.
Try Team.video for FREE!

Although I often include quick DOM scripting tips in the intro of this newsletter, for this week, I'm just going to point you to a great little resource that was sent to me by reader Phuoc Nguyen:

It's more or less a repository of basic, intermediate, and advanced native DOM scripting snippets.
 
HTML DOM: A resource of native DOM snippets

Here are some of the advanced and intermediate examples:
  • Make a draggable element
  • Resize columns of a table
  • Sort a table by clicking its headers
  • Calculate the size of the scrollbar
  • Communicate between an iframe and parent window
There are more than 80 tips currently listed and I'm sure he'll add more later. Even if you don't necessarily use any of the snippets in a real project right away, there are plenty of little coding tidbits you can glean form the example code, which is all just vanilla JavaScript with no library or framework involved.

So check out HTML DOM, I'm sure you'll have lots to investigate!
 

Now on to this week's tools!
 

Front-end Frameworks

Have Happier, More Productive Video Meetings
Team.video makes it easier and faster for remote teams to work together by offering user friendly video meetings with agendas, collaborative notes, and emoji responses. No download required and it’s free to use.   via Syndicate

chakra-ui-vue
A set of accessible and composable Vue components that you can use to build your favourite applications and sites.

Pixel Lite
A beautifully crafted, responsive UI kit based on Bootstrap 4 that includes 100 components, 3 plugins, and 3 example pages.

next-typescript-materialui-jest-starter
Very opinionated starter boilerplate for projects based on Next.js, setup with Typescript, Material-UI, and Jest.

React SaaS Template
Template for building a SaaS app or admin website using React + Material-UI.

web3-react
A simple, extensible, dependency-minimized framework for building modern Ethereum decentralized apps.

Tailwind UI
A UI components library, crafted by the creators of Tailwind CSS.

neo.mjs
A Web Workers-driven UI framework.

LitElement
A simple base class for creating fast, lightweight web components. Makes it easy to define web components – ideal for building a UI design system.

Ionic React
React version of Ionic Framework. 100+ mobile optimized React UI components. Standard React tooling with react-dom.

Accessible Components
Scott O'Hara's repo that lists all the accessible widgets and components he's built.

StarAdmin
A free responsive admin template built with Bootstrap 4.

Media Tools

Tech Productivity Newsletter
A brief newsletter featuring tools and articles for remote work, work culture, learning science, and more – all to help you be more productive.   promoted 

Croppola
Upload a photo and this tool will use AI to crop the photo for you automatically, or you can crop it manually and download the result.

Image to Colors
Online tool that extracts colors from any photo on upload.

Nuxt Optimized Images
Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).

Twilio Video React App
Demonstrates a multi-party video application built with twilio-video.js and Create React App.

react-particle-image
React component to render images as interactive particles. There's an interactive demo using the React logo that's pretty cool.

CoreUI Icons
Premium designed free icon for web and mobile, available in SVG, webfont, and raster formats.

DotMatrix.js
A small, performant class-based, dot matrix library with animated movements that respond to mouse/touch events.

react-calendar-heatmap
A calendar heatmap component built on SVG, inspired by GitHub’s commit calendar graph.

Chessboard Image
Modify chess pieces on a virtual chess board, to create chess positions, then download the image for use wherever you want. Might be cool for a chess tutorial website or blog.

Video Language
A language for making movies. Combines the power of a traditional video editor with the capabilities of a full programming language.

The Uncategorizables

Tech Productivity Newsletter
A brief newsletter featuring tools and articles for remote work, work culture, learning science, and more – all to help you be more productive.   promoted 

Mailcoach
A self-hosted email list manager. It integrates with services like Amazon SES, Mailgun, Postmark, or Sendgrid to send out mailings affordably.

Backstage
Open-source developer portal that puts the developer experience first by means of a a unified front end for all your infrastructure tooling.

dstack.ai
Collaborative data exploration. Enables individual data scientists and their teams to publish, share, and track data visualizations.

TAGX
Allows you to create video highlights and annotate the interesting parts of a video. Enter a YouTube, Vimeo, or direct video link to start annotating.

cs.opensource.google
A search engine to search Google's open source projects (Angular, Dart, Flutter, Go, etc).

Cotter
One-click secure phone number login for your apps.

Phrase
Automate localization processes. Edit language files online with your team of translators or order translations into more than 60 languages.

It's a Live
Lets you mimic a live coding presentation by prerecording the presentation, which gets triggered by random keystrokes as if you were really coding.

EasyCSV
Import spreadsheets into your App, Zapier, Google Sheets, Salesforce, or any public API in minutes.

Pico
Platform to create paywalled content, subscriptions, newsletters, etc.

A Tweet for Thought

This underappreciated Tweet by Adam Greenough should be the dev-related Tweet of the year.
 

Send Me Your Tools!

Made something? Send links via Direct Message on Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
 

Before I Go...

If you've got a lot of extra time at home (and you should!) you might like Codepip. There you'll find a number of different interactive online games that teach you various aspects of front-end development.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
webtoolsweekly.com
@WebToolsWeekly
PayPal.me/WebToolsWeekly




front

Would You Move After a Shooting On Your Front Lawn?

How we came to answer the question in Memphis.




front

Frontiers of strategic alliance research: negotiating, structuring and governing partnerships / edited by Farok Contractor, Rutgers University, New Jersey, Jeffrey Reuer, University of Colorado Boulder

Dewey Library - HD69.S8 F765 2019




front

Frontline (Television program : Australian Broadcasting Corporation)




front

Waterfront [videorecording]




front

Confronting the climate challenge: U.S. policy options / Lawrence H. Goulder and Marc A.C. Hafstead

Dewey Library - QC903.2.U6 G68 2018




front

Electromagnetic frontier theory exploration / Changhong Liang, Xi Chen

Dewey Library - QC670.L53 2019




front

Front-End Development Explained for Non-Developers (part 1)

Front-end development is defined, by Wikipedia, as the “practice of producing HTML, CSS and JavaScript for a website or web application so that a user can see and interact with them directly.” Most people can make sense of basic HTML, CSS, and JavaScript (and that used to be enough). But in the last 5-10 years, […]

The post Front-End Development Explained for Non-Developers (part 1) appeared first on DevelopIntelligence.




front

Front-end RSS Feeds (2020 Edition)

Back in 2011, Paul Irish posted his personal list of frontend RSS feeds for front-end web developers. It was a great list, but after some time it needed some refreshing.

In 2014 I published my own list of categorized feeds for front-end developers. I cleaned up Paul's feed list quite a bit and added some new feeds, while splitting the feed up into manageable categories.

The post Front-end RSS Feeds (2020 Edition) appeared first on Impressive Webs.



  • Roundups & Resources

front

Transforming psychological worldviews to confront climate change: a clearer vision, a different path / F. Stephan Mayer

Rotch Library - BF353.5.C55 M37 2019




front

J Front Retailing Co Ltd. SWOT Analysis [electronic journal].

Marketline




front

J Front Retailing Co Ltd. MarketLine Company Profile [electronic journal].

Marketline




front

Imafronte [electronic journal] / Dpto. de Historia del Arte.

[Murcia] : Secretariado de Publicaciones e Intercambio Científico, Universidad de Murcia, [1985-




front

Frontiers in Sports and Active Living [electronic journal].

Frontiers Media S.A




front

Frontiers in Climate [electronic journal].

Frontiers Media S.A




front

Frontiers in Blockchain [electronic journal].

Frontiers Media S.A




front

Fronteiras [electronic journal].

Universidade Católica de Pernambuco




front

EUROMICRO 97. Proceedings of the 23rd EUROMICRO Conference: New Frontiers of Information Technology (Cat. No.97TB100167) [electronic journal].

IEEE Computer Society




front

2019 International Conference on Frontiers of Information Technology (FIT) [electronic journal].

IEEE / Institute of Electrical and Electronics Engineers Incorporated




front

Frontiers of green catalytic selective oxidations / Konstantin P. Bryliakov, editor

Online Resource




front

Interview: Jemar Tisby Confronts His Collaborators

Can people of color work in white spaces without getting pushed out, burned out, or sold out?




front

The university in chains : confronting the military-industrial-academic complex / Henry A. Giroux

Giroux, Henry A




front

Frontier applications of nature inspired computation / Mahdi Khosravy, Neeraj Gupta, Nilesh Patel, Tomonobu Senjyu, editors

Online Resource




front

Discoveries at the frontiers of science: from nuclear astrophysics to relativistic heavy ion collisions / Johannes Kirsch, Stefan Schramm (deceased), Jan Steinheimer-Froschauer, Horst Stöcker, editors

Online Resource




front

Handbook of frontal lobe assessment / Sarah E. MacPherson, Sergio Della Sala ; with Simon R. Cox, Alessandra Girardi, Matthew H. Iveson

Hayden Library - QP382.F7 M33 2015




front

Neural interface: frontiers and applications / Xiaoxiang Zheng, editor

Online Resource




front

The human frontal lobes: functions and disorders / edited by Bruce L. Miller, Jeffrey L. Cummings

Hayden Library - QP382.F7 H85 2018




front

'Every mother's son is guilty' : policing the Kimberley frontier of Western Australia 1882 - 1905 / Chris Owen

Owen, Chris, author




front

Vizag gas leak: Protestors put bodies in front of LG Polymers gate, demand closure of plant

They also demanded the arrest of those responsible.




front

The outlaw ocean: journeys across the last untamed frontier / Ian Urbina

Barker Library - SH319.A2 U73 2019




front

Ocean outbreak: confronting the rising tide of marine disease / Drew Harvell

Hayden Library - QH541.5.S3 H37 2019




front

New frontiers in stress management for durable agriculture Amitava Rakshit, Harikesh Bahadur Singh, Anand Kumar Singh, Uma Shankar Singh, Leonardo Fraceto, editors

Online Resource




front

Twelve Days of Front End Testing

Amy Kapernick sings us through numerous ways of improving the robustness and reliability of our front end code with a comprehensive rundown of ideas, tools, and resources. The girls and boys won’t get any toys until all the tests are passing.


Anyone who’s spoken to me at some point in November may get the impression that I’m a bit of a grinch. But don’t get me wrong, I love Christmas, I love decorating my tree, singing carols, and doing Christmas cooking - in December. So for me to willingly be humming the 12 days of Christmas in October, it’s probably for something that I think is even more important than banning premature Christmas decorations, like front end testing.

On the 12th day of Christmas, my front end dev, she gave to me, 12 testing tools, 11 optimised images, 10 linting rules, 9 semantic headings, 8 types of colour blindness, 7(.0) contrast ratio, 6 front end tests, 5 browser types, 4 types of tests, 3 shaken trees, 2 image types, and a source controlled deployment pipeline.

Twelve Testing Tools

  1. axe does automated accessibility testing. Run as part of your development build, it outputs warnings to your console to let you know what changes you need to make (referencing accessibility guides). You can also specify particular accessibility standard levels that you’d like to test against, eg. best-practice, wcag2a or wcag2aa, or you can pick and choose individual rules that you want to check for (full list of rules you can test with axe).
    aXe Core can be used to automate accessibility testing, and has a range of extensions for different programming languages and frameworks.
  2. BackstopJS runs visual regression tests on your website. Run separately, or as part of your deployment/PR process, you can use it to make sure your code changes aren’t bleeding into other areas of the website. By default, BackstopJS will set you up with a bunch of configuration options by running backstop init in your project to help get you started.
    BackstopJS compares screenshots of your website to previous screenshots and compares the visual differences to see what’s changed.
  3. Website Speed Test analyses the performance of your website specifically with respect to images, and the potential size savings if they were optimised.
  4. Calibre runs several different types of tests by leveraging Lighthouse. You can run it over your live website through their web app or through the command line, it then monitors your website for performance and accessibility over time, providing metrics and notifications of any changes.
    Calibre provides an easy to use interface and dashboard to test and monitor your website for performance, accessibility and several other areas.
  5. Cypress is for end-to-end testing of your website. When visual regression testing may be a bit much for you, Cypress can help you test and make sure elements are still on the page and visible (even if they’re not pixel for pixel where they were last time).
  6. pa11y is for automated accessibility testing. Run as part of your build process or using their CLI or dashboard, it tests your website against various Web Content Accessibility Guidelines (WCAG) criteria (including visual tests like colour contrast). While axe is run as part of your dev build and gives you an output to the console, it can be combined with pa11y to automate any changes as part of your build process.
  7. whocanuse was created by Corey Ginnivan, and it allows you to view colour combinations as those with colour blindness would (as well as testing other visual deficiencies, and situational vision events), and test the colour contrast ratio based on those colours.
    Colour contrast assessment of my brand colours, testing them for issues for people with various vision deficiencies, and situational vision events.
  8. Colour Blindness Emulation was created by Kyo Nagashima as an SVG filter to emulate the different types of colour blindness, or if you’re using Gatsby, you can use a plugin based off of gatsby-plugin-colorblind-filters.
  9. Accessible Brand Colors tests all your branding colours against each other (this is great to show designers what combinations they can safely use).
    Accessible Brand Colors tests all colour combinations of background and text colours available from your branding colours, and checks them for compliance levels at various font sizes and weights.
  10. Browser dev tools - Most of the modern browsers have been working hard on the features available in their dev tools:
    • Firefox: Accessibility Inspector, Contrast Ratio testing, Performance monitoring.
    • Chromium: (Chrome, Edge Beta, Brave, Vivaldi, Opera, etc) - Accessibility Inspector, Contrast Ratio testing, Performance Monitoring, Lighthouse Audits (testing performance, best practices, accessibility and more).
    • Edge: Accessibility Inspector, Performance monitoring.
    • Safari: Accessibility Inspector, Performance monitoring.
    Firefox (left), Chrome, and Edge Beta (right) Dev Tools now analyse contrast ratios in the colour picker. The Chromium-based browsers also show curves on the colour picker to let you know which shades would meet the contrast requirements.
  11. Linc is a continuous delivery platform that makes testing the front end easier by automatically deploying a version of your website for every commit on every branch. One of the biggest hurdles when testing the front end is needing a live version of the site to view and test against. Linc makes sure you always have one.
  12. ESLint and Stylelint check your code for programmatic and stylistic errors, as well as helping keep formatting standard on projects with multiple developers. Adding a linter to your project not only helps you write better code, it can reduce simple errors that might be found during testing time. If you’re not writing JavaScript, there are plenty of alternatives for whatever language you’re writing in.

If you’re trying to run eslint in VS Code, make sure you don’t have the Beautify extension installed, as that will break things.

Eleven Optimised Images

When it comes to performance, images are where we take the biggest hit, with images accounting for over 50% of total transfer size for websites. Many websites are serving excessively large images “just in case”, but there’s actually a native HTML element that allows us to serve different image sizes based on the screen size or serve better image formats when the browser supports it (or both).

<!-- Serving different images based on the width of the screen -->
<picture>
    <source
        srcset="/img/banner_desktop.jpg"
        media="(min-width: 1200px)"
    />
    <source
        srcset="/img/banner_tablet.jpg"
        media="(min-width: 700px)"
    />
    <source
        srcset="/img/banner_mobile.jpg"
        media="(min-width: 300px)"
    />
    <img src="/img/banner_fallback.jpg">
</picture>

<!-- Serving different image formats based on browser compatibility -->
<picture>
    <source
        srcset="/banner.webp"
        type="image/webp"
    />
    <img src="/img/banner_fallback.jpg">
</picture>

Ten Linting Rules

A year ago, I didn’t use linting. It was mostly just me working on projects, and I can code properly right? But these days it’s one of the first things I add to a project as it saves me so much time (and has taught me a few things about JavaScript). Linting is a very personal choice, but there are plenty of customisations to make sure it’s doing what you want, and it’s available in a wide variety of languages (including linting for styling).

// .eslintrc
module.exports = {
    rules: {
        'no-var': 'error',
        'no-unused-vars': 1,
        'arrow-spacing': ['error', { before: true, after: true }],
        indent: ['error', 'tab'],
        'comma-dangle': ['error', 'always'],
        // standard plugin - options
        'standard/object-curly-even-spacing': ['error', 'either'],
        'standard/array-bracket-even-spacing': ['error', 'either'], },
}

// .stylelintrc
{
    "rules": {
        "color-no-invalid-hex": true,
        "indentation": [
            "tab",
            {
                "except": [
                    "value"
                ]
            }
        ],
        "max-empty-lines": 2,
    }
}

Nine Semantic Headings

No, I’m not saying you should use 9 levels of headings, but your webpage should have an appropriate number of semantic headings. When your users are accessing your webpage with a screen reader, they rely on landmarks like headings to tell them about the page. Similarly to how we would scan a page visually, screen readers give users a list of all headings on a page to allow them to scan through the sections and access the information faster.

When there aren’t any headings on a page (or headings are being used for their formatting rather than their semantic meaning), it makes it more difficult for anyone using a screen reader to understand and navigate the page. Make sure that you don’t skip heading levels on your page, and remember, you can always change the formatting on a p tag if you need to have something that looks like a heading but isn’t one.

<h1>Heading 1 - Page Title</h2>
<p>Traditionally you'll only see one h1 per page as it's the main page title</p>
<h2>Heading 2</h2>
<p>h2 helps to define other sections within the page. h2 must follow h1, but you can also have h2 following another h2.</p>
<h3>Heading 3</h3>
<p>h3 is a sub-section of h2 and follows similar rules to h2. You can have a h3 after h3, but you can't go from h1 to h3.</p>
<h4>Heading 4</h4>
<p>h4 is a sub-section of h3. You get the pattern?</p>

Eight Types of Colour Blindness

Testing colour contrast may not always be enough, as everyone perceives colour differently. Take the below colour combination (ignoring the fact that it doesn’t actually look nice). It has decent colour contrast and would meet the WCAG colour contrast requirements for AA standards – but what if one of your users was red-green colour blind? Would they be able to tell the difference?

http://colorsafe.co/ empowers designers with beautiful and accessible colour palettes based on WCAG Guidelines of text and background contrast ratios.

Red-green colour blindness is the most common form of colour blindness, but there are 8 different types affecting different parts of the colour spectrum, all the way up to complete colour blindness.

Protanopia
Inability to see red end of the colour spectrum.
Protanomaly
Difficulty seeing some shades of red.
Deuteranopia
Inability to see the green portion of the colour spectrum.
Deuteranomaly
Difficulty seeing some shades of green.
Tritanopia
Inability to see blue end of the colour spectrum.
Tritanomaly
Difficulty seeing some shades of blue.
Achromatopsia
Inability to see all parts of the colour spectrum, only able to perceive black, white and shades of grey.
Achromatomaly
Difficulty seeing all parts of the colour spectrum.

Seven (.0) Contrast Ratio

Sufficient colour contrast is perhaps one of the best steps to take for accessibility, as it benefits everyone. Having adequate contrast doesn’t just make the experience better for those with vision impairments, but it also helps those with situational impairments. Have you ever been in the sun and tried to read something on your screen? Whether you can view something when there’s glare could be as easy as making sure there’s enough contrast between the text and its background colour.

The WCAG have defined a contrast ratio of at least 4.5:1 for normal text (18.5px) and 3:1 for large text (24px) to meet AA accessibility standards, but this should be an absolute minimum and isn’t always readable. All four below examples have sufficient contrast to pass AA standards, but you might be hard pressed to read them when there’s glare or you have a dodgy monitor (even more so considering most websites use below 18.5px for their base font size).

Examples of 4.5:1 colour contrast

To meet the AAA standard you need to have a ratio of 7:1 for normal text and 4.5:1 for large text, which should be sufficient for those with 20/80 vision to read.

Six Front End Tests

  1. Adding default axe-core testing to Gatsby:
    //gatsby-config.js
    {
        resolve: 'gatsby-plugin-react-axe',
        options: {},
    },
  2. Running pa11y tests on homepage at various screen sizes:
    // tests/basic-a11y_home.js
    const pa11y = require('pa11y'),
        fs = require('file-system')
    
    runTest()
    
    async function runTest() {
        try {
            const results = await Promise.all([
                pa11y('http://localhost:8000', {
                    standard: 'WCAG2AA',
                    actions: [],
                    screenCapture: `${__dirname}/results/basic-a11y_home_mobile.png`,
                    viewport: {
                        width: 320,
                        height: 480,
                        deviceScaleFactor: 2,
                        isMobile: true,
                    },
                }),
                pa11y('http://localhost:8000', {
                    standard: 'WCAG2AA',
                    actions: [],
                    screenCapture: `${__dirname}/results/basic-a11y_home_desktop.png`,
                    viewport: {
                        width: 1280,
                        height: 1024,
                        deviceScaleFactor: 1,
                        isMobile: false,
                    },
                }),
            ])
    
            fs.writeFile('tests/results/basic-a11y_home.json', JSON.stringify(results), err => {
                console.log(err)
            })
        } catch (err) {
            console.error(err.message)
        }
    }
  3. Running pa11y tests on a blog post template at various screen sizes:
    // tests/basic-a11y_post.js
    const pa11y = require('pa11y'),
        fs = require('file-system')
    
    runTest()
    
    async function runTest() {
        try {
            const results = await Promise.all([
                pa11y('http://localhost:8000/template', {
                    standard: 'WCAG2AA',
                    actions: [],
                    screenCapture: `${__dirname}/results/basic-a11y_post_mobile.png`,
                    viewport: {
                        width: 320,
                        height: 480,
                        deviceScaleFactor: 2,
                        isMobile: true,
                    },
                }),
                pa11y('http://localhost:8000/template', {
                    standard: 'WCAG2AA',
                    actions: [],
                    screenCapture: `${__dirname}/results/basic-a11y_post_desktop.png`,
                    viewport: {
                        width: 1280,
                        height: 1024,
                        deviceScaleFactor: 1,
                        isMobile: false,
                    },
                }),
            ])
    
            fs.writeFile('tests/results/basic-a11y_post.json', JSON.stringify(results), err => {
                console.log(err)
            })
        } catch (err) {
            console.error(err.message)
        }
    }
  4. Running BackstopJS on a homepage and blog post template at various screen sizes:
    // backstop.json
    {
      "id": "backstop_default",
      "viewports": [
        {
          "label": "phone",
          "width": 320,
          "height": 480
        },
        {
          "label": "tablet",
          "width": 1024,
          "height": 768
        },
        {
          "label": "desktop",
          "width": 1280,
          "height": 1024
        }
      ],
      "onBeforeScript": "puppet/onBefore.js",
      "onReadyScript": "puppet/onReady.js",
      "scenarios": [
        {
          "label": "Blog Homepage",
          "url": "http://localhost:8000",
          "delay": 2000,
          "postInteractionWait": 0,
          "expect": 0,
          "misMatchThreshold": 1,
          "requireSameDimensions": true
        },
        {
          "label": "Blog Post",
          "url": "http://localhost:8000/template",
          "delay": 2000,
          "postInteractionWait": 0,
          "expect": 0,
          "misMatchThreshold": 1,
          "requireSameDimensions": true
        }
      ],
      "paths": {
        "bitmaps_reference": "backstop_data/bitmaps_reference",
        "bitmaps_test": "backstop_data/bitmaps_test",
        "engine_scripts": "backstop_data/engine_scripts",
        "html_report": "backstop_data/html_report",
        "ci_report": "backstop_data/ci_report"
      },
      "report": [
        "browser"
      ],
      "engine": "puppeteer",
      "engineOptions": {
        "args": [
          "--no-sandbox"
        ]
      },
      "asyncCaptureLimit": 5,
      "asyncCompareLimit": 50,
      "debug": false,
      "debugWindow": false
    }
  5. Running Cypress tests on the homepage:
    // cypress/integration/basic-test_home.js
    describe('Blog Homepage', () => {
        beforeEach(() => {
            cy.visit('http://localhost:8000')
        })
        it('contains "Amy Goes to Perth" in the title', () => {
            cy.title().should('contain', 'Amy Goes to Perth')
        })
        it('contains posts in feed', () => {
            cy.get('.article-feed').find('article')
        })
        it('all posts contain title', () => {
            cy.get('.article-feed')
                .find('article')
                .get('h2')
        })
    })
  6. Running Cypress tests on a blog post template at various screen sizes:
    // cypress/integration/basic-test_post.js
    
    describe('Blog Post Template', () => {
        beforeEach(() => {
            cy.visit('http://localhost:8000/template')
        })
        it('contains "Amy Goes to Perth" in the title', () => {
            cy.title().should('contain', 'Amy Goes to Perth')
        })
        it('has visible post title', () => {
            cy.get('h1').should('be.visible')
        })
        it('has share icons', () => {
            cy.get('.share-icons a').should('be.visible')
        })
        it('has working share icons', () => {
            cy.get('.share-icons a').click({ multiple: true })
        })
        it('has a visible author profile image', () => {
            cy.get('.author img').should('be.visible')
        })
    })
    
    describe('Mobile Blog Post Template', () => {
        beforeEach(() => {
            cy.viewport('samsung-s10')
            cy.visit('http://localhost:8000/template')
        })
        it('contains "Amy Goes to Perth" in the title', () => {
            cy.title().should('contain', 'Amy Goes to Perth')
        })
        it('has visible post title', () => {
            cy.get('h1').should('be.visible')
        })
        it('has share icons', () => {
            cy.get('.share-icons .share-link').should('be.visible')
        })
        it('has a visible author profile image', () => {
            cy.get('.author img').should('be.visible')
        })
    })

Five Browser Types

Browser testing may be the bane of our existence, but it’s gotten easier, especially when you know the secret:

Not every browser needs to look the same.

Now, this may differ depending on your circumstances, but your website doesn’t have to match pixel for pixel across all browsers. As long as it’s on-brand and is useable across all browsers (this is where a good solid HTML foundation is useful), it’s ok for your site to look a little different between browsers.

While the browsers you test in will differ depending on your user base, the main ones you want to be covering are:

  • Chrome/Chromium
  • Firefox
  • Safari
  • Internet Explorer
  • Edge

Make sure you’re testing these browsers on both desktop and mobile/tablet as well, sometimes their level of support or rendering engine will differ between devices – for example, iOS Chrome uses the Safari rendering engine, so something that works on Android Chrome may not work on iOS Chrome.

Four Types of Test

When it comes to testing the front end, there are a few different areas that we can cover:

  1. Accessibility Testing: doing accessibility testing properly usually involves getting an expert to run through your website, but there are several automated tests that you can run against various standard levels.
  2. Performance Testing: performance testing does technically bleed into the back end as well, but there are plenty of things that can be done from a front end perspective. Making sure the images are optimised, our code is clean and minified, and even optimising fonts using features like the font-display property. No amount of optimising the server and back end will matter if it takes forever for the front end to appear in a browser.
  3. Visual Regression Testing: we’ve all been in the position where changing one line of CSS somewhere has affected another section of the website. Visual regression testing helps prevent that. By using a tool that compares before and after screenshots against one another to flag up what’s changed, you can be sure that style changes won’t bleed into unintended areas of the site.
  4. Browser/device testing: while we all want our users to be running the most recent version of Chrome or Firefox, they may still be using the inbuilt browser on their DVD player – so we need to test various browsers, platforms and devices to make sure that our website can be accessed on whatever device they use.

Three Shaken Trees

Including (and therefore requiring your users to download) things that you’re not using affects the performance of your application. Are you forcing them to download the entire lodash library when you’re only using 2 functions? While a couple of unused lines of code may not seem like a huge performance hit, it can greatly affect users with slower devices or internet connections, as well as cluttering up your code with unused functions and dependencies. This can be set up on your bundler – Webpack and Parcel both have guides for tree shaking, and Gatsby has a plugin to enable it.

Two Image Types

While there are several different types of images, most of the time they fall into one of two categories:

Informative
The image represents/conveys important information that isn’t conveyed by the content surrounding it.
Decorative
The image only adds visual decoration to a page.

From these two categories, we can then determine if we need to provide alternative text for an image. If an image is purely decorative, then we add alt="" to let screen readers know that it’s not important. But if an image is informative, then we need to be supplying a text alternative that describes the picture for anyone who’s using a screen reader or isn’t able to see the image (remember the days when a standard internet connection took a long time to load a page and you saw alt text before an image loaded).

<img src="./nice-picture.jpg" alt="" />
<img src="./important-graphic.png" alt="This is a picture of something important to help add meaning to the text around me" />

If you have a lot of images with missing alt text, look into services that can auto-generate alt text based on image recognition services.

One Source Controlled Deployment Pipeline

While front end tests are harder to automate, running them through a source control and deployment pipeline helps track changes and eliminates issues where “it works on my computer”. Whether you’re running tests as part of the PR process, or simply against every commit that comes through, running tests automatically as part of your process makes every developer’s life easier and helps keep code quality at a high standard.


We already knew that testing was important, and your project can’t be run unless all your unit and integration tests are written (and pass), but often we forget about testing the front end. There are so many different tests we need to be running on the front end, it’s hard to work out what your need to test for and where to start.

Hopefully this has given you a bit of insight to front end testing, and some Christmas cheer to take you into the holidays.


About the author

Amy wears many hats as a freelance developer, business owner and conference addict. She regularly shares her knowledge with her peers and the next generation of developers by mentoring, coaching, teaching and feeding into the tech community in many ways.

Amy can be found volunteering her time with Fenders, ACS, SheCodes (formerly Perth Web Girls) and MusesJS (formerly NodeGirls). She also works as an evangelist for YOW! Conferences, is a Twilio Champion and has been nominated for the WiTWA awards for the last 2 years.

In her spare time Amy shares her knowledge and experience on her blogs and speaking at conferences. She has previously given keynotes at multiple events as well as speaking at several international conferences in the US and Europe.

More articles by Amy




front

‘No force with CPM viable… not third front but tired front’



  • DO NOT USE West Bengal
  • India

front

Trinamool Kisan O Khetmojur Congress: To launch its front for farmers, Trinamool returns to Singur



  • DO NOT USE West Bengal
  • India

front

Covid-19: Central team asks State about frontline staff, quarantine facilities

A.P. is ahead of other states with regard to testing capacity, Medical and Health Commissioner Katamaneni Bhaskar said the government was taking measures to contain the spread of the virus




front

Central team enquires about frontline workers who contracted COVID-19

It also seeks details of paid quarantine facilities and death rate




front

178 JSJ Tech Education and The Business of Running Front End Masters with Marc Grabanski

03:01 - Marc Grabanski Introduction

03:35 - The jQuery UI Datepicker

04:29 - Frontend Masters

07:26 - The Live Streaming Phenomenon

09:17 - Scalability

11:25 - Value, Feedback Cycle

14:43 - Structuring Courses and Workshops

16:09 - Online vs In-Person

  • Prerequisites

18:11 - Booking Workshops

19:02 - Scaling (Cont’d)

20:00 - Online Education (eLearning) in General

21:40 - The Business Model

  • Licensing

24:12 - Hot Sellers

25:28 - Technical Setup

27:27 - Selecting Topics

29:41 - Future Topics / Topics in Production

30:38 - Individual / Company Attendees

31:45 - Upcoming Plans for Frontend Masters

32:32 - Advice For Starting Something Like Frontend Masters

34:23 - Keeping Content Up-to-date

36:14 - eLearning Experiments

39:30 - Giveaways

40:07 - Getting Started with Programming

43:03 - Marketing

45:20 - Teacher Compensation

Picks

Jessica Kerr: Functional Principles In React @ React Rally 2015 (Jamison)
thought-haver (Jamison)
[Frontend Masters] Angular Application Development (Aimee)
[Frontend Masters] JavaScript the Good Parts (Aimee)
LÄRABAR (Aimee)
Taking time off (Chuck)

The Man from U.N.C.L.E. (Joe)
BB-8 by Sphero (Joe)
ng-conf (Joe)
The Tim Ferriss Show (Marc)
CodeCombat (Marc)
Untrusted (Marc)




front

JSJ 301: CSS Grids: The Future of Frontend Layout with Dave Geddes

Panel: 

Charles Max Wood

Aimee Knight

Cory House

AJ O'Neal

Joe Eames

Aaron Frost

Special Guests: Dave Geddes

In this episode, the JavaScript Jabber panelists talk with Dave Geddes about CSS Grids. Dave quit his job about a year ago and has been living the entrepreneur and programmer life since then. Now, he builds mastery games to help people learn CSS. Dave discusses the differences between Flexbox and CSS Grid and how the games that he creates can help people learn CSS Grid in a fun and interactive way.

In particular, we dive pretty deep on:

  • CSS Mastery games
  • FlexboxZombies.com
  • GridCritters.com
  • Uses spaced repetition and delayed recall to learn
  • CSS Grid
  • Flexbox
  • CSS Grid as the cake and Flexbox as the frosting
  • Edge spec
  • What Flexbox can do
  • Sub-Grids
  • Geddski.com
  • Nesting Grids
  • Old Grid vs New Grid layout
  • Why would you move from Flexbox to CSS Grid?
  • CSS Grid tools
  • GridByExample.com
  • Education and Gamification
  • Pick a UI that interests you
  • For a discount on Grid Critters: enter JS Jabber for 20% off
  • And much, much more!

Links:

Picks:

Charles

Aimee

Cory

AJ

Joe

Aaron

Dave




front

JSJ 365: Do You Need a Front-End Framework?

Sponsors

Panel

  • Charles Max Wood

  • Aimee Knight

  • Chris Ferdinandi

  • AJ O’Neal

  • Joe Eames

Episode Summary

Today the panel discusses the necessity of a front end framework. Overall, there is a consensus that frameworks are not necessary in all situations. They discuss the downsides of using frameworks, such as being restricted by the framework when doing edge development and the time required for learning a framework. They talk about the value of frameworks for learning patterns in programming.

The panel delves into the pros and cons of different frameworks available. Joe shares a story about teaching someone first without a framework and then introducing them to frameworks, and the way it helped with their learning. One of the pros of frameworks is that they are better documented than manual coding. They all agree that it is not enough to just know a framework, you must continue to learn JavaScript as well.

They talk about the necessity for new programmers to learn a framework to get a job, and the consensus is that a knowledge of vanilla JavaScript and a general knowledge of the framework for the job is important. New programmers are advised to not be crippled by the fear of not knowing enough and to have an attitude of continual learning. In the technology industry, it is easy to get overwhelmed by all the developments and feel that one cannot possibly learn it all. Charles gives advice on how to find your place in the development world. The show concludes with the panel agreeing that frameworks are overall a good thing and are valuable tools.

Links

Follow DevChat on Facebook and Twitter

Picks

Charles Max Wood:

Aimee Knight:

Chris Ferdinandi:

AJ O’Neal:




front

Zambian crisis behaviour [electronic resource] : confronting Rhodesia's unilateral declaration of independence, 1965-1966 / Douglas G. Anglin

Anglin, Douglas George