Page MenuHomePhabricator

[web] update thread settings modal to use the new tabs component
ClosedPublic

Authored by ginsu on Jan 4 2024, 1:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 18, 11:45 AM
Unknown Object (File)
Sun, Aug 18, 8:01 AM
Unknown Object (File)
Sun, Aug 18, 5:51 AM
Unknown Object (File)
Sun, Aug 18, 5:26 AM
Unknown Object (File)
Jul 5 2024, 10:25 AM
Unknown Object (File)
Jul 2 2024, 12:27 AM
Unknown Object (File)
Jun 30 2024, 5:17 PM
Unknown Object (File)
Jun 30 2024, 5:58 AM
Subscribers

Details

Summary

This diff updates the thread settings modal to use the new tab components. Since we decoupled the tabs from the tab content with this new tab component, the thread settings modal now needs to be responsible for rendering the correct tab content

Depends on D10521

Test Plan

Please see the demo video below to confirm that there are no regressions

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

web/modals/threads/settings/thread-settings-modal.react.js
140–176

Refactored this so instead of pushing Tab.Items based on certain conditions, we now instead push into tabsData and let our new tabs component figure out which tabs we should show.

ginsu requested review of this revision.Jan 4 2024, 1:35 AM

Looks good

web/modals/threads/settings/thread-settings-modal.react.js
258–268

Would be good to memoize this

This revision is now accepted and ready to land.Jan 4 2024, 1:20 PM

Looks like there might be a regression with the info icon not appearing correctly in the Delete tab:

8af95f.png (482×706 px, 46 KB)

It looks like this in my local environment:

968f99.png (480×824 px, 36 KB)

Can you please check this really quick before landing.

web/modals/threads/settings/thread-settings-modal.react.js
258–268

spoke offline with @atul but this entire component is wrapped in a React.memo

Looks like there might be a regression with the info icon not appearing correctly in the Delete tab:

Updated the diff to fix this

Screenshot 2024-01-05 at 3.52.22 PM.png (2×3 px, 896 KB)