Added link to computed properties docs

This commit is contained in:
Chuck Skelton 2023-06-29 17:43:20 -07:00
parent dc1fa17974
commit 3e37a78ed1
2 changed files with 28 additions and 5 deletions

View File

@ -1,7 +1,4 @@
// CTODO: Render/edit CP in monaco import { FontIcon, Link, MessageBar, MessageBarType, Stack, Text } from "@fluentui/react";
// CTODO: Get CPs from RP
// CTODO: Save CPs to RP
import { MessageBar, MessageBarType, Stack } from "@fluentui/react";
import * as DataModels from "Contracts/DataModels"; import * as DataModels from "Contracts/DataModels";
import { titleAndInputStackProps, unsavedEditorWarningMessage } from "Explorer/Controls/Settings/SettingsRenderUtils"; import { titleAndInputStackProps, unsavedEditorWarningMessage } from "Explorer/Controls/Settings/SettingsRenderUtils";
import { isDirty } from "Explorer/Controls/Settings/SettingsUtils"; import { isDirty } from "Explorer/Controls/Settings/SettingsUtils";
@ -88,7 +85,7 @@ export class ComputedPropertiesComponent extends React.Component<
this.computedPropertiesEditor = monaco.editor.create(this.computedPropertiesDiv.current, { this.computedPropertiesEditor = monaco.editor.create(this.computedPropertiesDiv.current, {
value: value, value: value,
language: "json", language: "json",
ariaLabel: "Indexing Policy", ariaLabel: "Computed properties",
}); });
if (this.computedPropertiesEditor) { if (this.computedPropertiesEditor) {
const computedPropertiesEditorModel = this.computedPropertiesEditor.getModel(); const computedPropertiesEditorModel = this.computedPropertiesEditor.getModel();
@ -118,6 +115,12 @@ export class ComputedPropertiesComponent extends React.Component<
{unsavedEditorWarningMessage("computedProperties")} {unsavedEditorWarningMessage("computedProperties")}
</MessageBar> </MessageBar>
)} )}
<Text style={{ marginLeft: "30px", marginBottom: "10px" }}>
<Link target="_blank" href="https://aka.ms/computed-properties-preview/">
{"Learn more"} <FontIcon iconName="NavigateExternalInline" />
</Link>
&#160; about how to define computed properties and how to use them.
</Text>
<div className="settingsV2IndexingPolicyEditor" tabIndex={0} ref={this.computedPropertiesDiv}></div> <div className="settingsV2IndexingPolicyEditor" tabIndex={0} ref={this.computedPropertiesDiv}></div>
</Stack> </Stack>
); );

View File

@ -8,6 +8,26 @@ exports[`ComputedPropertiesComponent renders 1`] = `
} }
} }
> >
<Text
style={
Object {
"marginBottom": "10px",
"marginLeft": "30px",
}
}
>
<StyledLinkBase
href="https://aka.ms/computed-properties-preview/"
target="_blank"
>
Learn more
<FontIcon
iconName="NavigateExternalInline"
/>
</StyledLinkBase>
  about how to define computed properties and how to use them.
</Text>
<div <div
className="settingsV2IndexingPolicyEditor" className="settingsV2IndexingPolicyEditor"
tabIndex={0} tabIndex={0}