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

Update to use the new version of mattermost-redux #1984

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

hmhealey
Copy link
Member

@hmhealey hmhealey commented Jan 27, 2025

Summary

As part of trying to start publishing mattermost-redux again, I've used Playbooks as a test bed to ensure that the published package actually works since it's the first time that we've published it from a monorepo and because I'm trying to do things "the right way" versus the old mattermost-redux package which was rather clunky and required a lot of workarounds.

The commits for this can be roughly broken down into a few categories:

  1. Replacing the mattermost-webapp dependency with mattermost-redux or @mattermost/types
  2. Updating the import paths to mattermost-redux and removing the overrides to make the previous ones work (except for Jest which I fought with for hours and gave up on)
  3. Updating some code to add null checks or rename things to support the latest version of mattermost-redux
  4. Adding some dependencies to Playbooks which were implicitly available as part of the web app
  5. Finally, updating Node and Babel to make the package work and because it was on an old version and I accidentally did a lot of this work on Node 20 before realizing that Playbooks used an older one

This is a draft for now since it's using a prerelease version of mattermost-redux and the @mattermost packages.

Web app PR: mattermost/mattermost#30020

Update import path for createSelector
Update name of fetchChannelsAndMembers and update channelsByTeam type

Properly type preference get selector
I can't figure out why Jest can't find these files given other tools can
use the mappings in the package.json when other tools can. I have a hard
time telling if Jest should support that feature or not, but I've spent
enough time fighting with that to decide that I should leave it as-is
for now.
@hmhealey hmhealey added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Jan 27, 2025
@hmhealey hmhealey changed the title Update to use the latest version of mattermost-redux Update to use the new version of mattermost-redux Jan 27, 2025
Copy link
Member

@lieut-data lieut-data left a comment

Choose a reason for hiding this comment

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

This looks great, @hmhealey! Thank you for the heavy lifting :)

cc @esarafianou, as this will resolve a number of the warning re: the old webapp dependency.

NOTICE.txt Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Propose either omitting the changes to this file and letting the automation submit a PR to do so, or explicitly running https://github.com/mattermost/notice-file-generator to effect all required changes. (If the files don't perfectly match that output, we'll get an automated PR clobbering these changes anyway.)

@esarafianou
Copy link
Contributor

cc. @esarafianou, as this will resolve a number of the warning re: the old webapp dependency.

This is awesome! 😍

Copy link
Member

@calebroseland calebroseland left a comment

Choose a reason for hiding this comment

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

Awesome! A few lines possibly slipped find-replace, but aside from that this is looking great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants