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)
Fri, Feb 21, 12:27 PM
Unknown Object (File)
Fri, Feb 14, 9:43 PM
Unknown Object (File)
Sun, Feb 2, 1:35 AM
Unknown Object (File)
Sun, Feb 2, 1:03 AM
Unknown Object (File)
Jan 27 2025, 8:16 PM
Unknown Object (File)
Jan 20 2025, 6:58 AM
Unknown Object (File)
Jan 18 2025, 2:35 AM
Unknown Object (File)
Jan 15 2025, 3:14 PM

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.