How to permanently add an event like (touchStart) to all elements in WebStorm/IntelliJ (with Angular) - intellij-idea

In WebStorm with Angular, the "Undefined binding" inspection will flag undefined events on elements. How do we permanently add specific exceptions to this? For example, in the following, the (touchstart) event gets flagged:
<button class="keypad-button" (touchstart)="onKeypadKeyPress($event, '1')">1</button>
But we use this (touchstart) event handler everywhere, in hundreds of files and projects. And we can't simply disable the inspection -- we want it to work normally everywhere else.
Is there a way to add this particular event to an exception list permanently, across all files across all projects? Or can we update WebStorm's definition of a valid element's events?

Please follow WEB-44387 for updates; for now, I can only suggest suppressing the inspection by adding <!--suppress AngularUndefinedBinding --> to the top of your file

Related

Refresh button in React-admin

I'm trying to access the refresh button in react-admin project. I tried using getElementsbyClassName it returns HTMLComponents Object but it isn't accessible i.e I can see the component on printing it to console but isn't accessible by code. Is there a way for me to disable this refresh button wherever I want?
I'm not sure the exact use case here, but you can create your own custom AppBar that renders essentially whatever you want: https://marmelab.com/react-admin/Theming.html#replacing-the-appbar.
also see this GitHub issue that mentions removing it entirely: https://github.com/marmelab/react-admin/issues/3383
Within your custom AppBar you could have some logic checks within your custom AppBar if you know ahead of time when you'll want it disabled (like on a certain page/component).
If you need it to be more dyanimcally disabled, you could probably have a very high-level context/state to control that as well..
**NOTE: I have built a custom AppBar before, but I haven't done any selective rendering or disabling within it. So, I can't guarantee that this is exactly correct, but it fits with other custom components I've built.

How to make IntelliJ Idea stop warning about certain attributes?

I'm developing a Vue app using UI Kit which implies using various custom attributes like uk-grid, uk-icon, uk-navbar etc (in Vue single file components' templates). For each one, IntelliJ gives me a warning like
Warning:(7, 52) Attribute uk-icon is not allowed here
How can I tell IntelliJ not to do this? Googling the warning haven't brought any sane results which makes me think there's no ready-to-use package for this (for this particular UI Kit), so the question is: how to make Idea not to warn about a custom list of attributes? But I'll be glad to be wrong and if there is a better solution, please let me know.
Update: like lena has suggested, pressing alt+enter suggests helpful options, including adding attribute to the list of custom attributes. However, wildcard suggestion didn't work for me: the below screenshot illustrates settings that make v-localize attrbute be recognized, but uk--prefixed attribute are still highlighted with warning:
You can add uk-* attributes to Custom HTML tag attributes list in HTML | Unknown HTML tag attribute inspection; the easiest way to do this is using Add to custom HTML attributes quickfix available on Alt+Enter:
Note that IDEA recognizes Vuikit components and directives out of the box - did you consider using it instead of pure UIKit?

xpages view picklist custom control

I am using mark t hughes view picklist custom control from open NTF.
Link to control on openNTF
I have set all the paramenters etc, however when I load the page with the control on, I get my custom error page, and the error below in my error logging database
Error on dialog1button5999 null property/event:
1:
Script interpreter error, line=1, col=35: [ReferenceError]
'compositeData' not found
compositeData.picklistButtonClass + " domfindmebutton5999"
This is trying to set the styleClass of a button in the custom control here:
<xp:this.styleClass><![CDATA[#{javascript:compositeData.picklistButtonClass + " domfindmebutton5999"}]]></xp:this.styleClass>
I am also definately passing this parameter is with the default code:
picklistButtonClass="button2"
I also followed the video Here to the letter, and still get exactly the same issue.
Has anyone come across this before or have any pointers as to where I should be looking to resolve it? Im not sure where to start, as all the instructions and video's explain how to complete the custom properties of the control, but there is never any mention of a need to actually modify any code WITHIN the custom control....
Thanks
(as a side note, I am using bootstrap, should this make any difference)
This is because of the theme definition. Look at the Mark Leusink's blog entry here. http://linqed.eu/2014/08/28/xpages-gotcha-modeconcat-in-your-themes/
If a theme has a "concat" definition, that will be computed at a very early phase. To concat values, it needs to compute the initial value. However, in some cases (e.g. Repeat, Custom control, etc.), the initial value cannot be computed at the page-load section.
For such cases, you can override the theme with a special themeId, as Mark suggested.

Swapping keys for cesium mouse events and creating custom events

I am new to cesium so need some very basic help.
How can we swap the behavior of the mouse left button and right button without having to code the behavior ourselves?
Moreover, can someone give me a basic coding example to define our own mouse button event? I have tried to run the one from Sandcastle but it is not working at the moment, can't figure out the problem for now.
You don't need to use Cesium's mouse event system, you can just listen to the normal JavaScript mouse events outside of Cesium and react to them. The DOM element to listen to is the canvas, typically viewer.cesiumWidget.canvas.
Cesium's built-in event system is not easily configurable for now, that's an item on the wishlist. Part of the problem here is that the default behavior changes at runtime. For example, when the camera tracks or un-tracks an entity, the input event wiring gets rearranged on the fly, and customizations may be overwritten. Someday Cesium's event handlers will need to be rewritten to be configurable.
To extend what #emackey stated:
The general recommendation from the Cesium team is to use native JS events whenever possible. The event handlers within the Cesium library are there more for internal library use and plugin modules.
As for how to capture the mouse click/scroll/move events otherwise it would be helpful to have an example of what you tried so far. Though this is a good reference to read http://www.html5rocks.com/en/mobile/touchandmouse/

Safari/Chrome Developer Tools debug CSS overrides

Safari/Chrome Developer Tools indicate that a CSS rule is overridden by something else by striking it through, as shown in the image.
Sometimes I find myself in a situation where I can not figure out from the CSS files what causes this rule to be ignored. But surely Safari itself must know as it strikes it through.
Is there a way to know what overrides such a rule?
Look at the one which isn't striked out, higher up on the list.
Alternatively, view the computed styles. They will be the definitive applied styles.
When you inspect an element, you can show the 'box'. Just bottom of that, you have a 'filter' which should show you every properties being applied to your element.
If you click on a property, it will give you the file and the line number.
Developer Tools will list all rules for an element. Just read through all the CSS rules that apply, and check for a non-struck-through one with the same name.
Go to Elements >> Computed and you'll get the stylesheet that defines the rule you're looking for.
Go to the Computed tab of Chrome Developer tools. Find wanted property and expand details.