Mattermost-server: Migrate 'components/admin_console/manage_tokens_modal' module and associated tests to TypeScript

Created on 23 Dec 2019  路  5Comments  路  Source: mattermost/mattermost-server

We are starting to migrate the mattermost-webapp over to TypeScript to facilitate better code quality. This Help Wanted issue is to modify all files in components/admin*console/manage_tokens*modal (not sub-directories included) and associated test files.

Below is a checklist of items you should be doing to migrate:

  • < ] Rename the files to their associated TypeScript extensions (ie. js to ts, jsx to tsx)
  • [ ] Update any components using those to the correct imports
  • [ > Fix any errors generated by the TypeScript compiler. You can run make check-types to display any errors.

We are aiming to be as strict as possible for the time being, but if you run into any issues where the file cannot be successfully migrated without significant change in other libraries, or our tsconfig.json, please feel free to raise them as we are aiming to keep this process smooth and gradual, while enforcing as much as we can.

Some examples of already migrated files can be found here:


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-20586

AreTechnical Debt Easy Good First Issue Hacktoberfest Help Wanted PR Exists TecTypeScript

Most helpful comment

I'd like to work on that one if possible 馃槉
btw I noticed it also mentions to upgrade the test, this component though doesn't have any in the folder... Should I add a test with this PR or leave that up for another ticket?

All 5 comments

I'd like to work on that one if possible 馃槉
btw I noticed it also mentions to upgrade the test, this component though doesn't have any in the folder... Should I add a test with this PR or leave that up for another ticket?

@devinbinnie On the question ^

I'd like to work on that one if possible 馃槉
btw I noticed it also mentions to upgrade the test, this component though doesn't have any in the folder... Should I add a test with this PR or leave that up for another ticket?

@tweichart If there's no test file in the module then you don't have to create one. Although if you'd like to we'd love that!

@devinbinnie I've added a (very) basic test now, would that be suitable? maybe any other test cases you might think of?

@amyblais I might have encountered a bug/wrong definition in a mattermost-redux type definition... i've patched it in my PR, (see file components/admin_console/manage_tokens_modal/types/admin.ts ), but I'm not 100% sure if it's a bug. Could you take a look or ping the right person? I will create a PR for a fix in mattermost-redux once i'm sure it's wrongly defined there, until then I'll leave the PR as a Draft.

@devinbinnie I've added a (very) basic test now, would that be suitable? maybe any other test cases you might think of?

@amyblais I might have encountered a bug/wrong definition in a mattermost-redux type definition... i've patched it in my PR, (see file components/admin_console/manage_tokens_modal/types/admin.ts ), but I'm not 100% sure if it's a bug. Could you take a look or ping the right person? I will create a PR for a fix in mattermost-redux once i'm sure it's wrongly defined there, until then I'll leave the PR as a Draft.

Not off the top of my head, thanks for adding tests! :)

Was this page helpful?
0 / 5 - 0 ratings