Skip to content

Commit d690be8

Browse files
Picowchewfacebook-github-bot
authored andcommitted
Rename setEditedCommitMessage to setEditedField
Summary: `setEditedCommitMessage` is renamed to `setEditedField` in the `CommitInfoTextArea` component, to be more clear. This is because `commit message` can otherwise mean `summary` or all diff authoring fields combined. In this case, only one diff authoring field is being referred to, and it is not necessarily `summary`. For example, the `test plan` field can be referred to. Reviewed By: evangrayk Differential Revision: D64000372 fbshipit-source-id: c453007d3057b036e4658e3ccf58afefe1623a85
1 parent d88d5de commit d690be8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

addons/isl/src/CommitInfoView/CommitInfoField.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function CommitInfoField({
5757
name={field.key}
5858
autoFocus={autofocus ?? false}
5959
editedMessage={editedFieldContent}
60-
setEditedCommitMessage={setEditedField}
60+
setEditedField={setEditedField}
6161
/>
6262
</Section>
6363
) : (
@@ -104,7 +104,7 @@ export function CommitInfoField({
104104
name={field.key}
105105
autoFocus={autofocus ?? false}
106106
editedMessage={editedFieldContent}
107-
setEditedCommitMessage={setEditedField}
107+
setEditedField={setEditedField}
108108
/>
109109
)}
110110
{extra}

addons/isl/src/CommitInfoView/TextArea.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ export function CommitInfoTextArea({
3232
name,
3333
autoFocus,
3434
editedMessage,
35-
setEditedCommitMessage,
35+
setEditedField,
3636
}: {
3737
kind: 'title' | 'textarea' | 'field';
3838
fieldConfig: FieldConfig;
3939
name: string;
4040
autoFocus: boolean;
4141
editedMessage: string;
42-
setEditedCommitMessage: (fieldValue: string) => unknown;
42+
setEditedField: (fieldValue: string) => unknown;
4343
}) {
4444
const ref = useRef<HTMLTextAreaElement>(null);
4545
useEffect(() => {
@@ -67,7 +67,7 @@ export function CommitInfoTextArea({
6767
process.env.NODE_ENV === 'test');
6868

6969
const onInput = (event: {currentTarget: HTMLTextAreaElement}) => {
70-
setEditedCommitMessage(event.currentTarget?.value);
70+
setEditedField(event.currentTarget?.value);
7171
};
7272

7373
const uploadFiles = useUploadFilesCallback(name, ref, onInput);

0 commit comments

Comments
 (0)