Can you specify your own attribute used to name a tap/click action in DataDog React Native SDK? - react-native

The DataDog docs states that
Starting with version 2.16.0, with the actionNameAttribute initialization parameter, you can specify your own attribute that is used to name the action.
Thus you can have something like this in the DD configuration constructor:
DD_RUM.init({
...
trackInteractions: true,
actionNameAttribute: 'itemID',
...
})
Now both attributes itemID and data-dd-action-name can be used to name tap/click actions; data-dd-action-name is favored when both attributes are present on an element.
However that seems to be the case only for the browser SDK, and not the React Native SDK. Is this really the case?

data-dd-action-name is currently the only way to specify the target name of an action using the RUM React Native SDK.
Depending on your use case you may can also use the DdRum.addAction() and DdRum.startAction() methods for manual action tracking and provide the desired target name. There is an example of calling these methods in the Manual Instrumentation section of the RUM React Native SDK documentation.

Related

Get FirebaseAuthPlatform for Flutter web RecaptchaVerifier

SITUATION:
I'm in the process of implementing Firebase phone sign-in on flutter web. In doing so, I want to customize the reCAPTCHA that is called by the signInWithPhoneNumber function as outlined in the Firebase documentation.
final ConfirmationResult confirmationResult = await auth.signInWithPhoneNumber(
phoneNumber, verifier_should_go_here
);
COMPLICATION:
I am trying to implement the RecaptchaVerifier, but it has a required parameter called FirebaseAuthPlatform, and I can't figure out how to generate this parameter for my app.
QUESTION:
How can I create a RecaptchaVerifier to pass to the signInWithPhoneNumber function on flutter web?
3 easy steps:
You add the firebase_auth_platform_interface dependency to your pubspec.yaml file with flutter pub add firebase_auth_platform_interface
You import the package like this: import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart' show FirebaseAuthPlatform;
Inside the constructor for RecaptchaVerifier, you use FirebaseAuthPlatform.instance

How to style notifications in Vaadin Flow

I would like to style notifications in Vaadin Flow (19+), in Java, exactly as shown here in typescript, by assigning a theme and not setting the color of the elements (as shown in the java example). Apart the fact that setting the color is troublesome (foreground, background...) and fragile (e.g. switching to dark mode), the Java example shows setting a CSS color, I would expect to be allowed to use Lumo color variables (e.g. --lumo-success-color). Is this possible? Can anybody show an example?
You can use the addThemeVariants() method to define the variant you want to use:
Notification notification = new Notification();
notification.addThemeVariants(NotificationVariant.LUMO_PRIMARY);
The Java examples have not been moved over to the new docs site yet, you can find them here https://vaadin.com/components/vaadin-notification/java-examples/theme-variants

What does ReactClass<*> mean?

I'm seeing ReactClass<*> in code for React-Navigation. I have two questions:
Why does ReactClass not need importing at the top of the file? Is it some kind of global constant in React Native?
What is the meaning of ReactClass<*>?
It is an existential type in Flow of a React Component.
In short, they're saying expect that tabBarComponent may or may not be there (note the question mark at the end of tabBarComponent?, and that it will be a React component class, with arguments of a type that flow will infer.
Flow is a tool for making JavaScript strongly typed.

Using Favourites with Products in shoutem builder

I've been using / testing the new Shoutem builder, and I've installed both the products and the favourites extensions but am wondering on how I can "link" the two in between. So a user can favourite a specific product and store it in a little dropdown menu. I've searched the documentation and sample apps and I haven't seen the both used in action. Actually I haven't seen the Favourites extension used. Can this be easily accomplished by linking the two extensions?
I am looking for a starting point. So if anyone can guide or link me in the right direction that would be interesting.
Thanks.
This is not documented yet, but we have it implemented. You can check Books extension. It does just what you're looking for. It requires some changes on Product extension. You can check here how you can modify existing extension.
The app folder of extension is what is bundled inside of the app. That said, everything that extension exposes in its app/index.js is the public API, which can be imported directly inside of the other extension:
import {
Screen
} from 'tom.restaurants'
...where tom is used as example for developer name and restaurants for example for extension name.
All extension share the global app state, which is divided into extension sub-states prefixed by extension full name:
{
'tom.restaurnats': {
// state of 'tom.restaurants' extension
}
}
This way, you can make the 2 extension communicate.
I would recommend you checking out these 2 guides:
Technical overview - explains how the extensions are structured inside the app
Modifying extension - explains how to use parts from other extensions inside of your extension

Component is not detected in MonkeyTalk

I have used achartengine api in my android application for chart but MonkeyTalk is not able to detect this component, so for that what should I do?
If there are any components not getting detected using "Record" option, try the component tree button on the monkeytalk IDE which lists the component's type and monkeyId from which you can make an mtcommand and use it to playback.
For example, if there is a listview with its id, set to "myListView", then you can formulate the mt command as "ListView myListView selectIndex 0"
You can find command references and its actions at
https://www.cloudmonkeymobile.com/monkeytalk-documentation/monkeytalk-language-reference/command-reference
If still didn't work, try to contact monkeytalk for their QuickStart programs:
https://www.cloudmonkeymobile.com/monkeytalk/forum