Page MenuHomePhabricator

[web] Rename `inputDisabled` to `threadSettingsOperationInProgress` in `ThreadSettingsTab`s
ClosedPublic

Authored by abosh on May 23 2022, 11:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 12:41 AM
Unknown Object (File)
Wed, Jun 26, 4:55 PM
Unknown Object (File)
Tue, Jun 25, 10:11 AM
Unknown Object (File)
Fri, Jun 21, 10:10 AM
Unknown Object (File)
Wed, Jun 19, 1:49 AM
Unknown Object (File)
Tue, Jun 11, 6:14 PM
Unknown Object (File)
Fri, Jun 7, 7:46 AM
Unknown Object (File)
May 27 2024, 11:51 AM

Details

Summary

Renamed inputDisabled prop/variable in ThreadSettingsGeneralTab, ThreadSettingsPrivacyTab, ThreadSettingsDeleteTab, and ThreadSettingsModal to threadSettingsOperationInProgress. This is because the inputDisabled prop is determined by

  1. Determining if there is a change in progress
  2. Checking the current tab and determining if the current thread has that tab's permissions

Thus, if inputDisabled is true, a thread settings operation is in progress or the current thread does not have the current tab's permissions. So inputDisabled is renamed to more accurately reflect the cases in which it is true.

Test Plan

Used find-and-replace to rename all instances of inputDisabled in ThreadSettings tabs and modal. Also opened each tab to make sure everything looked as expected.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

abosh edited the test plan for this revision. (Show Details)
abosh added 1 blocking reviewer(s): atul.

Accepting, but please address feedback about removing inputDisabled in ThreadSettingsModal. Let me know if I'm missing something, it's been a few weeks since we discussed this issue.

web/modals/threads/settings/thread-settings-modal.react.js
113–114 ↗(On Diff #13015)

I think the intention was to remove this altogether and pass changeInProgress as the value for the threadSettingsOperationInProgress prop in the child components.

We don't need to include the !hasPermissionForTab check anymore.

This revision is now accepted and ready to land.Jun 17 2022, 12:31 PM
web/modals/threads/settings/thread-settings-modal.react.js
113–114 ↗(On Diff #13015)

Yup, you're absolutely right. The !hasPermissionForTab check was resolved in D4073 and isn't needed anymore. As an added plus, this renaming makes much more sense semantically if changeInProgress is the only thing that determines threadSettingsOperationInProgress's value, since they are similarly named.

Had a git issue, final commit is here.