-
Notifications
You must be signed in to change notification settings - Fork 369
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
feat: Update Composer logic to leverage the uiSchema when initializing the IntellisenseField. #4263
Conversation
@@ -35,13 +33,7 @@ export const getRowProps = (rowProps: FormRowProps, field: string) => { | |||
const { required = [] } = schema; | |||
const fieldSchema = resolvePropSchema(schema, field, definitions); | |||
|
|||
const intellisenseScopes: string[] = []; | |||
if (field === 'property') { | |||
intellisenseScopes.push('variable-scopes'); |
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.
I see the logic is deleted from FormRow, but where is it added in IntellisenseField? I only see the use of projectId in IntellisenseField.tsx.
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.
Hi @GeoffCoxMSFT, I made sure that Intellisense can consume the data from the uiSchema in the 1st Intellisense PR.
This is what uiOptions.properties?.[field]
does.
I only needed the hardcoding as a temporary thing until the data was in the schema.
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.
One thing to be aware of is that users with old ui schemas will not get this behavior. Maybe we keep the hardcoded path for now, but prefer the UI Schema options if they are set?
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.
Is the uiSchema not bundled with the code? Aka won't users with the latest app version not also have the latest uiSchema? I would rather avoid any hardcoding when we can. Any field with the "property" value will get one type of Intellisense, which might lead to unexpected behaviors if that value is used for a different purpose (aka not a variable setter) somewhere in the schema.
….com/microsoft/BotFramework-Composer into leugene/usingUISchemaForIntellisense
…g the IntellisenseField. (microsoft#4263) * using only ui schema for mappings * lint Co-authored-by: Geoff Cox (Microsoft) <gcox@microsoft.com>
Description
This is the 3rd and final step to make Composer leverage the uiSchema for Intellisense mappings between components and options (for example "Intellisense for Microsoft.DeleteProperty should show user variables").
Step 1 was modifying the schema of the uiSchema: microsoft/botframework-sdk#6047
Step 2 was updating the uiSchema of individual components: microsoft/botbuilder-dotnet#4704
This PR is removing the hardcoded mappings and injecting the projectId into IntellisenseTextField to make it work with user variables.
Task Item
fixes #4188
Screenshots