Skip to content
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

Merged
merged 10 commits into from
May 5, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ const Page = {
ConfigProvision: Symbol('config'),
};

const formatDialogTitle = (current) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change current here to isEditing: boolean

Copy link
Member

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.

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,
Expand All @@ -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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after making the type of formatDialogTitle boolean, change this to formatDialogTitle(!!current)

Copy link
Member

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.


useEffect(() => {
const ty = types.find((t) => t.name === current?.item.type);
Expand Down Expand Up @@ -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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment L70

Copy link
Member

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.

};
PluginAPI.publish.getTokenFromCache = () => {
return {
Expand Down Expand Up @@ -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
Expand Down
17 changes: 7 additions & 10 deletions Composer/packages/server/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
"action_unfocused_18a2800e": {
"message": "Action unfocused"
},
"actions_are_the_main_component_of_a_trigger_they_a_767485a9": {
"message": "Actions are the main component of a trigger, they are what enable your bot to take action whether in response to user input or any other event that may occur."
"actions_are_the_main_component_of_a_trigger_they_a_8e3af9b9": {
"message": "Actions are the main component of a trigger; they are what enable your bot to take action whether in response to user input or any other event that may occur."
},
"actions_copied_2821ab27": {
"message": "Actions copied"
Expand Down Expand Up @@ -1130,8 +1130,8 @@
"description_436c48d7": {
"message": "Description"
},
"development_resources_e5c7c3d5": {
"message": "Development Resources"
"development_resources_67364176": {
"message": "Development resources"
},
"diagnostic_description_msg_9ddd1be": {
"message": "Diagnostic Description { msg }"
Expand Down Expand Up @@ -2021,6 +2021,9 @@
"keys_must_be_unique_2028cef3": {
"message": "Keys must be unique"
},
"knowledge_base_31e6868e": {
"message": "Knowledge base"
},
"knowledge_base_name_7d83bbe4": {
"message": "Knowledge base name"
},
Expand Down Expand Up @@ -2765,9 +2768,6 @@
"project_readme_68f88d88": {
"message": "Project Readme"
},
"project_settings_42fe3f68": {
"message": "Project settings"
},
"prompt_configurations_ab47cd3f": {
"message": "Prompt Configurations"
},
Expand Down Expand Up @@ -3293,9 +3293,6 @@
"select_your_azure_directory_then_choose_the_subscr_7034a3c0": {
"message": "Select your Azure directory, then choose the subscription where you’d like your new { service } resource."
},
"select_your_azure_directory_then_choose_the_subscr_7034a3c0": {
"message": "Select your Azure directory, then choose the subscription where you’d like your new { service } resource."
},
"select_your_azure_directory_then_choose_the_subscr_d51f6201": {
"message": "Select your Azure directory, then choose the subscription where your existing { service } resource is located."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ export const AzureProvisionDialog: React.FC = () => {
} --createLuisResource=${createLuisResource} --createLuisAuthoringResource=${createLuisAuthoringResource} --createCosmosDb=${createCosmosDb} --createStorage=${createStorage} --createAppInsights=${createAppInsights} --createQnAResource=${createQnAResource}`;

const instructions = formatMessage(
'I am creating a conversational experience using Microsoft Bot Framework project. For my project to work,' +
'Azure resources, including app registration, hosting, channels, Language Understanding, and QnA Maker,' +
'are required. Below are the steps to create these resources.' +
'I am creating a conversational experience using Microsoft Bot Framework project. ' +
'For my project to work, Azure resources, including app registration, hosting, channels, Language Understanding, and QnA Maker, are required.' +
'Below are the steps to create these resources.\n\n' +
'1. Follow the instructions at the link below to run the provisioning command (seen below)\n' +
'2. Copy and paste the resulting JSON and securely share it with me.\n\n' +
'Provisoning Command:\n' +
Expand Down