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)
Tue, Nov 5, 4:56 AM
Unknown Object (File)
Sun, Nov 3, 1:27 PM
Unknown Object (File)
Sun, Nov 3, 1:27 PM
Unknown Object (File)
Wed, Oct 23, 11:58 AM
Unknown Object (File)
Wed, Oct 23, 3:36 AM
Unknown Object (File)
Wed, Oct 23, 3:23 AM
Unknown Object (File)
Wed, Oct 23, 3:00 AM
Unknown Object (File)
Thu, Oct 10, 2:31 AM

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