Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3365080
D4105.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D4105.diff
View Options
diff --git a/web/modals/threads/settings/thread-settings-delete-tab.react.js b/web/modals/threads/settings/thread-settings-delete-tab.react.js
--- a/web/modals/threads/settings/thread-settings-delete-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-delete-tab.react.js
@@ -20,7 +20,7 @@
import css from './thread-settings-delete-tab.css';
type ThreadSettingsDeleteTabProps = {
- +inputDisabled: boolean,
+ +threadSettingsOperationInProgress: boolean,
+threadInfo: ThreadInfo,
+setErrorMessage: SetState<string>,
};
@@ -28,7 +28,11 @@
function ThreadSettingsDeleteTab(
props: ThreadSettingsDeleteTabProps,
): React.Node {
- const { inputDisabled, threadInfo, setErrorMessage } = props;
+ const {
+ threadSettingsOperationInProgress,
+ threadInfo,
+ setErrorMessage,
+ } = props;
const modalContext = useModalContext();
const dispatchActionPromise = useDispatchActionPromise();
@@ -97,7 +101,7 @@
placeholder="Password"
value={accountPassword}
onChange={onChangeAccountPassword}
- disabled={inputDisabled}
+ disabled={threadSettingsOperationInProgress}
ref={accountPasswordInputRef}
/>
</div>
@@ -105,7 +109,7 @@
<Button
onClick={onDelete}
variant="danger"
- disabled={inputDisabled}
+ disabled={threadSettingsOperationInProgress}
className={css.delete_button}
>
Delete
diff --git a/web/modals/threads/settings/thread-settings-general-tab.react.js b/web/modals/threads/settings/thread-settings-general-tab.react.js
--- a/web/modals/threads/settings/thread-settings-general-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-general-tab.react.js
@@ -27,7 +27,7 @@
import css from './thread-settings-general-tab.css';
type ThreadSettingsGeneralTabProps = {
- +inputDisabled: boolean,
+ +threadSettingsOperationInProgress: boolean,
+threadInfo: ThreadInfo,
+threadNamePlaceholder: string,
+queuedChanges: ThreadChanges,
@@ -38,7 +38,7 @@
props: ThreadSettingsGeneralTabProps,
): React.Node {
const {
- inputDisabled,
+ threadSettingsOperationInProgress,
threadInfo,
threadNamePlaceholder,
queuedChanges,
@@ -54,7 +54,7 @@
React.useEffect(() => {
nameInputRef.current?.focus();
- }, [inputDisabled]);
+ }, [threadSettingsOperationInProgress]);
const changeQueued: boolean = React.useMemo(
() => Object.values(queuedChanges).some(v => v !== null && v !== undefined),
@@ -149,7 +149,9 @@
value={firstLine(queuedChanges.name ?? threadInfo.name)}
placeholder={threadNamePlaceholder}
onChange={onChangeName}
- disabled={inputDisabled || threadNameInputDisabled}
+ disabled={
+ threadSettingsOperationInProgress || threadNameInputDisabled
+ }
ref={nameInputRef}
/>
</div>
@@ -161,7 +163,7 @@
value={queuedChanges.description ?? threadInfo.description ?? ''}
placeholder="Thread description"
onChange={onChangeDescription}
- disabled={inputDisabled}
+ disabled={threadSettingsOperationInProgress}
rows={3}
/>
</div>
@@ -178,7 +180,7 @@
<Button
type="submit"
onClick={onSubmit}
- disabled={inputDisabled || !changeQueued}
+ disabled={threadSettingsOperationInProgress || !changeQueued}
className={css.save_button}
>
Save
diff --git a/web/modals/threads/settings/thread-settings-modal.react.js b/web/modals/threads/settings/thread-settings-modal.react.js
--- a/web/modals/threads/settings/thread-settings-modal.react.js
+++ b/web/modals/threads/settings/thread-settings-modal.react.js
@@ -117,7 +117,7 @@
<Tabs.Item id="general" header="General" key="general">
<div className={css.tab_body}>
<ThreadSettingsGeneralTab
- inputDisabled={inputDisabled}
+ threadSettingsOperationInProgress={inputDisabled}
threadInfo={threadInfo}
threadNamePlaceholder={namePlaceholder}
queuedChanges={queuedChanges}
@@ -143,7 +143,7 @@
<Tabs.Item id="privacy" header="Privacy" key="privacy">
<div className={css.tab_body}>
<ThreadSettingsPrivacyTab
- inputDisabled={inputDisabled}
+ threadSettingsOperationInProgress={inputDisabled}
threadInfo={threadInfo}
queuedChanges={queuedChanges}
setQueuedChanges={setQueuedChanges}
@@ -161,7 +161,7 @@
<Tabs.Item id="delete" header="Delete" key="delete">
<div className={css.tab_body}>
<ThreadSettingsDeleteTab
- inputDisabled={inputDisabled}
+ threadSettingsOperationInProgress={inputDisabled}
threadInfo={threadInfo}
setErrorMessage={setErrorMessage}
/>
diff --git a/web/modals/threads/settings/thread-settings-privacy-tab.react.js b/web/modals/threads/settings/thread-settings-privacy-tab.react.js
--- a/web/modals/threads/settings/thread-settings-privacy-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-privacy-tab.react.js
@@ -43,7 +43,7 @@
];
type ThreadSettingsPrivacyTabProps = {
- +inputDisabled: boolean,
+ +threadSettingsOperationInProgress: boolean,
+threadInfo: ThreadInfo,
+queuedChanges: ThreadChanges,
+setQueuedChanges: SetState<ThreadChanges>,
@@ -53,7 +53,7 @@
props: ThreadSettingsPrivacyTabProps,
): React.Node {
const {
- inputDisabled,
+ threadSettingsOperationInProgress,
threadInfo,
queuedChanges,
setQueuedChanges,
@@ -164,7 +164,7 @@
<Button
type="submit"
onClick={onSubmit}
- disabled={inputDisabled || !changeQueued}
+ disabled={threadSettingsOperationInProgress || !changeQueued}
className={css.save_button}
>
Save
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 6:28 AM (21 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583286
Default Alt Text
D4105.diff (5 KB)
Attached To
Mode
D4105: [web] Rename `inputDisabled` to `threadSettingsOperationInProgress` in `ThreadSettingsTab`s
Attached
Detach File
Event Timeline
Log In to Comment