Page MenuHomePhabricator

[web] Remove usage of `setTab` and replace with `setCurrentTabType`
ClosedPublic

Authored by atul on Apr 18 2022, 2:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 26, 9:15 AM
Unknown Object (File)
Wed, Dec 25, 10:21 PM
Unknown Object (File)
Thu, Dec 5, 10:26 PM
Unknown Object (File)
Mon, Dec 2, 6:19 AM
Unknown Object (File)
Sat, Nov 30, 3:29 AM
Unknown Object (File)
Sat, Nov 30, 2:06 AM
Unknown Object (File)
Sat, Nov 30, 1:55 AM
Unknown Object (File)
Nov 27 2024, 12:40 AM

Details

Summary

Remove setTab since it's no longer necessary and replace usages with setCurrentTabType which does the exact same thing.

As part of the work to refactor ThreadSettingsModal... specifically to turn it into a functional component.


Depends on D3763

Test Plan
  1. Open ThreadSettingsModal
  2. Switch between tabs as before

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Apr 18 2022, 2:22 PM
tomek requested changes to this revision.Apr 21 2022, 3:01 AM
tomek added inline comments.
web/modals/threads/thread-settings-modal.react.js
449–451 ↗(On Diff #11645)

Why do we need this method? Can't we just use setCurrentTabType?

This revision now requires changes to proceed.Apr 21 2022, 3:01 AM
atul requested review of this revision.Apr 21 2022, 9:07 AM
atul added inline comments.
web/modals/threads/thread-settings-modal.react.js
449–451 ↗(On Diff #11645)

Ah yeah it's no longer necessary. It used to be a helper function that set the tab when the state was an object (bc class component), but now it's unnecessary. Will update this diff to just be about removing setTab and using setCurrentTabType in its place.

atul retitled this revision from [web] Move `setTab` up from `ThreadSettingsModal` to `ConnectedThreadSettingsModal` to [web] Remove usage of `setTab` and replace with `setCurrentTabType`.Apr 21 2022, 9:54 AM
atul edited the summary of this revision. (Show Details)

rebase (sequence after the already landed diffs)

This revision is now accepted and ready to land.Apr 25 2022, 6:39 AM
This revision was landed with ongoing or failed builds.Apr 25 2022, 6:45 AM
This revision was automatically updated to reflect the committed changes.