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)
Tue, Sep 10, 9:21 PM
Unknown Object (File)
Mon, Sep 2, 10:19 PM
Unknown Object (File)
Sun, Sep 1, 5:37 AM
Unknown Object (File)
Tue, Aug 27, 11:59 PM
Unknown Object (File)
Sun, Aug 25, 11:23 AM
Unknown Object (File)
Sun, Aug 18, 3:26 PM
Unknown Object (File)
Aug 13 2024, 10:50 PM
Unknown Object (File)
Aug 13 2024, 10:50 PM

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.