DPS909 — Release 0.4 — Final

Ekaterina Grinberg
2 min readDec 11, 2020

Mattermost

This week I worked on finalizing the migration of the post_markdown component to the typescript of the Mattermost web app repository.

To remind, the ticket required to migrate all files including the test files under component/post_markdown to typescript.

As I mentioned in the previous post, I had some errors while migrating the code that was generated by the typescript:

  1. Property ‘message_source’ does not exist on type ‘Post’. — To solve this problem I asked for help by using the “Developers” community channel. The problem was that message_source may be missing from the Post type in mattermost-redux. The solution that was suggested there is to add it as optional there.
post?: Post & {message_source?: string;},

2. The component is required x parameters but only passed y. — This type of error I haven't solved yet even after asking the “developers” community. The answers I received:

“. tsc should be able to recognize that the props are being provided by the connected component”, “this can happen if you import the unconnected component (vs. the index/connected one)“

After checking the code, this is not the case. The imported component is the connected one. I decided to create a pull request with these errors so the developers can look at the code when they doing a review and might help to solve this issue.

My pull requestMigrate ‘components/post_markdown’ module and associated tests to TypeScript.

As with my previous experience contributing to Mattermost, it takes some time to review, make changes, and get the pull request merged.

This time I had five files to migrate and at the beginning, I had over 40 typescript errors. I minimized the migrated code to 2 errors and waiting to hear back in order to finish the migration.

Overall experience:

I enjoyed working with the Mattermost project. It provided me with insight into how big projects collaborate and work with many contributors. I gained experience in working with the open-source project and learned how to approach it. It requires a lot of research, code examination, understanding of how things work, and what are the libraries that are used.

On the final note, this course exceeded my expectations. I learned a lot about open source projects and how things work in the real world. I gained much more experience using GIT which is a super important tool for developers. Thank you!

--

--