Page MenuHomePhabricator

[web] Introduce minimally viable `ThreadSettingsDeleteTab` component
ClosedPublic

Authored by atul on Apr 12 2022, 9:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 3:44 AM
Unknown Object (File)
Wed, Oct 9, 8:10 PM
Unknown Object (File)
Wed, Oct 9, 8:10 PM
Unknown Object (File)
Wed, Oct 9, 8:10 PM
Unknown Object (File)
Wed, Oct 9, 8:09 PM
Unknown Object (File)
Wed, Oct 9, 7:50 PM
Unknown Object (File)
Oct 6 2024, 8:26 AM
Unknown Object (File)
Oct 6 2024, 8:17 AM

Details

Summary

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

This diff does that for ThreadSettingsDeleteTab, 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 be able to turn ThreadSettingsModal into a functional component.. and refactor ThreadSettingsModal using @def-au1t's TabsContainer and TabsItem components.


Depends on D3717

Test Plan

This diff should be a noop. Did a close reading and I'm confident I didn't change any of the logic. Looks as expected:

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Apr 12 2022, 9:18 PM
tomek added inline comments.
web/modals/threads/thread-settings-delete-tab.css
1–43 ↗(On Diff #11378)

So this css is just copied and we're planning to update it soon, right?

web/modals/threads/thread-settings-delete-tab.react.js
11 ↗(On Diff #11378)
This revision is now accepted and ready to land.Apr 14 2022, 2:18 AM
web/modals/threads/thread-settings-delete-tab.css
1–43 ↗(On Diff #11378)

Yup! Just a straightforward copy/paste for now. There's a lot of room to improve things here once the "refactor" part of this work is done

web/modals/threads/thread-settings-delete-tab.react.js
11 ↗(On Diff #11378)

Sticking with what was already in thread-settings-modal.react.js for this diff, but yeah planning on using React.useRef() in subsequent diff once the bulk of the state/functionality has been "pushed down" from ThreadSettingsModal to this ThreadSettingsDeleteTab component

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