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
F3197141: D3764.id11862.diff
Sat, Nov 9, 7:27 AM
F3197073: D3764.id11733.diff
Sat, Nov 9, 7:19 AM
Unknown Object (File)
Thu, Nov 7, 7:07 PM
Unknown Object (File)
Tue, Nov 5, 5:07 AM
Unknown Object (File)
Mon, Oct 28, 2:33 AM
Unknown Object (File)
Oct 10 2024, 3:24 AM
Unknown Object (File)
Oct 10 2024, 3:24 AM
Unknown Object (File)
Oct 10 2024, 3:24 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
Branch
master
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 ↗(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.