Skip to content

Commit

Permalink
[Theming] Overhaul Icon Generation (#529)
Browse files Browse the repository at this point in the history
* Remove deprecated icons (none in use, new major version required anyway)

* Delete unused style file

* Rename propTypes, defaultProps, and inline prop name (raises dev console warning)

* Remove icons from gitignore

* Fix path import resolution, recognize theme __type signature

* Add useIcon hook

* Commit new icons directory

* Commit shared-component/icon changes

* Delete src/svgs folder

* Update prop spreading rules

* Adjust src and stories

* Adjust svg build options

* Push snapshot changes

* Bump svgr packages, removing CLI icon building steps (temporarily), add test suite for new icons setup

* Update size snapshot

* Remove SVGR icon generation scaffolding (no longer in use)

* Remove MDX file, update Notes for Icons

* Remove icon TODOs

* use non-forked create-index

* Export icons as default to avoid auto-import namespace pollution, update dependencies and build steps

* Fix storybook command

* Write after build to avoid whitespace issue

* Fix serializing via Icon and useIcon setup

* Delete the prettierignore

* Remove src/icons specific eslint rules

* Move formatting logic into create-index, run tsc after index is created

* Update size snapshot and Icon JSDoc comment

* Fix casing issue with LockIcon

* Fix casing (again)

* Remove unused postbuild step command

* Bump node version

* Restore fill application in snapshots

* Update svg mock mapping for jest

* Delete unused icon test

* Reformat useIcon context comment

* Update build .size-snapshot.json

* Reset icon story setup

* First pass of working Icon component without fill regression

* Simplify usage without cloneElement to be more straightforward

* Make arrow like our other icons

* Remove warning in rollup build step re: umd naming

* Commit working overhaul, src/icons/test functionality WIP

* Temporarily modify src/icons/test

* Commit change to prevent newline diff

* No newline re-write, pt. 2

* Fix casing for navIcons build step

* Update icon svg test

* Update heroku postbuild step (to avoid build error from earlier this week)

* Update icons stories add an SVG description

* Clean src/icons/**/svgs to ensure icon generation is consistent + we remove stale icons

* Try postbuild step without icon generation, for fun

* Remove svgr/webpack, fix Icon prop type, simplify storybook webpack config, update eslint rule for import extensions
  • Loading branch information
michaeljaltamirano authored Nov 24, 2020
1 parent 9ba1d4a commit d6824fb
Show file tree
Hide file tree
Showing 530 changed files with 7,950 additions and 2,747 deletions.
21 changes: 9 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
},
"settings": {
"import/resolver": {
"webpack": {
"config": "./.storybook/webpack.config.js"
}
},
"import/extensions": [".js", ".md"]
"node": {}
}
},
"rules": {
"@typescript-eslint/camelcase": "off",
Expand Down Expand Up @@ -54,7 +51,7 @@
"no-underscore-dangle": [
"warn",
{
"allow": ["__isProxy"]
"allow": ["__isProxy", "__type"]
}
],
"no-use-before-define": "off",
Expand Down Expand Up @@ -123,20 +120,20 @@
{
"files": ["*.tsx"],
"rules": {
"react/prop-types": "off"
"react/prop-types": "off",
"react/jsx-props-no-spreading": "off"
}
},
{
"files": ["stories/**/*.{js,ts,tsx}"],
"files": ["src/icons/**/svgs/index.tsx"],
"rules": {
"no-alert": "off"
"prettier/prettier": "off"
}
},
{
"files": ["src/icons/**"],
"files": ["stories/**/*.{js,ts,tsx}"],
"rules": {
"import/extensions": "off",
"react/jsx-props-no-spreading": "off"
"no-alert": "off"
}
}
]
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ typings/
# build files
dist/
lib/
src/icons/
.out

# JetBrains
Expand Down
7 changes: 1 addition & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
src/svgs/deprecated/index.js
src/svgs/emojis/index.js
src/svgs/glyphs/index.js
src/svgs/icons/index.js
src/svgs/logos/index.js
src/svgs/navIcons/index.js
src/icons/**/svgs/index.tsx
Loading

0 comments on commit d6824fb

Please sign in to comment.