-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rename AccessibleSVG to SVG and make it work with React Native #9685
Conversation
173e458
to
a953ceb
Compare
@@ -900,7 +900,7 @@ export default class Dashicon extends Component { | |||
height={ size } | |||
viewBox="0 0 20 20" | |||
> | |||
<Path d={ path } /> | |||
<path d={ path } /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this continue to be Path? in order to get the React-Native version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think temporary it should remain as is.
I was playing with createElement
version which would do the replacement behind the scenes, but with no luck so far. I hope to do some more explorations soon.
But that will make our code in RN fail....
…On Tue, 25 Sep 2018 at 13:58, Grzegorz (Greg) Ziółkowski < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/components/src/dashicon/index.js
<#9685 (comment)>:
> @@ -900,7 +900,7 @@ export default class Dashicon extends Component {
height={ size }
viewBox="0 0 20 20"
>
- <Path d={ path } />
+ <path d={ path } />
I think temporary it should remain as is.
I was playing with createElement version which would do the replacement
behind the scenes, but with no luck so far. I hope to do some more
explorations soon.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#9685 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAnxUXHEZrMbnzH0VXHTve2tN8g1SWw0ks5ueihlgaJpZM4Welk3>
.
|
a953ceb
to
10fd7ae
Compare
@SergioEstevao I brought back Native components for SVG, can you double check if it works properly now? I hope to continue alternative solution where you can write DOM tags for SVG body but have RN to convert them to proper components behind the scenes. If it doesn't work we will have to ensure that all SVG use the pattern established so far. |
## Usage | ||
|
||
```jsx | ||
import { G, Path, SVG } from '@wordpress/components'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Polygon is missing; worth showing in the example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's essential to be include. I don't even know what it translates to :)
@mzorz, @hypest or @SergioEstevao, can you confirm that this PR works with wordpress-mobile/gutenberg-mobile#129? |
👋 @gziolo , I tested out wordpress-mobile/gutenberg-mobile#129 against this branch and, apart from some updating that RN side branch needs, the app actually errors because the EDIT: Well, I should add that there's an open PR #9294 for the changes/fixes already. |
Okey, let's merge this one and rebase #9294 against |
Nice work following up here. |
Description
Follow-up: #9565.
Alternative to: #9294 and #9656.
TODO
How has this been tested?
npm test
npm run build
- make sure all the SVG-based icons still work.Types of changes
Refactoring.
Checklist: