-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Update provision & publishing copy (#7583) #7642
Changes from 4 commits
265c677
e3f7eb9
043bcde
af8c664
b39c192
19ef557
9115a7c
8bab999
792a9a9
f908c95
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,16 @@ const Page = { | |
ConfigProvision: Symbol('config'), | ||
}; | ||
|
||
const formatDialogTitle = (current) => { | ||
return { | ||
title: current ? formatMessage('Edit publishing profile') : formatMessage('Create a publishing profile'), | ||
subText: formatMessage(`To test, run and publish your bot, it needs Azure resources such as app registration, | ||
hosting and channels. Other resources, such as language understanding and storage are optional. | ||
A publishing profile contains all of the information necessary to provision and publish your bot, | ||
including its Azure resources. `), | ||
GeoffCoxMSFT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
}; | ||
|
||
export const PublishProfileDialog: React.FC<PublishProfileDialogProps> = (props) => { | ||
const { | ||
current, | ||
|
@@ -56,7 +66,7 @@ export const PublishProfileDialog: React.FC<PublishProfileDialogProps> = (props) | |
const { provisionToTarget, addNotification } = useRecoilValue(dispatcherState); | ||
const [selectedType, setSelectType] = useState<PublishType | undefined>(); | ||
|
||
const [dialogTitle, setTitle] = useState(formatDialogTitle()); | ||
const [dialogTitle, setTitle] = useState(formatDialogTitle(current)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. after making the type of formatDialogTitle boolean, change this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will need to pick this up in a future PR. |
||
|
||
useEffect(() => { | ||
const ty = types.find((t) => t.name === current?.item.type); | ||
|
@@ -85,7 +95,7 @@ export const PublishProfileDialog: React.FC<PublishProfileDialogProps> = (props) | |
PluginAPI.publish.closeDialog = closeDialog; | ||
PluginAPI.publish.onBack = () => { | ||
setPage(Page.ProfileForm); | ||
setTitle(formatDialogTitle()); | ||
setTitle(formatDialogTitle(current)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment L70 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will need to pick this up in a future PR. |
||
}; | ||
PluginAPI.publish.getTokenFromCache = () => { | ||
return { | ||
|
@@ -124,16 +134,6 @@ export const PublishProfileDialog: React.FC<PublishProfileDialogProps> = (props) | |
} | ||
}, [current, projectId]); | ||
|
||
function formatDialogTitle() { | ||
return { | ||
title: current ? formatMessage('Edit publishing profile') : formatMessage('Create a publishing profile'), | ||
subText: formatMessage(`To test, run and publish your bot, it needs Azure resources such as app registration, | ||
hosting and channels. Other resources, such as language understanding and storage are optional. | ||
A publishing profile contains all of the information necessary to provision and publish your bot, | ||
including its Azure resources. `), | ||
}; | ||
} | ||
|
||
const savePublishTarget = useCallback( | ||
async (name: string, type: string, configuration: string) => { | ||
// check exist | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change
current
here toisEditing: boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to pick this up in a future PR.