Pinterest share button functionality not working using react-share library - pinterest

<PinterestShareButton url={localHostShareUrl}> <PinterestIcon size={35} round={true} /> </PinterestShareButton>
I use this component to share blogs.I use facebook,twitter,linkedin and pininterst components using react-share.But when i click on pininterest button it doesn't popup share box but other platforms work smoothly.Anyone help me to figure this issue.Is this the problem with the package?

You'll need to include both "url" and "media" parameters in the PinterestShareButton to create the pop up.
<PinterestShareButton url={url} media={url} description="">
<PinterestIcon />
</PinterestShareButton>

Related

Trying to disable remove on a per file-pond item basis

I'm investigating adding custom functionality via my own plugins, and here's what I've done so far
Premise
Create a plugin which will disable the remove button for relevant items
Attempted so far
Registered a plugin and during DID_LOAD_ITEM tried the below
const removeItemButtons = el.querySelectorAll('.filepond--action-remove-item');
removeItemButtons.forEach(removeItemButton => {
removeItemButton.setAttribute("disabled", "disabled");
});
But the button is not disabled. The attribute does not appear on the remove button. Am I missing something in the lifecycle on how plugins interact with the DOM? The button does get returned by the querySelector all, is it modified after the plugin is called?
did the removeItemButtons have been rendered before your function? it seems like your selector did not get the items

React Native Image Not Working with specific URL

I have the following code below, where the Image component encompasses two Image component.
<View style={styles.container} >
<Image
style={{width: 50, height: 50}}
source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
/>
<Image
style={{width: 50, height: 50}}
source={{uri: 'http://lghttp.24811.nexcesscdn.net/80B00B/qpb/media/catalog/product/cache/11/image/439x334/9df78eab33525d08d6e5fb8d27136e95/q/w/qw_neverdonejoggers_p_.png'}}
/>
</View>
For the first github URL it renders the img logo correctly as expected.
However for the second Image it doesn't render the source: qw_neverdonejoggers_p_.png
Which leads me to the conclusion that something wrong URL, however clicking on the URL correctly load the Img:
http://lghttp.24811.nexcesscdn.net/80B00B/qpb/media/catalog/product/cache/11/image/439x334/9df78eab33525d08d6e5fb8d27136e95/q/w/qw_neverdonejoggers_p_.png
I attempted to replicate the issue here, https://rnplay.org/apps/_dQXXw
but it renders both the images properly.
So its only on the local my computer that for some reason I can render second image ?
Using:
"react": "15.4.1",
"react-native": "^0.39.2",
Andrés' answer is somewhat correct, but it does not address the exact cause of the problem, and that is iOS' App Transport Security. iOS does not allow plaintext requests (http) by default, and so you need to define a 'whitelist' of URLs that can be allowed to override this particular protection mechanism. You have that list already set up so that your app can connect to localhost during development,, so just add new entries to it. You can see how to do so in this answer. Of course, this only works if you know the list of URLs in advance, which might not suit your needs. In that case, have a look at this article.
uri only works with https. In Android it should work fine with either http or https.
You will find further information here.
Guys there is an issue with Image component is that if first time initialize the component with source={{uri : 'some link'}} it may not work (at least not for me when I fetch image from HTTPS URL from Firebase storage). The trick is you have to trigger a change to source props like first you need to keep
source to source={undefined} and then change to source={{uri : 'some link'}}.
Hope it would help someone
Aside issue with HTTPS, make sure you set the width and height of the Image
How i make Image source with http or https url work is by resetting the android emulator am using.
You can clear the emulator by opening the android studio then click on tools tab at the top bar select AVD Manager once it open
Select the emulator you are using, right click on it then select wipe data.
Once that process is completed, open cmd or terminal at the root of your react-native project
$ npx react-native run-android

Automation using Watir button elements

So I have been experimenting with Watir automation scripts using Ruby. I have tried to experiment with different websites, like Twitter, Gmail, and Yahoo. Here is the catch: I am able to open a browser, login, and get to the home page. On all of these whether it is compose a new email or tweet every time I select it with the appropriate ID or Class, it throws an error in the terminal like this...
.rvm/gems/ruby-2.2.1/gems/watir-webdriver-0.8.0/lib/watir-webdriver/elements/element.rb:533:in assert_element_found': unable to locate element, using {:title=>"compose", :tag_name=>"button"} (Watir::Exception::UnknownObjectException)
from /Users/xxx/.rvm/gems/ruby-2.2.1/gems/watir-webdriver-0.8.0/lib/watir-webdriver/elements/element.rb:505:inassert_exists'
from /Users/xxx/.rvm/gems/ruby-2.2.1/gems/watir-webdriver-0.8.0/lib/watir-webdriver/elements/element.rb:114:in click'
from yahoo_mail.rb:18:incompose_email'
from yahoo_mail.rb:27:in `'
My question is, are there elements that you simply cannot click or select using Watir automation?
EDIT: How would I be able to hit this to be more specific? I seem to be getting the same results on Yahoo, Gmail, and Twitter when it comes to composing anything after getting logged in. So I how would I hit this button?
button id="global-new-tweet-button" type="button" class="js-global-new-tweet js-tooltip btn primary-btn tweet-btn js-dynamic-tooltip" data-placement="bottom" data-component-term="new_tweet_button">
The HTML for the Compose button is basically the following (NOTE: id attribute removed):
<button tabindex="0" data-action="compose" title="Compose" class="btn btn-compose">
Your stacktrace indicates that you're using this locator:
{:title=>"compose", :tag_name=>"button"}
If you change :title=>"compose" to :title=>"Compose", you should be in business.
Have you tried the following code?
button(id:'global-new-tweet-button').when_present.click
Maybe you were clicking the button without checking if it is already present on the page.

how to make a Location Service Permission MessageBox

I have submited a App but is not certified because this:
"This application uses the Location Service API to determine a user's location and show them events taking place nearby
however, it does not appear to contain a privacy policy that is accessible to users explaining how the application uses the
Location Service API."
And what i want to do is something like this
When user clicks in Policty Statement open a new window with settings page with my app location policies.
Can anyone help me? How can i add a link like in image?
Cumps
You can navigate to a page using the Hyperlink control
<Textblock>
<Hyperlink NavigateUri="/PrivacyPage.xaml"
TargetName="_blank">Privacy Statement</Hyperlink>
</Textblock>
See MSDN for more info
I don't think you can put a hyperlink in a call to MessageBox.Show() though so you have to create your own Messagebox-like page.
The first time the app is launched you direct the user to your message page. E.g. using this in MainPage.xaml
OnNavigatedTo(...)
{
if(!AppSettings.HasMessageBeenShown)
{
AppSettings.HasMessageBeenShown=true;
NavigationContext.Navigate(new Uri("/MessagePage.xaml", UriKind.Relative));
}
}

How to display custom Entity under 'Extensions' tab on workplace?

I have created a new custom entity called Sports Leagues.
Now i am wondering how to display/ accessible this under 'Extensions' tab on workplace?
Thanks
On the screen where you customize the new entity there's a section on the General tab called 'Areas that display this entity' - check the 'Workplace' checkbox.
Export Site Map, look for Area with Id="Workplace". Look for the Extensions group, or add:
<Group Id="Extensions" ResourceId="Group_Extensions">
<SubArea Id="sportsleagues" Entity="new_sportsleagues" />
</Group>
Import the SiteMap back into the system. (Settings then Customization)
did you remember to publish the new entity? ticking the workplace box and publishing the entity should be all you need to do.

Resources