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 @@ -43,6 +43,6 @@ describe('Publish Target', () => {
act(() => {
fireEvent.click(addNewPublishProfile);
});
expect(getByText('Add new publishing profile')).toBeInTheDocument();
expect(getByText('Create a publishing profile')).toBeInTheDocument();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ 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.'
),
};
};

export const PublishProfileDialog: React.FC<PublishProfileDialogProps> = (props) => {
const {
current,
Expand All @@ -54,14 +65,10 @@ export const PublishProfileDialog: React.FC<PublishProfileDialogProps> = (props)
const [page, setPage] = useState(Page.ProfileForm);
const [publishSurfaceStyles, setStyles] = useState(defaultPublishSurface);
const { provisionToTarget, addNotification } = useRecoilValue(dispatcherState);

const [dialogTitle, setTitle] = useState({
title: current ? formatMessage('Edit publishing profile') : formatMessage('Add new publishing profile'),
subText: formatMessage('A publishing profile provides the secure connectivity required to publish your bot. '),
});

const [selectedType, setSelectType] = useState<PublishType | undefined>();

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);
setSelectType(ty);
Expand Down Expand Up @@ -89,10 +96,7 @@ export const PublishProfileDialog: React.FC<PublishProfileDialogProps> = (props)
PluginAPI.publish.closeDialog = closeDialog;
PluginAPI.publish.onBack = () => {
setPage(Page.ProfileForm);
setTitle({
title: current ? formatMessage('Edit publishing profile') : formatMessage('Add new publishing profile'),
subText: formatMessage('A publishing profile provides the secure connectivity required to publish your bot. '),
});
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
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ export const ProvisionHandoff = (props: ProvisionHandoffProps) => {
</div>
)}
<div>
<Text style={{ fontSize: FontSizes.size14, fontWeight: 600 }}>
{formatMessage('Instructions for your Azure admin')}
</Text>
<Text style={{ fontSize: FontSizes.size14, fontWeight: 600 }}>{formatMessage('Instructions')}</Text>
<IconButton
ariaLabel={formatMessage('Copy Icon')}
menuIconProps={{ iconName: 'Copy' }}
Expand Down
27 changes: 12 additions & 15 deletions Composer/packages/server/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
"a_publishing_profile_provides_the_secure_connectiv_860d7d48": {
"message": "A publishing profile provides the secure connectivity required to publish your bot."
},
"a_publishing_profile_provides_the_secure_connectiv_e203980e": {
"message": "A publishing profile provides the secure connectivity required to publish your bot. "
},
"a_schema_or_form_is_the_list_of_properties_your_bo_8e107996": {
"message": "A schema, or form, is the list of properties your bot will collect."
},
Expand Down Expand Up @@ -98,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 @@ -221,9 +218,6 @@
"add_new_propertyname_bedf7dc6": {
"message": "Add new { propertyName }"
},
"add_new_publishing_profile_95980909": {
"message": "Add new publishing profile"
},
"add_new_question_85612b7f": {
"message": "Add new question"
},
Expand Down Expand Up @@ -1136,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 @@ -1943,8 +1937,8 @@
"install_the_update_and_restart_composer_fac30a61": {
"message": "Install the update and restart Composer."
},
"instructions_for_your_azure_admin_aa780628": {
"message": "Instructions for your Azure admin"
"instructions_2f88ee72": {
"message": "Instructions"
},
"integer_7f378275": {
"message": "integer"
Expand Down Expand Up @@ -2027,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 @@ -2771,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 @@ -3836,6 +3830,9 @@
"to_run_this_bot_composer_needs_net_core_sdk_d1551038": {
"message": "To run this bot, Composer needs .NET Core SDK."
},
"to_test_run_and_publish_your_bot_it_needs_azure_re_e33d8fd": {
"message": "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."
},
"to_understand_natural_language_input_and_direct_th_fc982d4a": {
"message": "To understand natural language input and direct the conversation flow, your bot needs a language understanding service. "
},
Expand Down
42 changes: 27 additions & 15 deletions extensions/azurePublish/src/components/ChooseProvisionAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ const CreateActionContent = () => {
<Summary>
<Text>
{formatMessage(
'Select this option when you want to provision new Azure resources and publish a bot. A subscription to '
'Select this option when you want to provision new Azure resources and publish a bot. A subscription to'
)}
</Text>
&nbsp;
<LearnMoreLink href="https://aka.ms/azureSignUpPage" target="_blank">
{formatMessage('Microsoft Azure')}
</LearnMoreLink>
<Text>{formatMessage(' is required. ')}</Text>
&nbsp;
<Text>{formatMessage('is required.')}</Text>
&nbsp;
<LearnMoreLink href="https://aka.ms/composer-publish-bot#create-new-azure-resources" target="_blank">
{formatMessage('Learn more')}
</LearnMoreLink>
Expand All @@ -100,40 +103,49 @@ const CreateActionContent = () => {
<Instruction>
<InstructionTitle>{formatMessage('Step 2')}</InstructionTitle>
<InstructionDetails>
<Text>
{formatMessage(
'Select tenant and subscription, enter resource group name and resource name, and select region.'
)}
</Text>
<Text>{formatMessage('Select Azure subscription and resource group name')}</Text>
</InstructionDetails>
</Instruction>
<Instruction>
<InstructionTitle>{formatMessage('Step 3')}</InstructionTitle>
<InstructionDetails>
<Text>
{formatMessage(
'Review and create new resources. Once provisioned these resources will be available in your Azure portal.'
)}
</Text>
<Text>{formatMessage('Select and name your new resources')}</Text>
</InstructionDetails>
</Instruction>
<Instruction>
<InstructionTitle>{formatMessage('Step 4')}</InstructionTitle>
<InstructionDetails>
<Text>{formatMessage('Review and confirm resources to be created')}</Text>
</InstructionDetails>
</Instruction>
</Details>
<Summary>
<Text>{formatMessage('Once provisioned, your new resources will be available in the Azure portal.')}</Text>
&nbsp;
<LearnMoreLink href="https://aka.ms/composer-publish-bot#create-new-azure-resources" target="_blank">
{formatMessage('Learn More')}
</LearnMoreLink>
</Summary>
</Content>
);
};

const ImportActionContent = () => {
return (
<Content>
<Title>{formatMessage('Import existing resources')}</Title>
<Title>{formatMessage('Use existing resources')}</Title>
<Summary>
<p>
<Text>{formatMessage('Select this option to import existing Azure resources and publish a bot.')}</Text>
<Text>
{formatMessage(
'Select this option if you have access to existing Azure resources and their associated values.'
)}
</Text>
</p>
<p>
<Text>
{formatMessage(
'Edit the JSON file in the Publish Configuration field. You will need to find the values of associated resources in your Azure portal. A list of required and optional resources may include:'
'Copy and paste the JSON file containing the values of your existing Azure resources, from the Azure portal. This file includes values for some or all of the following:'
GeoffCoxMSFT marked this conversation as resolved.
Show resolved Hide resolved
)}
</Text>
</p>
Expand Down
13 changes: 7 additions & 6 deletions extensions/azurePublish/src/components/azureProvisionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ const DialogTitle = {
),
},
REVIEW: {
title: formatMessage('Review & create'),
title: formatMessage('Review resources to be created'),
subText: formatMessage(
'Please review the resources that will be created for your bot. Once these resources are provisioned, they will be available in your Azure portal.'
'The following resources will be created and provisioned for your bot. Once provisioned, they will be available in the Azure portal.'
),
},
CONFIG_RESOURCES: {
Expand Down Expand Up @@ -376,8 +376,9 @@ export const AzureProvisionDialog: React.FC = () => {
} --createLuisResource=${createLuisResource} --createLuisAuthoringResource=${createLuisAuthoringResource} --createCosmosDb=${createCosmosDb} --createStorage=${createStorage} --createAppInsights=${createAppInsights} --createQnAResource=${createQnAResource}`;

const instructions = formatMessage(
'I am working on a Microsoft Bot Framework project, and I now require some Azure resources to be created.' +
' Please follow the instructions below to create these resources and provide them to me.\n\n' +
'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 Expand Up @@ -1315,12 +1316,12 @@ export const AzureProvisionDialog: React.FC = () => {
<Fragment>
<ProvisionHandoff
developerInstructions={formatMessage(
'Copy and share the following information with your Azure admin to provision resources on your behalf.'
'If Azure resources and subscription are managed by others, use the following information to request creation of the resources that you need to build and run your bot.'
)}
handoffInstructions={handoffInstructions}
hidden={!showHandoff}
learnMoreLink="https://aka.ms/how-to-complete-provision-handoff"
title={formatMessage('Share resource request')}
title={formatMessage('Generate instructions for Azure administrator')}
onBack={() => {
setShowHandoff(false);
}}
Expand Down
9 changes: 4 additions & 5 deletions extensions/azurePublish/src/node/resourceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const AzureResourceDefinitions = {
},
[AzureResourceTypes.BOT_REGISTRATION]: {
description:
'Your own Bot hosted where you want, registered with the Azure Bot Service. Build, connect, and manage Bots to interact with your users wherever they are - from your app or website to Cortana, Skype, Messenger and many other services.',
'When registered with the Azure Bot Service, you can host your bot in any environment and enable customers from a variety of channels, such as your app or website, Direct Line Speech, Microsoft Teams and more.',
text: 'Microsoft Bot Channels Registration',
tier: 'F0',
group: hostingGroupName,
Expand Down Expand Up @@ -58,8 +58,7 @@ export const AzureResourceDefinitions = {
key: AzureResourceTypes.COSMOSDB,
},
[AzureResourceTypes.APPINSIGHTS]: {
description:
'Application performance, availability and usage information at your fingertips. Used for Bot chatting data analyzing.',
description: 'Application Insights allows you to monitor and analyze usage and performance of your bot.',
text: 'Application Insights',
tier: 'Pay as you go',
group: hostingGroupName,
Expand All @@ -83,15 +82,15 @@ export const AzureResourceDefinitions = {
},
[AzureResourceTypes.BLOBSTORAGE]: {
description:
'Microsoft Azure provides scalable, durable cloud storage, backup, and recovery solutions for any data, big or small. Used for bot transcripts logging.',
'Azure blob storage provides scalable cloud storage, backup and recovery solutions for any data, including bot transcript logs.',
text: 'Azure Blob Storage',
tier: 'Standard_LRS',
group: hostingGroupName,
key: AzureResourceTypes.BLOBSTORAGE,
},
[AzureResourceTypes.QNA]: {
description:
'QnA Maker is a cloud-based API service that lets you create a conversational question-and-answer layer over your existing data. Use it to build a knowledge base by extracting questions and answers from your content, including FAQs, manuals, and documents. ',
'QnA Maker is a cloud-based API service that lets you create a conversational question-and-answer layer over your existing data. Use it to build a knowledge base by extracting questions and answers from your content, including FAQs, manuals, and documents.',
text: 'Microsoft QnA Maker',
tier: 'S0 Standard',
group: cognitiveServicesGroupName,
Expand Down
2 changes: 1 addition & 1 deletion extensions/pvaPublish/src/components/pvaDialog.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import { PVADialog } from './pvaDialog';
it('should render', async () => {
render(<PVADialog />);

expect(screen.getByText('Publish your bot assets from Composer directly into Power Virtual Agents.')).toBeTruthy();
expect(screen.getByText('Publish directly from Bot Framework Composer to Power Virtual Agents.')).toBeTruthy();
});
2 changes: 1 addition & 1 deletion extensions/pvaPublish/src/components/pvaDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export const PVADialog: FC = () => {
</p>
<Separator styles={{ root: { width: '50%' } }} />
<p style={{ textAlign: 'center', fontWeight: 500 }}>
{formatMessage('Publish your bot assets from Composer directly into Power Virtual Agents.')}
{formatMessage('Publish directly from Bot Framework Composer to Power Virtual Agents.')}
</p>
<i
style={{
Expand Down
2 changes: 1 addition & 1 deletion extensions/pvaPublish/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function initialize(registration: IExtensionRegistration) {
setLogger(registration.log);
const extension = {
name: 'pva-publish-composer',
description: 'Publish bot to Power Virtual Agents',
description: 'Publish to Microsoft Power Virtual Agents',
bundleId: 'publish',
getHistory: history,
getStatus,
Expand Down