Skip to content

Commit

Permalink
feat: major upgrades of many packages and configuration (openedx#394) (
Browse files Browse the repository at this point in the history
…openedx#400)

This is a BREAKING CHANGE.

* update storybook, webpack, and other supporting packages
* upgrade node version in travis
* fix: clean up commonly repeated storybook configuration
* fix: update dependencies
* fix: misc config changes
* fix: height of fieldset

long term the .form-control class should not be used on fieldset. It now explicitly sets a height and was probably not intended to be used the way it is in paragon's fieldset.

* fix: remove css module import for font awesome in Icon story
* fix: update storyshot config to have no decorators
* fix: use whitelist for npm publishing
* fix: remove source maps from build. hopefully using less memory
* fix: update notifications to [email protected]

feat: remove static build output (openedx#398)

Removes a the static build output. Sets the stage to remove css modules and simplify JSX elsewhere.

feat: remove css module and namespace support (openedx#399)

This changes the way scss should be imported with components. Rather than a SCSS file for each module, this prefers that consumers import the scss file (src/index.scss). It must be included after bootstrap variables are set. It's also up to the consumer to include font-awesome if needed.

See ADR for removal of CSS Modules.

* fix: remove usage of css module styles object
* feat: remove css modules and consolidate scss inclusion pattern
* fix: build scss separately
* fix: remove array around className prop for raw html nodes
  • Loading branch information
abutterworth authored Mar 22, 2019
1 parent 8af1f5d commit 0274806
Show file tree
Hide file tree
Showing 98 changed files with 28,812 additions and 96,255 deletions.
22 changes: 15 additions & 7 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{
"presets": [
["env", {
"targets": {
"browsers": ["last 2 versions", "ie 11"]
[
"@babel/preset-env",
{
"targets": {
"browsers": ["last 2 versions", "ie 11"]
}
}
}],
"babel-preset-react"
],
"@babel/preset-react"
],
"plugins": [
"transform-object-rest-spread"
]
"@babel/plugin-proposal-object-rest-spread"
],
"env": {
"test": {
"plugins": ["require-context-hook"]
}
}
}
5 changes: 2 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
coverage/*
node_modules
static
themeable
dist/
node_modules/
40 changes: 40 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"extends": "eslint-config-edx",
"parser": "babel-eslint",
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.stories.jsx",
"src/setupTest.js",
"**/*.test.jsx",
"**/*.test.js",
"config/*.js",
"*.config.js",
"*.config.*.js",
"**/*.config.js"
]
}
],
// https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/340#issuecomment-338424908
"jsx-a11y/anchor-is-valid": [ "error", {
"components": [ "Link" ],
"specialLink": [ "to" ]
}]
},
"overrides": [
{
"files": ["*.stories.jsx"],
"rules": {
"no-console": "off"
}
}
],
"env": {
"jest": true
},
"globals": {
"newrelic": false
}
}
35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ node_modules
npm-debug.log
coverage
jest*
static
themeable
dist
13 changes: 0 additions & 13 deletions .npmignore

This file was deleted.

10 changes: 1 addition & 9 deletions .storybook/Paragon.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
import React from 'react';
import { storiesOf } from '@storybook/react';

const styles = {
main: {
margin: 15,
maxWidth: 600,
lineHeight: 1.4,
fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif',
},
};

storiesOf('Paragon', module)
.add('Welcome', () => (
<div style={styles.main}>
<div>
<h1>💎 Paragon</h1>
<p>
This is a documentation and demo space for the Paragon accessible UI component
Expand Down
16 changes: 3 additions & 13 deletions .storybook/Storyshots.test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import initStoryshots from '@storybook/addon-storyshots';
import '../src/utils/reactResponsive.mock';

// per https://github.com/storybooks/storybook/issues/2522
// TypeError: (0 , _reactDom.findDOMNode) is not a function errors due to a11y addon
jest.mock("react-dom", () => {
return {
render: () => null,
unmountComponentAtNode: () => null,
findDOMNode: () => null,
createPortal: () => null,
};
});

initStoryshots({
initStoryshots({
storyKindRegex: /^((?!.*?Modal).)*$/,
configPath: '.storybook/storyshots.config.js',
});

Loading

0 comments on commit 0274806

Please sign in to comment.