Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-39768 Rename ToggleModalButtonRedux to ToggleModalButton #9887

Merged
merged 5 commits into from
Mar 3, 2022

Conversation

hmhealey
Copy link
Member

This is getting rid of the last instance of the original ToggleModalButton in favour of the redux-connected version, and then it renames the redux-connected version to replace the original one.

Ticket Link

https://mattermost.atlassian.net/browse/MM-39876

Release Note

NONE

@hmhealey hmhealey added 2: Dev Review Requires review by a core commiter QA Deferred Agreement with QA that these changes will be tested post-merge labels Feb 24, 2022
@hmhealey
Copy link
Member Author

/e2e-tests

@hanzei
Copy link
Contributor

hanzei commented Feb 25, 2022

@hmhealey I don't think I'm the right person to review webapp refactoring code. Would you please request a review from someone else?

@hanzei hanzei removed their request for review February 25, 2022 08:29
Copy link
Contributor

@michelengelen michelengelen left a comment

Choose a reason for hiding this comment

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

LGTM ... question: is there a plan to port this over to typescript and FC as well?

@hmhealey
Copy link
Member Author

Lol, I was figuring you'd ask that. I actually started to do it, but I ran into issues with the types of dialogType and dialogProps in TypeScript. We'd need to do something like typing the component as ToggleModalButton<T> where T is the given dialogue's props similar to how the openModal action is typed, but that causes issues in certain use cases, so I didn't think it was worth the effort to do right now.

@michelengelen
Copy link
Contributor

... I ran into issues with the types of dialogType and dialogProps in TypeScript. ...

I know what you mean. I encountered the same problem once and circumvented it somehow I cannot remember.

@hmhealey
Copy link
Member Author

@hmhealey I don't think I'm the right person to review webapp refactoring code. Would you please request a review from someone else?

Yep, I'll reassign it

... I ran into issues with the types of dialogType and dialogProps in TypeScript. ...

I know what you mean. I encountered the same problem once and circumvented it somehow I cannot remember.

Realistically, we could also just getting rid of the component eventually. Even if it was converted to a functional component, it's a lot of lines just to add an openModal call to a button that's in a component that's probably already redux-connected anyway

@hmhealey hmhealey requested a review from pvev February 28, 2022 15:43
Copy link
Contributor

@pvev pvev left a comment

Choose a reason for hiding this comment

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

LGTM!

@michelengelen
Copy link
Contributor

... I ran into issues with the types of dialogType and dialogProps in TypeScript. ...

I know what you mean. I encountered the same problem once and circumvented it somehow I cannot remember.

Realistically, we could also just getting rid of the component eventually. Even if it was converted to a functional component, it's a lot of lines just to add an openModal call to a button that's in a component that's probably already redux-connected anyway

Yes, absolutely ... at the end of the day it only fires up a function on click anyways, so I would say the same ... just provide a simple/stupid button that has a click handler built in ... that should do the trick.

@hmhealey hmhealey added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Mar 3, 2022
@hmhealey hmhealey merged commit 9a621ec into master Mar 3, 2022
@hmhealey hmhealey deleted the MM-39768_toggle-modal-button branch March 3, 2022 17:18
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Mar 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation QA Deferred Agreement with QA that these changes will be tested post-merge release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants