DEMO - Implement a Teams channel tab
Skills:
Systems Design Basics50%
Key Takeaways
This video demonstrates how to implement a Teams channel tab with a configuration page using Microsoft Teams and VS Code, including adding input controls, creating a new interface, and implementing channel logic.
Full Transcript
in the last video you saw how to add a channel tab to an existing microsoft teams project and in this video we're going to see how to implement that channel tab as well as how to include a configuration page in the tab now the last step is to implement our channel tab so let's go back to vs code and let's find our tab that we have so what i'm going to do is let's add in a couple other controls so like i need an input and input props those are two more import statements that we're going to need and i'm also going to create a new interface so my interface i'm going to have is export interface we'll call this the i config math tab state and this is going to have a math operator which is just going to be a string it's going to have an operand a which is a number operand b which is also a number and the result which is a string so i have an existing use state let's go then let's make another state thing here another state entry or state property so i'm going to add the following statement this is going to define a variable to contain the state for our our current tab so i'm going to say const math tab state and then set math tab state to follow that same convention this is going to be use i use use the hook use state that is an i config math state and it's going to pass in the math operator is going to be something as the iconfig mass state so the default state we're going to have is add so we're by default we're going to choose we're going to if the state hasn't been selected or if that we don't know what it is the operator is just going to be add now let's implement the channel logic so let's look for the effect our current effect that depends on the microsoft team's context and that is this one right here so we can see that because it's passing in the context now what we want to do is we want to update this to do some new stuff so we want to leave this set empty id to be equal to the ndid that's passed in but i also want to do the set math tab state i also want to pass in and say look at the current state and i want to use i'm going to pass in the current state and we're going to have our math operator context.nc the entity id dot replace the math wherever you see math page and we'll replace it with nothing so i want to strip off the math page property that we see there and this is going to be as i config math state and that's to closing right there and then we have that okay cool so now everything's in good shape now i want to also go ahead and add in a couple event handlers uh to our class now these event handlers let's go ahead and add these and i'll explain what they do so so these three different event handlers they do a couple different things so the uh change handler a and change operant or change operand a and change operand b both of these are going to run when our when the user enters in some text for our input boxes that we're going to add in just a minute so what they're doing is they're going to update the state of the um of our app um the next thing that we have here is when the operand changes so when someone changes from you know addition to subtraction or something like that we want to we want to change that up when the operand changes we're going to redo all of our results here so we can see here that we got a couple different string results that we're generating and we're passing in the string results into our state for the actual app now the next thing to do is to implement the channel page user interface so let's find our return statement which is down here at the bottom and i'm going to replace our return statement it's just going to grab all of this and let's add in what we see here so what is this doing so what this did is you can see that it's listing out we have two input boxes one for our input for the operand a and then one for operand b and it's going to allow us to then go through and to click this calculate button and it's basically going to come in and say let's go through and recalculate the results and based on the operand that was selected in our settings that's how the value that's how the value is going to get updated it's going to get or get calculated so at this point at this time so at this point the channel tab page is complete so if the web server is not running which we can see something fail while we were coding it up that's fine we will just restart it with gulp ingrock serve so let's go back to our browser and let's go off of our tab and now we'll come back into our tab and let's take a look at it so here's our config math tab so we can see we're doing the add operation so let's go ahead and add two values together so i'll do a 5 and an 8 and click calculate 13. fantastic so now let's go in let's change the value that's going to get run so instead let's do a multiply so i'll hit save and now we'll do a 5 times 8 equals 40. so we can now see how our app is responding or our custom configuration tab is setting the values our configurations page is allowing us to change the operation we want to run and our configurable tab is allowing the user to enter different values in and then it's using the setting for our configuration page to figure out what math operation it should perform so in this demo we created a channel tab with the configuration page added it to an existing project for a microsoft teams app
Original Description
In this video, we'll continue with the demo and customize the new channel tab to add a configuration page so users can change how the tab works in each use.
This video is part of a series in a playlist and is associated with a Microsoft Learning module: "Create embedded web experiences with tabs for Microsoft Teams". Refer to the following URL to access the Microsoft Learning module for hands-on lab exercises and more resources:
https://docs.microsoft.com/learn/modules/embedded-web-experiences/
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Microsoft 365 Developer · Microsoft 365 Developer · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Adaptive Cards community call-February 2019
Microsoft 365 Developer
PowerApps community call-February 2019
Microsoft 365 Developer
Microsoft Graph community call-March 2019
Microsoft 365 Developer
Office Add ins community call-March 2019
Microsoft 365 Developer
PowerApps community call-March 2019
Microsoft 365 Developer
Microsoft Teams community call-March 2019
Microsoft 365 Developer
Using React and Office UI Fabric React Components
Microsoft 365 Developer
Build Microsoft Teams customization using SharePoint Framework
Microsoft 365 Developer
Microsoft Graph community call-April 2019
Microsoft 365 Developer
Using Change Notifications and Track Changes with Microsoft Graph
Microsoft 365 Developer
Office Add Ins community call-April 2019
Microsoft 365 Developer
Adaptive Cards community call-April 2019
Microsoft 365 Developer
Microsoft Teams community call-April 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Application Registration
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Directory API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Microsoft Teams
Microsoft 365 Developer
Getting Started with Microsoft Graph Explorer
Microsoft 365 Developer
Getting Started with Microsoft Graph
Microsoft 365 Developer
Getting Started with Microsoft Graph and Mail API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Office 365 Groups
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Calendar API
Microsoft 365 Developer
Getting Started with the Microsoft Graph Toolkit
Microsoft 365 Developer
Getting Started with Microsoft Graph and JavaScript SDKs
Microsoft 365 Developer
Getting Started with Microsoft Graph and .NET SDKs
Microsoft 365 Developer
Discover how businesses can be more productive with Microsoft 365 integrations
Microsoft 365 Developer
Adaptive Cards community call-May 2019
Microsoft 365 Developer
Office Add-ins community call-May 2019
Microsoft 365 Developer
Why We Built on Microsoft Teams
Microsoft 365 Developer
Microsoft Teams community call-May 2019
Microsoft 365 Developer
Microsoft Graph community call-June 2019
Microsoft 365 Developer
Build Angular SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Office Add -ins community call-June 2019
Microsoft 365 Developer
Build Android native apps with the Microsoft Graph Android SDK - June 2019
Microsoft 365 Developer
Build MVC apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Authenticate and connect with Microsoft Graph - June 2019
Microsoft 365 Developer
Microsoft Graph data connect - June 2019
Microsoft 365 Developer
Change notifications with Microsoft Graph - June 2019
Microsoft 365 Developer
Build iOS native apps with the Microsoft Graph REST API - June 2019
Microsoft 365 Developer
Build Node.js Express apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Smart UI with Microsoft Graph - June 2019
Microsoft 365 Developer
Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Microsoft 365 Developer
Build UWP apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Build React SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Batching
Microsoft 365 Developer
Getting Started with Microsoft Graph and Change Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and Consent Permissions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Education
Microsoft 365 Developer
Getting Started with Microsoft Graph and Financials
Microsoft 365 Developer
Getting Started with Microsoft Graph and Excel
Microsoft 365 Developer
Getting Started with Microsoft Graph and Data Connect
Microsoft 365 Developer
Getting Started with Microsoft Graph and Intune
Microsoft 365 Developer
Getting Started with Microsoft Graph and Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneNote
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneDrive
Microsoft 365 Developer
Getting Started with Microsoft Graph and Open Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Paging
Microsoft 365 Developer
Getting Started with Microsoft Graph and Schema Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Security API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Query Parameters
Microsoft 365 Developer
Getting Started with Microsoft Graph and Reporting API
Microsoft 365 Developer
More on: Systems Design Basics
View skill →
🎓
Tutor Explanation
DeepCamp AI