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)
Fri, Nov 15, 6:09 AM
Unknown Object (File)
Thu, Nov 14, 9:04 AM
Unknown Object (File)
Sat, Nov 9, 11:24 AM
Unknown Object (File)
Fri, Nov 8, 10:43 PM
Unknown Object (File)
Thu, Nov 7, 8:01 PM
Unknown Object (File)
Thu, Nov 7, 7:49 PM
Unknown Object (File)
Thu, Nov 7, 7:36 PM
Unknown Object (File)
Thu, Nov 7, 7:33 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
Branch
clean (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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