SharePoint Guy's Blog

Blog for my musings, learnings and various and sundry mental meanderings.

  • Connected SharePoint Framework (SPFx) Webparts Part 2

    The Other Webpart and the Communication Between the TwoSo far, we have created a dropdown component that can be used as a child to some other component that can pass in a reference to a method the child can call on selection to perform whatever task for which the parent is being built, and put it all into a component. To arrive at our destination of having that webpart communicate the selected GitHub Id to another webpart that will display the repos for that Id, we only have to build out that other webpart, then add the communication into both of them.The Repos Lister WebpartTo get started, from the tsx component generated when creating the project, I renamed the IGitReposProps to … more

  • Connected SharePoint Framework (SPFx) Webparts Part 1

    One of the key use cases for traditional SharePoint webparts is to have a webpart that allows users to enter some sort of input, causing another webpart to respond in some way. Out of the box SPFx webparts do not allow for this, however there are ways to achieve connected SharePoint Framework (SPFx) webparts. The absolute basics for just the communication piece of this puzzle are included in a reference webpart project on the team’s GitHub site here. There are in fact two samples that use events to communicate between webparts, the react-events-aggregator and the react-rxjs-event-emitter, the main difference being that the former uses out of the box tools to accomplish the event publication … more

  • SharePoint Framework (SPFx) WebParts Using Angular 2/4

    One of the big questions arising from the current emphasis on the SharePoint Framework is whether one can use the more recent versions of Angular, specifically 2 and 4. As to AngularJs (v1.x) it has been advertised that it will work. The problem is that, in contrast with the earlier versions, 2 and 4 more or less assume that it has control of the whole page, an approach that will not work well on SharePoint pages, modern or otherwise. They are designed almost exclusively as a tool to write SPA applications. Making the assumptions that it does make it more performant and easily written, but only so long as it is used as intended.

    In the (relatively) recent August 3rd community call of the … more

  • Changes to SPFx Generator from Versions 1.1.1 to 1.1.3

    I’ve gotten a little behind on my blogging over the month of August, but hope to stay active and consistent during September, time permitting. Before getting into what the changes from versions 1.1.1 to 1.1.3 of the yo generator for SPFx projects gave us, it is good to review what 1.1.1 gave us. For this I refer mostly to Andrew Connell’s post of June 21st. There were 3 key points to that release that I think are pertinent to this discussion. First is that it was there that we got the first developer release of the Extensions. If you have not looked at these and what they can do I will explain more later in this post as well as in subsequent posts. The next point is that there is a new flag … more

  • There was an error sending a text to that phone number. Please try again.–Error from Twitter Settings

    Recently I dove into the new Twitter Api, new for me anyway and was informed that I would need to have a mobile number entered into my profile settings to be able to create an application using their API. When I went to do so I got the above referenced error: ‘There was an error sending a text to that phone number. Please try again.’ The website insisted that it could accommodate all US carriers, yet it denied me. I tried every which way I could think of with no success. along the way I found this article: https://woorkup.com/how-to-bypass-the-twitter-phone-verification-for-new-account, but the suggested approach seemed overly complicated to me, requiring a Google Voice account and all. I … more

  • Moving Local git Repo to GitHub

    Recently I was working on a learning type project that I considered important enough to create a local git repo for it, but not a remote one. However it got to the point that I wanted to preserve it on GitHub. I can add a repo to GitHub, link to it, then push new branches to it. The problem is that I cannot push the master and have that history. First of all there is nothing in my local repo to tell me that it is connected to any remote repo. This is the command used to determine the associated remote repo:git remote –vIn this case it returned nothing. To get where I wanted to go I created a git repo named GitToAdd. Here is the command I used to associate this remote repo with my local repo: … more

  • Updates on SharePoint Framework

    The SharePoint Patterns and Practices (PnP) group continues to announce developments in the SharePoint Framework (SPFx) space. From the latest SIG meeting broadcast on YouTube there are a couple of high points to note, along with the evolution of the initiative. First is that it will be available for OnPrem farms with the release of Feature Pack 2 of SP 2016. This is expected in the second half of this year but as far as I have heard there is no firm date, other than teasers, beyond that. Still, with it being in GA status for O365, this is exciting. In order to accommodate the OnPrem scenario, the first choice of the yo project generator will be to prompt whether the project is targeting an … more

  • Creating and Running Tests

    Building out the test project NOTE: the initial test project should have been created as an xUnit project. Towards that end I have added the command: yo aspnet xunit Pubs.Data.Test --version-current to the yoCommands.txt file and run it to use that as the test project. To create tests we will need to open up the Pubs.Data.Test project, then either delete the Class1.cs file, then add a new class named StoresTest, or else rename the Class1 class to StoresTest. Next open up the csproj file and add the following lines to dependencies, either manually or by using the NuGet Package Manager extension of VS Code: "Pubs.Data": "1.0.0-*"”Microsoft.EntityFrameworkCore”: “1.1.0”,"Microsoft.Extensions. … more

  • Presentation to Triangle SPUG

    Thanks again to George and Mike for the opportunity to present at the Tri-SPUG meetup last Thursday, the 15th. Again all apologies to the attendees that the projector was not working and hopefully there was still some benefit garnered from being there. As promised I am providing the slides here. If you want to see the code you can clone from the github site here: https://github.com/SharePointGuy1/TriSPUGSPFx. Assuming you have git installed, if you type git clone https://github.com/SharePointGuy1/TriSPUGSPFx.git it will install in a subfolder named TriSPUGSPFx, or git clone https://github.com/SharePointGuy1/TriSPUGSPFx.git your-sub-folder, and it will install in that subfolder. One thing I … more

  • Upcoming Presentation to the Triangle SharePoint User Group (TriSPUG)

    Thursday I will be presenting to the Triangle SPUG on the new SharePoint Framework (SPFx). I am very excited but nervous as it has been a few years since I have done a presentation like this; not since the 2012 Atlanta SharePoint Saturday event. That did not go well.. First off my slides were a little chaotic, and the preparation was not what I would have hoped. This time I have spent the time to put as little into the slides as will make the point, and little or no more. (It’s like Mark Twain’s comment to an interlocutor apologizing for so long a letter, that he had not the time to write a shorter one. ;->) I am also rehearsing the talk itself, despite sounding like a crazy person … more