How to resolve "Warning: Invalid DOM property `fill-rule`. Did you mean `fillRule`?" on Twilio Flex - twilio-flex

I just downloaded the Twilio Flex Sample App and once I add my appConfig and do a npm start I immediately see several errors:
Warning: Invalid DOM property fill-rule. Did you mean fillRule?
Warning: Invalid DOM property stroke-width. Did you mean strokeWidth?
Warning: Invalid DOM property stop-color. Did you mean stopColor?
Warning: Invalid DOM property stop-opacity. Did you mean stopOpacity?
How can I resolve these? The #twilio/flex-ui project is not on github to post an issue to and the documentation doesn't mention it as a known issue right now.

I fixed it by changing those props in the SVG File. e.g. ‘stroke-width’ into ‘strokeWidth’ or ‘fill-rule’ into ‘fillRule’.

This is happening because the Twilio Flex Sample App was built with Create React App, and React wants multiword names to be in camel case. You may be able to resolve the errors with your Webpack/Babel configs
How do I get rid of react error warnings telling me to change svg attributes to camel case?
Btw I'm confused about what you mean when you say this isn't on GitHub as your link points to a GitHub repo?

you have to change class and fill-rule attributes on the svg tag. it must be className and fillRule. because used camelCase on javascript
Example:
<svg width="2em" height="1em" viewBox="0 0 16 16" **className**="bi bi-cart4" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path **fillRule**="evenodd" d="M0 2.5A.5.5 0 0 1 .5 2H2a.5.5 0 0 1 .485.379L2.89 "/>
</svg>

Hey I had similar issue and found the following article, hopefully it can help someone else in the future.
How To Use SVG in React
Assuming you have created your project using create-react-app then import the SVG as a component, create-react-app comes with SVGR under the hood, for other suggestions read the article.
import {ReactComponent as nameSvgHere} from 'twilio'
it worked for me
cheers

if you are using vs-code , then go to search bar (magnifying glass sign) which is on the left top side ,and vertically second position .
Warning: Invalid DOM property fill-rule. Did you mean fillRule?
fill-rule (place it on search box)
2.fillRule ( place it on replace box and press the square sign right side on this box)
3 .it will be replace

Related

custom card component Vue.js + Vuetify

I found this card component example on the internet and would like to build something similar with Vuetify. I'd like to know what is the best/easiest way to approach this? Using default v-card and add custom elements/css inside.Or building the whole card with Vuetify gid?
You can recreate something similar with an outlined v-card with only a v-card-text child. The top section looks like an outlined v-alert with left border. Use v-row and v-col (col-auto on all) grid inside, with v-spacer for the whitespace after first column. Bottom section will also have the grid. You could also put the v-alert inside v-card-title for similar effect but I don't think the banner alert is appropriate as a "card title".
Vuetify is a Vue UI library that provides ready-to-use components saving the developer time. So if the components Vuetify makes available to you are fine out of the box, you're fine, otherwise there's nothing wrong with adding custom CSS. In reference to the screenshot you attached, vuetify allows you to make that card in a practically identical way. In addition to studying the functioning of the basic components, I recommend that you take a look at the ready-made CSS classes that Vuetify provides you. Thanks to those you can do a lot of things. I hope I was helpful.

UIPath - Unable to get Text from UI

I am trying to capture Text from UI. However in inspect element tool the text is missing. Text is coming from some other div. When I indicate elements from UIPath it says validated but inside the element the text is not there. It's somewhere in other div. I tried editing CSS shown below, which is the exact location of the text. However the data is blank.
Midified CSS:
<webctrl css-selector='div[class*=is-cherry]h1v' idx='2' isleaf='1' parentid='root' tag='DIV' /
The page is using React. So there is no proper way to simply read the text. Instead do it with OCR.
Use a Selector
The best way for you would be using a selector. Here it's a little bit tricky to find the proper selector as the React Framework tries to hide several elements by itself. But when you found the pattern you are good to go.
Find your value under the level root as you can see in the image:
So now you simply use the Get Text activity:
Make sure that you edit the selector in the following schema:
<webctrl tag='H1' parentclass='level-item is-blue fadeInUp' />
This is the selector for your blue value. Now if you want the red one take this one:
<webctrl tag='H1' parentclass='level-item is-cherry fadeInUp' />
I believe you got the point now how that page is working and how to selection of the different colours works.
OCR technology (make sure you are using the Profile Scan)
I would not recommend you to use OCR as you never know if the elements is switching its visual area. If so your process would fail.

SVG rendering incomplete in Firefox

I've been searching for a few hours for a reason this SVG wouldn't work in Firefox. Anyone know if I'm running into a known bug or have a problem in my code here?
http://codepen.io/ryanburnette/pen/c5274e0076748da1a53a2d16c8702050
I'm asking specifically in terms of the SVG in that Pen. Note my code is in Slim here.
svg.overlay viewbox="0 0 265 281.551"
g
path.outer d="M132.5,0C59.322,0,0,59.322,0,132.5c0,66.245,48.616,121.134,112.115,130.939l16.505,16.504, c2.143,2.144,5.617,2.144,7.762-0.001l0.001,0.001l16.504-16.505C216.385,253.633,265,198.745,265,132.5,C265,59.322,205.678,0,132.5,0z"
path.inner d="M132.502,256.388C64.08,256.388,8.614,200.921,8.614,132.5S64.08,8.612,132.502,8.612,c68.421,0,123.887,55.467,123.887,123.888S200.923,256.388,132.502,256.388z"
Update 1:
I had commas where I shouldn't have. What's interesting is that Firefox was the only browser in which the malformed SVG didn't work properly in spite of the error. Specifically, in Firefox, the element did not render past the point where the comma which should not have been there was located.
Update 2:
As validation has been suggested to me I tried validating my SVG markup using the W3C markup validation service. While this does check the integrity of the XML, it wouldn't have caught this particular problem.
You have added extra commas , in your path. You need to remove them.
Updated codepen
path.outer d="M132.5,0 C59.322,0 0,59.322 0,132.5 c0,66.245 48.616,121.134 112.115,130.939 l16.505,16.504 c2.143,2.144 5.617,2.144 7.762-0.001 l0.001,0.001 l16.504-16.505C216.385,253.633 265,198.745 265,132.5 C265,59.322 205.678,0 132.5,0z"
path.inner d="M132.502,256.388C64.08 256.388,8.614 200.921,8.614 132.5S64.08,8.612 132.502,8.612 c68.421,0 123.887,55.467 123.887,123.888 S200.923,256.388 132.502,256.388z"
Your path is invalid per the SVG specification. Specifically commas are only allowed between numbers i.e. ...l16.505,16.504, c2.143,2.144,5.617... is an error.

Set a Layout to a View in Javascript

I have this situation:
I have some Views and by default they have assigned a Layout for them. The problem is that in some specific cases, I need to change the Layout of some of these Views in the Javascript file.
I am using this way:
$("#tabstrip-dash").setAttribute('data-layout', 'mobile-tabstrip-layout2');
This solution works only if I reload the application, but I want to change it instantly.
Is there any way to set the new Layout?
Thanks!
Looks like the answer might be something like:
app.navigate("#someId")
I got this info from here: http://www.kendoui.com/forums/mobile/general-discussions/how-to-switch-views-programatically.aspx
Note, in a test I got this working, but in my main project I have not. I'm seeing the error "Uncaught TypeError: Cannot read property 'length' of undefined ". Not entirely sure whats going on, but there are other reports of it (in case this happens to anyone else).

Cannot make Scrollspy Bootstrap work

I am designing a single page website and want the fixed nav links to change colour whenever the user scrolls to the specified location. Seems pretty easy to do, I thought it was pretty easy to do, but I am having problems making it work.
I only downloaded the Scrollspy JS Plugin, as I am not using the Twitter Bootstrap CSS. I just require the Scrollspy Plugin.
Could you check this jsFiddle and provide some guidance? I have already checked out the documentation here, but I've had no luck. Any help is greatly appreciated :)
http://jsfiddle.net/xjTpk/28/
Ignoring the serious issues with your use of JSFiddle1, and the typographic errors2, the principle things wrong are
You need the .nav class on the <ul> in the navbar, and
The #welcome is not an existing element, causing a JS error.
Here's a fixed demo:
JSFiddle
Oh, and you don't need both data-api and js to initialize the plugin; choose one.
1 Loading Bootstrap 2.0.2 + 2.0.4 at the same time; trying to include a <body> in the html panel
2 Using upperCamelCase on a function that doesn't need it: scrollSpy();
Key thing you are missing is you have to have a "nav" class on the ul element (or some other parent element) as that is used in the scrollspy code as part of a selector.
I couldn't get yours to work for some reason but here is a simplified example:
http://jsfiddle.net/UWzeD/5/
Your ul needs a nav class, but most important for scrollspy to work properly is that your target needs to be one level about the ul. Otherwise I've found that scrollspy doesn't work.

Resources