Page MenuHomePhabricator

[web] Introduce minimally viable `ThreadSettingsGeneralTab` component
ClosedPublic

Authored by atul on Apr 12 2022, 7:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 10:40 AM
Unknown Object (File)
Sat, Oct 26, 1:39 AM
Unknown Object (File)
Oct 23 2024, 3:59 AM
Unknown Object (File)
Oct 22 2024, 10:00 PM
Unknown Object (File)
Oct 22 2024, 7:01 PM
Unknown Object (File)
Oct 22 2024, 5:14 PM
Unknown Object (File)
Oct 22 2024, 5:12 PM
Unknown Object (File)
Oct 22 2024, 5:01 PM

Details

Summary

In an effort to make ThreadSettingsModal easier to work with, we're pulling the general, privacy, and delete tabs out into their own separate components.

This diff does that for ThreadSettingsGeneralTab, but in a limited way. We're basically moving over the mainContent JSX markup and prop drilling the state that's still held by ThreadSettingsModal.

Once we've extracted the JSX markup for general, privacy, and delete.. and prop drilled as necessary to keep things working as they did before: we're going to push down the state and functionality into the smaller "tab" components so things are properly encapsulated.

And once that's done, we should easily be able to turn ThreadSettingsModal into a functional component.. and refactor ThreadSettingsModal using @def-au1t's TabsContainer and TabsItem components.

Test Plan

This diff should be a noop. I spent some time changing the thread title, description, and color--and things continue to look and work as expected:

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul edited the test plan for this revision. (Show Details)
atul requested review of this revision.Apr 12 2022, 7:26 PM
atul retitled this revision from [web] Introduce minimally viable `ThreadSettingsGeneralTab` to [web] Introduce minimally viable `ThreadSettingsGeneralTab` component.Apr 12 2022, 8:37 PM
tomek added inline comments.
web/modals/threads/thread-settings-general-tab.react.js
10–21 ↗(On Diff #11376)

I don't think we need to prepend thread to all of these props. Also, a couple of them sound a little strange e.g. threadColorCurrentColor.

This revision is now accepted and ready to land.Apr 14 2022, 2:01 AM
web/modals/threads/thread-settings-general-tab.react.js
10–21 ↗(On Diff #11376)

I agree that the prop names here are weird. This is supposed to be a temporary in-between (but functionally identical) state.. the props and their names will be cleaned up once state/functionality is pushed down to these "ThreadSettingsBlahTab` components

I grouped them based on the three pieces of state handled in this component to keep things straightforward (threadName*, threadDescription*, threadColor*)

This revision was landed with ongoing or failed builds.Apr 14 2022, 5:11 PM
This revision was automatically updated to reflect the committed changes.