Skip to content

Instantly share code, notes, and snippets.

View ajlende's full-sized avatar
👨‍💻

Alex Lende ajlende

👨‍💻
View GitHub Profile
@ajlende
ajlende / .gitconfig
Last active July 26, 2020 21:51
My git aliases
[alias]
git = !exec git
alias = "!f() { git config --get-regexp alias | sed 's/^alias\\.\\([^[:space:]]*\\)/git \\1 = git/g' | sed 's/git !/!/g' | sed 's/!git/git/g' | sed 's/!f() { \\(.*\\) }; f$/\\1/g' | sort; }; f"
# br = flow feature start
# co = flow feature checkout
# c = !gitmoji -c
c = commit --no-verify
amend = commit --no-verify --amend
cached = diff --cached
# undo = reset --soft HEAD^
! Copied the keyboard layout for macos devices for use with xmodmap
! Row 1
! ` ~ dead(`) `
! 1 ! ¡ ⁄
! 2 @ ™ €
! 3 # £ ‹
! 4 $ ¢ ›
! 5 % ∞ fi
@ajlende
ajlende / gutenberg-cropper.md
Last active February 3, 2021 22:07
Notes for a Gutenberg Cropper

Notes for a Gutenberg Cropper

Historical cropping decisions

The original prototype used react-image-crop for the cropping library. We decided that the zoom-crop interaction was more important, so we went with react-easy-crop instead. It seemed like it would be easier to add freeform crop to the zoom-crop library than add zoom crop to the freeform library.

Existing rotation+zoom bug

After we landed the feature, we found a bug involving rotation+zoom. I gave it a go and quickly realized that fixing that would fundamentally change how the zoom-crop mechanism worked.

@ajlende
ajlende / README.md
Last active September 23, 2021 19:06
Filters in WordPress theme.json

Filters in WordPress theme.json

This is an exploration of how theme.json could work in the future—my dream theme.json, if you will. A tour of the new theme.json can be found in theme-v2.json. theme-v1.json is provided for reference to see where properties have moved.

The theme.json files are quite long, so it may be helpful to clone the gist and view the files in a proper editor with code folding.

This gist is more of a living document than a static thing, and there are still a lot of unanswered questions that I'm still working through. I'm pretty happy with the general structure at this point, but there are a few opportunities for things to be added or removed. This is mostly documented in the Unanswered Questions section of this README.

Existing ideas

@ajlende
ajlende / README.md
Last active October 15, 2021 03:29
JSON Schema Demo theme.json

Video Walkthrough

theme-json-schema-walkthrough.mp4

Setup

theme-json-schema-walkthrough-setup-pause-optimized

Autocomplete

@ajlende
ajlende / README.md
Last active November 14, 2021 16:28
Using WordPress theme.json Schema
@ajlende
ajlende / README.md
Created November 1, 2021 18:54
JSON Schema Changes

I want to run through a few hypothetical scenarios because I'm still not 100% confident I understand how breaking changes will be handled in theme.json and also block.json.

@ajlende
ajlende / README.md
Last active January 20, 2023 06:27
WordPress Gutenberg SVG Filter Support
@ajlende
ajlende / README.md
Last active June 26, 2024 01:52
WordPres JSON Schema Tools

WordPress JSON Schema Tools

Provides a few utility commands for managing WordPress JSON files with schemas.

Configure Schema Validation

Initializes AJV-based JSON Schema validation for WordPress schemas for 'theme' or 'block' projects.

It supports schemas using both draft-04 and draft-07 JSON Schema metaschemas.