Skip to content

Instantly share code, notes, and snippets.

View eps1lon's full-sized avatar
:atom:
mt?!" “ .I.r '2 f

Sebastian "Sebbie" Silbermann eps1lon

:atom:
mt?!" “ .I.r '2 f
View GitHub Profile
@eps1lon
eps1lon / GLOSSAR.md
Last active March 26, 2021 08:52
Material-UI Picker glossary

Component naming

public components

Pickers are named as <Wrapper><Type>Picker. When using the responsive wrapper we omit the wrapper type e.g. a ResponsiveTimePicker is named TimePicker. In other words: The responsive variant is the default variant people should use.

internal components

In internal components we do not omit the Responsive name.

@eps1lon
eps1lon / diff.md
Last active March 2, 2021 13:28
Icons diff bumping svgo to 2.1.0 (was 1.3.2)

Diff created running npx pixelmatch All-Icons-next.png AllIcons.pr.png AllIcons.diff.png 0

All-Icons-next.png was created using yarn; yarn test:regressions:run --grep AllIcons @ a448cc66674e8b7a297b462d357702aa934fa9ad

AllIcons.pr.png was created using yarn; yarn test:regressions:run --grep AllIcons @ mui/material-ui#25122

AllIcons.png diff
const fs = require('fs');
const { snakeCase } = require('lodash');
const fetch = require('cross-fetch');
const path = require('path');
const yargs = require('yargs');
// https://stackoverflow.com/a/49428486/3406963
function streamToString(stream) {
const chunks = [];
return new Promise((resolve, reject) => {
@eps1lon
eps1lon / report.md
Created December 12, 2020 21:04
aria-orientation is ignored on input[type="range"]

Chrome version Please confirm that the following version information is correct.

Chrome version: 87.0.4280.66 Operating system: Linux Version: Ubuntu 20.04 Channel:

@eps1lon
eps1lon / README.md
Created December 7, 2020 15:33
envinfo for libraries

envinfo for libraries

as github repository

npx github:eps1lon/testing-library-envinfo

  • prefer collocation

as bin script

npx --package @testing-library/react envinfo

@eps1lon
eps1lon / cancel-gh-actions.js
Last active January 13, 2021 05:13
cancel multiple CI jobs/runs
/* eslint-disable no-restricted-syntax */
const { Octokit } = require('@octokit/rest');
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
async function main() {
const octokit = new Octokit({
auth: GITHUB_TOKEN,
});
@eps1lon
eps1lon / README.md
Created August 14, 2020 07:33
TypeScript in React

TypeScript in React

Non-exhaustive list of issues with TypeScript in React that make components written in TypeScript less valueable.

  • Inference of generic props results in any for callbacks [MUI#13868]
  • Generics are lost with high-order functions [DT#37087], [TS#1213]
  • Refs need to be exact [TS#30748], [TS#21759]
  • union props are problematic with higher-order components TS issues with TextField in Material-UI

Not necessarily applicable to Material-UI:

@eps1lon
eps1lon / README.md
Last active March 19, 2022 08:29
ARIA spec to aria-query
@eps1lon
eps1lon / codemod.js
Created May 13, 2020 15:51
mui docs layout
// Press ctrl+space for code completion
export default function transformer(file, api, options = {}) {
const j = api.jscodeshift;
const root = j(file.source);
const { layout = "AppFrame" } = options;
let isDocsPage = false;
root.find(j.ExportDefaultDeclaration).forEach((path) => {
isDocsPage = path.node.declaration.params.length > 0;
@eps1lon
eps1lon / list.md
Last active April 23, 2020 13:43
babel plugins that implement loose or spec

plugins

Wenn through all the plugins used when using preset-env with the following targets:

ie 11
edge >= 14
firefox >= 52
chrome >= 49
safari >= 10
node 8.0