- Notifications
You must be signed in to change notification settings - Fork928
chore: align active version terminology and link to docs#14639
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -10,11 +10,25 @@ import type { PublishVersionData } from "pages/TemplateVersionEditorPage/types"; | ||
import type { FC } from "react"; | ||
import { getFormHelpers } from "utils/formUtils"; | ||
import * as Yup from "yup"; | ||
import { | ||
HelpTooltip, | ||
HelpTooltipContent, | ||
HelpTooltipLink, | ||
HelpTooltipLinksGroup, | ||
HelpTooltipText, | ||
HelpTooltipTitle, | ||
HelpTooltipTrigger, | ||
} from "../../components/HelpTooltip/HelpTooltip"; | ||
import { docs } from "../../utils/docs"; | ||
export const Language = { | ||
versionNameLabel: "Version name", | ||
messagePlaceholder: "Write a short message about the changes you made...", | ||
defaultCheckboxLabel: "Promote to active version", | ||
activeVersionHelpTitle: "Active versions", | ||
activeVersionHelpText: | ||
"Templates can enforce that the active version be used for all workspaces (enterprise-only)", | ||
dannykopping marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
activeVersionHelpBody: "Review the documentation", | ||
}; | ||
export type PublishTemplateVersionDialogProps = DialogProps & { | ||
@@ -88,22 +102,46 @@ export const PublishTemplateVersionDialog: FC< | ||
rows={5} | ||
/> | ||
<Stack direction={"row"}> | ||
<FormControlLabel | ||
label={Language.defaultCheckboxLabel} | ||
control={ | ||
<Checkbox | ||
size="small" | ||
checked={form.values.isActiveVersion} | ||
onChange={async (e) => { | ||
await form.setFieldValue( | ||
"isActiveVersion", | ||
e.target.checked, | ||
); | ||
}} | ||
name="isActiveVersion" | ||
/> | ||
} | ||
/> | ||
<HelpTooltip> | ||
<HelpTooltipTrigger /> | ||
<HelpTooltipContent> | ||
<HelpTooltipTitle> | ||
{Language.activeVersionHelpTitle} | ||
</HelpTooltipTitle> | ||
<HelpTooltipText> | ||
{Language.activeVersionHelpText} | ||
</HelpTooltipText> | ||
<HelpTooltipLinksGroup> | ||
<HelpTooltipLink | ||
href={docs( | ||
"/templates/general-settings#require-automatic-updates-enterprise", | ||
)} | ||
> | ||
{Language.activeVersionHelpBody} | ||
</HelpTooltipLink> | ||
</HelpTooltipLinksGroup> | ||
</HelpTooltipContent> | ||
</HelpTooltip> | ||
</Stack> | ||
</FormFields> | ||
</Stack> | ||
</form> | ||
Uh oh!
There was an error while loading.Please reload this page.