Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

fix: some built-in components will now get the right props as CSS #246

Merged
merged 2 commits into from
Jul 25, 2017

Conversation

kentcdodds
Copy link
Contributor

What: This adds a check for whether the given tagName is an html tag before saying it's svg

Why: closes #245

How: See the code. Also prettier 😒

Checklist:

  • Documentation N/A
  • Tests
  • Ready to be merged
  • Added myself to contributors table N/A

@kentcdodds kentcdodds force-pushed the pr/fix-svg-attributes-issue branch from 500b2cd to 5ff0b06 Compare July 24, 2017 23:13
@kentcdodds kentcdodds mentioned this pull request Jul 24, 2017
4 tasks
@kentcdodds kentcdodds force-pushed the pr/fix-svg-attributes-issue branch 6 times, most recently from 284e20c to 0a693fe Compare July 24, 2017 23:54
@codecov-io
Copy link

codecov-io commented Jul 24, 2017

Codecov Report

Merging #246 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #246   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          10     10           
  Lines         142    144    +2     
  Branches       36     37    +1     
=====================================
+ Hits          142    144    +2
Impacted Files Coverage Δ
src/split-props.js 100% <ø> (ø) ⬆️
src/should-forward-property.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae1317e...878819d. Read the comment docs.

@kentcdodds kentcdodds force-pushed the pr/fix-svg-attributes-issue branch 2 times, most recently from 6d29fb3 to 646b9fc Compare July 25, 2017 00:02
@kentcdodds kentcdodds force-pushed the pr/fix-svg-attributes-issue branch from 646b9fc to 878819d Compare July 25, 2017 00:03
@@ -28,7 +29,15 @@ const isCustomAttribute = RegExp.prototype.test.bind(
new RegExp(`^(data|aria)-[${ATTRIBUTE_NAME_CHAR}]*$`),
)

const isSvgTag = tagName => supportedSVGTagNames.indexOf(tagName) !== -1
const isSvgTag = tagName =>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the change that fixes the bug.

@@ -166,37 +166,15 @@ test('style objects can be arrays and glamor will merge those', () => {
const phoneMediaQuery = '@media (max-width: 640px)'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reformatting changes only

@@ -80,6 +80,7 @@
"rollup-plugin-uglify": "^2.0.1",
"tslint": "^5.4.3",
"tslint-microsoft-contrib": "^5.0.0",
"tsutils": "^1.9.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were getting peerDep warnings

@kentcdodds kentcdodds merged commit 75495fd into master Jul 25, 2017
@kentcdodds kentcdodds deleted the pr/fix-svg-attributes-issue branch July 25, 2017 00:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: anchor tag no longer accepts display prop as css
2 participants