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)
Sat, Oct 26, 8:17 PM
Unknown Object (File)
Sat, Oct 26, 8:17 PM
Unknown Object (File)
Oct 4 2024, 7:41 PM
Unknown Object (File)
Oct 4 2024, 7:41 PM
Unknown Object (File)
Oct 4 2024, 7:41 PM
Unknown Object (File)
Oct 4 2024, 7:38 PM
Unknown Object (File)
Sep 28 2024, 3:32 PM
Unknown Object (File)
Sep 20 2024, 2:23 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.