Skip to content

Instantly share code, notes, and snippets.

View skorasaurus's full-sized avatar

Will Skora skorasaurus

View GitHub Profile
@skorasaurus
skorasaurus / gist:a01249d4302226bf12c80dd979322303
Last active April 20, 2024 20:44
recap of Issue 6177. This document was first written in February 2021, last updated 2023-10-08)

The issue - WordPress/gutenberg#6177 is one of the most discussed issues in the Gutenberg project but its discussion is overwhelming and progress has stagnated.

Since the issue was first written in April 2018, the block editor and WordPress have changed and improved but many improvements to improve displaying images remain.

This document summarizes the remaining deficiencies of image loading mentioned in WordPress/gutenberg#6177

At its core (pun intended), the primary issue is: larger than necessary images (by pixel size (dimensions)) and as well as higher resolution than necessary, are loaded for an end user when they visit a page with images.

This behavior occurs when WordPress' and a theme's usual defaults (e.g. no alignment specificed, default image size created) are used.

Cudell: http://www.nba.com/cavaliers/releases/cudell-court-180409
Earl B. Turner: April 2018 - https://www.nba.com/cavaliers/releases/turner-court-180516
Sterling: July 2018 - https://www.nba.com/cavaliers/releases/sterling-court-180716
Estabrook: August 2018: https://www.nba.com/cavaliers/releases/estabrook-court-180823
Lonnie Burton - April 2019: https://www.nba.com/cavaliers/releases/burten-court-190417
/**
* Registers a new block provided a unique name and an object defining its behavior.
*
* @see https://developer.wordpress.org/block-editor/developers/block-api/#registering-a-block
*/
import { registerBlockType } from '@wordpress/blocks';
import {
RichText,
AlignmentToolbar,
BlockControls,
@skorasaurus
skorasaurus / info.php
Last active August 19, 2020 14:14
WILL's previously broken xdebug settings (the launch.json they now work perfectly!)
vagrant@vvv:~$ switch_php_debugmod xdebug
* Disabling active debug PHP mods
* Disabling if present: 'xdebug, xhgui, tideways_xhprof, pcov'
* Disabling active module: 'tideways_xhprof'
* Enabling 'xdebug'
* Restarting PHP FPM's so the change takes effect
the error that Iwas getting below:
vagrant@vvv:~$ tail -n 50 /var/log/php/xdebug-remote.log
[13246] I: Remote address found, connecting to 192.168.50.1:9000.
name:"Option 1 "
role:"text leaf"
actions:[…]
value:""
DOMNode:#text
description:""
keyboardShortcut:""
childCount:0
indexInParent:0
states:[…]
@skorasaurus
skorasaurus / index.html
Created May 14, 2020 20:25
NVDA test case; thanks to Scott O'hara, weston thayer, and andrew nevins for assisting in debugging
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Max's pizza</title>
</head>
<body>
<form>
<!DOCTYPE html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v1.10.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v1.10.0/mapbox-gl.css" rel="stylesheet" />
</head>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Attach a popup to a marker instance</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v1.10.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v1.10.0/mapbox-gl.css" rel="stylesheet" />
<style>
body { margin: 0; padding: 0; }
@skorasaurus
skorasaurus / index.html
Created April 30, 2020 16:25
this is of mapbox.js locations.html example that I showed to mike and david and also used for measuring performance when comparing mapbox-gl vs mapbox.js for cpl 2020, april
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.css">
@skorasaurus
skorasaurus / index.html
Last active May 6, 2020 13:20
ocations-gl.html example that I showed to mike and david and also used for measuring performance when comparing mapbox-gl vs mapbox.js for cpl 2020, april
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js"></script>