-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MM-20577 - Migrate 'components/admin_console/system_user_detail/team_list' module and associated tests to TypeScript #4747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just a few changes :)
i18n/en.json
Outdated
@@ -1533,12 +1533,6 @@ | |||
"admin.systemUserDetail.teamList.header.name": "Name", | |||
"admin.systemUserDetail.teamList.header.role": "Role", | |||
"admin.systemUserDetail.teamList.header.type": "Type", | |||
"admin.systemUserDetail.teamList.teamRole.admin": "Team Admin", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These translations shouldn't be removed, team_row.tsx
is still using them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i wanted to ask about this, leaving those makes the i18n-check
fail, so i ran make i18n-extract
and it removed that, so it honestly got a bit confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, looks like our i18n-extract
script isn't taking into account .tsx
files...that's a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what should be the next line of action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make a fix to the tool and we'll go from there. Sorry for the delay!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ikeohachidi The fix should be in now. I've merged master into your branch for you, so all you need to do is pull in the latest changes, revert the en.json
file and run make i18n-extract
and things should be working.
components/admin_console/system_user_detail/team_list/team_list_dropdown.tsx
Outdated
Show resolved
Hide resolved
@devinbinnie can you please list down the list of screens affected because of this migration. We will test those screens and ensure nothing is broken because of this change. |
/update-branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devinbinnie can you please list down the list of screens affected because of this migration. We will test those screens and ensure nothing is broken because of this change.
@srkgupta On an Enterprise build, go to System Console > User Management > Users and click on any user to open their page. The Team Membership component of that screen is whats being converted here.
} | ||
|
||
export default class TeamRow extends React.Component<Props, {}> { | ||
private renderTeamType = (team: {[x: string]: string}): JSX.Element => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devinbinnie sorry to bother you, but i just came upon something. Removing the return type from this function doesn't cause the deleting problem from running make i18n-extract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's odd, not sure why that is. Is it working now with the updated mmjstool
regardless of the return type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it isn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay go ahead and remove the return type then. It shouldn't be needed anyway since it can be inferred.
We'll have to look into what i18n-extract
is doing with respect to typescript files.
Thanks for investigating :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm done with it
This reverts commit b38c5e3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ikeohachidi! This looks great :)
@ikeohachidi Conflicting files |
@srkgupta i've done it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the changes locally and there were no issues found in the Team Membership section of User Configuration page. Approving the PR. New Testcases not required.
@sudheerDev please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…list' module and associated tests to TypeScript (mattermost#4747) * migrate from javascript to typescript * migrate snapshot to typescript * fix types * just ran i18n extract * change return type * Revert "just ran i18n extract" This reverts commit b38c5e3. * remove function return type Co-authored-by: mattermod <[email protected]>
Summary
Migrate 'components/admin_console/system_user_detail/team_list' module and associated tests to TypeScript
Ticket Link
mattermost/mattermost#13495
https://mattermost.atlassian.net/browse/MM-20577