Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: migrate to SDK-V2 #200

Merged
merged 12 commits into from
Nov 4, 2024
Merged

build: migrate to SDK-V2 #200

merged 12 commits into from
Nov 4, 2024

Conversation

melsener
Copy link
Member

@melsener melsener commented Apr 1, 2024

Change description

Migrate to TeamsJS-V2.

You can review this PR commit-by-commit.

  • The first commit consists of the automatic changes made by Teams Toolkit (see Reference-1) to update the SDK. Along with updating some code, it adds some TODOs for us.
  • The later five commits handle those TODOs
  • The next one updates the SDK and manifest to the recommended version (see Reference-2)
  • The next commit updates the login flow due to the change in the authentication method (See Reference-3 and 4)
  • The next commit removes early returns in case of undefined since this was also possible in the previous version (see Reference-5 and 6)

References:

  1. Updating via Teams Toolkit
  2. Existing teams apps - SDK and Manifest recommended versions
  3. AuthenticateParameters interface on v1.11.0 and deprecation warning
  4. Authenticate Popup Parameters interface docs
  5. Updates to Context interface
  6. Context interface on v1.11.0

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and it follows conventional commit format and breaking change indicator if required (You can use the Angular convention)
  • Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

@melsener melsener force-pushed the build/migrate-to-sdk-v2 branch from 1d58e48 to a8df13c Compare April 2, 2024 08:35
@melsener melsener changed the title [WIP] build: migrate to SDK-V2 build: migrate to SDK-V2 Apr 2, 2024
Copy link

@dorukgunes dorukgunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we have a change to test it with old ms teams ?

}) => {
microsoftTeams.settings.getSettings(settings => {
microsoftTeams.settings.registerOnSaveHandler(async saveEvent => {
app.getContext().then(({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing important but, should we also update to async, await style to improve readability ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're using it inside useEffect this version seems to provide a better readability to me. you can see the alternatives here: https://devtrium.com/posts/async-functions-useeffect

@melsener
Copy link
Member Author

melsener commented Apr 3, 2024

Did we have a change to test it with old ms teams ?

yes @dorukgunes however, I couldn't test it with new ms-teams and teams cloud due to the issues on their side.

@melsener melsener requested a review from dorukgunes April 3, 2024 12:54
Copy link
Member

@aykutbulca aykutbulca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not merge it until we make sure we can publish a new manifest (aka, we have the dx account permissions back).

@melsener melsener merged commit adb346c into main Nov 4, 2024
1 check passed
@melsener melsener deleted the build/migrate-to-sdk-v2 branch November 4, 2024 13:16
melsener added a commit that referenced this pull request Nov 11, 2024
melsener added a commit that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants