Page MenuHomePhabricator

[web] Turn `ThreadSettingsModal` into functional component
ClosedPublic

Authored by atul on Apr 24 2022, 12:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 1:39 PM
Unknown Object (File)
Thu, Dec 19, 1:39 PM
Unknown Object (File)
Thu, Dec 19, 1:39 PM
Unknown Object (File)
Thu, Dec 19, 1:39 PM
Unknown Object (File)
Thu, Dec 19, 1:39 PM
Unknown Object (File)
Thu, Dec 19, 1:39 PM
Unknown Object (File)
Thu, Dec 19, 1:36 PM
Unknown Object (File)
Wed, Dec 11, 8:21 PM

Details

Summary

This diff completely removes the remnants of the ThreadSettingsModal class component. Specifically, this diff lifts the render() function of the class component to the return value of the outer functional component.

Now that we've turned ThreadSettingsModal into a functional component, we're going to continue the refactor by pushing "tab-specific" state/functionality to the ThreadSettings[General/Privacy/Delete]Tab child components (which are also now functional components)


Depends on D3822

Test Plan
  1. Open ThreadSettingsModal
  2. Click around, make some changes, hit save
  3. Make sure that everything continues to look/behave as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

(As of this diff, we've trimmed ThreadSettingsModal from being ~850 lines before refactor => 409 lines... will be even smaller after pushing down state/functionality to the child "tab" components)

atul retitled this revision from [web] Turn `ThreadSettingsModal` into ` functional component to [web] Turn `ThreadSettingsModal` into functional component.Apr 24 2022, 12:57 PM
atul requested review of this revision.Apr 24 2022, 12:59 PM
In D3825#106086, @atul wrote:

(As of this diff, we've trimmed ThreadSettingsModal from being ~850 lines before refactor => 409 lines... will be even smaller after pushing down state/functionality to the child "tab" components)

Nice!

This revision is now accepted and ready to land.Apr 26 2022, 8:09 AM