Page MenuHomePhabricator

[web] rename tabs to tabs legacy
ClosedPublic

Authored by ginsu on Jan 4 2024, 12:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 3, 1:00 PM
Unknown Object (File)
Thu, Oct 3, 1:00 PM
Unknown Object (File)
Thu, Oct 3, 1:00 PM
Unknown Object (File)
Thu, Oct 3, 1:00 PM
Unknown Object (File)
Sun, Sep 8, 1:23 AM
Unknown Object (File)
Aug 18 2024, 5:50 AM
Unknown Object (File)
Aug 9 2024, 7:42 PM
Unknown Object (File)
Aug 9 2024, 7:42 PM
Subscribers

Details

Summary

Rename diff.

In order to house the thread list in the panel component, we need to refactor the tabs component. At this moment the tabs component is made of two parts: the tabs and the tab content. The tabs component utilizes the React.Children.* API to interact with those child components. The React.Children.* API is listed as Legacy React API in the react docs and additionally for the redesign I need to decouple the tabs from the tab content to put the tabs in the panel header and the tab content in the panel body.

In order to make this refactor easy to review, I broke this down into many steps. The first step is to rename this file and the imports to "tabs legacy" and then in a subsequent diff I will introduce a new tabs component which will utilize an alternate solution outlined in the react docs: https://react.dev/reference/react/Children#accepting-an-array-of-objects-as-a-prop

Afterwards I will update every tab use case to use the new tabs api

Depends on D10515

Test Plan

flow and ensured that all the tabs worked as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu added reviewers: atul, inka.
ginsu edited the summary of this revision. (Show Details)
ginsu requested review of this revision.Jan 4 2024, 12:51 AM

Seems reasonable


As an aside, would it make sense to also rename imports to be LegacyTabs? Doesn't really matter and will probably be removed altogether at the end of the stack anyways.

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

As an aside, would it make sense to also rename imports to be LegacyTabs? Doesn't really matter and will probably be removed altogether at the end of the stack anyways.

I deprecate and replace everything at the end of this stack so didn't feel like it was necessary to do that

This revision was automatically updated to reflect the committed changes.