Instantly share code, notes, and snippets.

View a11y-datepicker-notes.md

react-dates uses an aria-describedby on the input attribute that points to a p element with the following content within it. "Press the down arrow key to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates."

  • Focusing on the input reads, "Date, edit text" followed by the aria-describedby content.
  • Pressing ? key opens a modal with the following keyboard shortcuts:

Keyboard Shortcuts

  • ↵ Select the date in focus.
  • ←/→ Move backward (left) and forward (right) by one day.
View docs.md

Get all packages

Get all packages by running lerna ls. Convert this to an array Save array as a const named all.

Get updated packages

Get updated package by running lerna updated Convert this to an array Save array as a const named updated.

View base-no-jsx.js
if (!this.state.areTranslationsLoaded) return React.createElement('div', null, 'Translations are loading');
return React.createElement(
I18nProvider,
{ ...customProps, locale: this.state.locale, messages: messages },
children
);
View ControlledFileInput.jsx
class ControlledFileInput extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
}
handleChange(event) {
console.log('Selected file:', event.target.files[0]);
}
View updated-deps.md
terra-framework|master⚡ ⇒ npx recently-updated --days 5
node-fetch
        from ranges [^2.1.2, ^1.0.1]
        2.2.0   2018-7-22 16:32:05

danger
        from ranges [^3.7.14]
        3.8.0   2018-7-21 13:17:40
View paginator-with-button-component.jsx
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames/bind';
import ResponsiveElement from 'terra-responsive-element';
import 'terra-base/lib/baseStyles';
import Button from '../../terra-button/src/Button';
import styles from './Paginator.module.scss';
import { calculatePages, pageSet, KEYCODES } from './_paginationUtils';
View wdio-errors-with-eslint-update.md

1775 passing (2062.70s) 10 failing

  1. Abstract Modal Append Class [default] to be within the mismatch tolerance: expected to be within the mismatch tolerance, but received the following comparison results { "misMatchPercentage": 0.43 } running chrome AssertionError: expected to be within the mismatch tolerance, but received the following comparison results
View checbox-wdio-test.js
/* eslint-disable no-unused-expressions */
/* global browser, Terra, before */
describe('Checkbox', () => {
before(() => browser.setViewportSize(Terra.viewports('medium')[0]));
const themingProperties = {
'--terra-form-checkbox-font-color': '#111619',
'--terra-form-checkbox-container-margin-bottom': '0.625rem',
'--terra-form-checkbox-container-margin-right': '1.071rem',
View output.sh
․․․․․․․․․․․․․F․FFF․․․․․․F․F․․F․F․F․․․F․․․․․F․․․․․․․․F․․․F․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․F․․F․․․․․․․․․․․F․․․F․FFFFFFFFFFFFFFFFF․FF․F․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․F․․․․․․․․․․․․․․․․․․․․․․․․․F․FFFFFFFFF․FFF․․․․․․F․․․FF․․․․․․F․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
559 passing (978.30s)
55 failing
1) ApplicationHeader Displays a default application header [#test-header] to be within the mismatch tolerance:
expected to be within the mismatch tolerance, but received the following comparison results
{
"viewport": "small",
"misMatchPercentage": 0.04
View changelog-find-and-replace-script.js
const replace = require('replace-in-file');
const ml = `Unreleased
----------
9.0.0 - (April 20, 2018)
------------------
### Changed
* Minor dependency version bump`;