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)
Wed, Nov 27, 12:40 AM
Unknown Object (File)
Wed, Nov 13, 11:29 AM
Unknown Object (File)
Wed, Nov 13, 1:36 AM
Unknown Object (File)
Sun, Nov 10, 7:10 PM
Unknown Object (File)
Sat, Nov 9, 7:51 AM
Unknown Object (File)
Sat, Nov 9, 7:27 AM
Unknown Object (File)
Sat, Nov 9, 7:19 AM
Unknown Object (File)
Thu, Nov 7, 7:07 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
No Lint Coverage
Unit
No Test Coverage

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

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

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.