Skip to content

Commit

Permalink
Modify titles texts in preset editors #5215
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Jul 19, 2024
1 parent 55d70e4 commit 805cf42
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,14 @@ export class CreatorPresetEditablePropertyGridDefinition extends CreatorPresetEd
}
public createMainPageCore(): any {
return {
title: "Property Grid categories",
title: "Customize the Property Grid",
navigationTitle: "Property Grid",
elements: [
{
type: "dropdown",
name: this.nameSelector,
clearIfInvisible: "onHidden",
title: "Select element to setup a property grid for it"
title: "Select an element to customize its settings available in the Property Grid"
},
{
type: "panel",
Expand Down
7 changes: 4 additions & 3 deletions packages/creator-presets-core/src/presets-editable-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ export class CreatorPresetEditableTabs extends CreatorPresetEditableBase {
const namesChoicesVisibleIf = "{" + this.allItems + "} contains {item}";
return {
title: "Tabs customization",
navigationTitle: "Tabs",
elements: [
{ type: "panel", name: "tabs_main_panel",
description: "Configure tabs on the Creator page. Select the tabs you want to show. Set up their order, and choose the one that will be active by default at the beginning of work.",
description: "Select the tabs you want to show, reorder them, change their titles, and choose the tab that will be active by default.",
elements: [
{
type: "checkbox",
title: "Selected tabs",
title: "Available tabs",
minSelectedChoices: 1,
name: this.allItems
},
{
type: "presetranking",
name: this.nameItems,
choicesVisibleIf: namesChoicesVisibleIf,
title: "Tab's order and editing",
title: "Tab order and titles",
clearIfInvisible: "onHidden",
startWithNewLine: false
},
Expand Down
69 changes: 35 additions & 34 deletions packages/creator-presets-core/src/presets-editable-toolbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,18 @@ export class CreatorPresetEditableToolboxConfigurator extends CreatorPresetEdita

public createMainPageCore(): any {
return {
title: "Setup toolbox",
title: "Set Up the Toolbox",
navigationTitle: "Toolbox",
elements: [
{
type: "panel",
name: "panel_toolbox_definition",
description: "Create a new toolbox item, name it and select the icon. Also add the code that will be executed when this item is selected.",
elements: [
{
type: "matrixdynamic",
name: this.nameMatrix,
titleLocation: "hidden",
rowCount: 0,
addRowText: "Add New Item Defintion",
showHeader: false,
columns: [
{ cellType: "text", name: "name", placeholder: "Name", isUnique: true, isRequired: true },
{ cellType: "text", name: "iconName", placeholder: "Icon Name" },
{ cellType: "text", name: "title", placeholder: "Title" }
],
detailPanelMode: "underRow",
detailElements: [
{ type: "text", name: "tooltip", title: "Tooltip" },
{ type: "comment", name: "json", title: "JSON that will be used on clicking item", rows: 15 }
]
}
]
},
{
type: "panel",
name: "panel_toolbox_items",
description: "Select the items you want to see in the toolbox. Determine their order and group them into logical groups as needed.",
description: "Select the toolbox items you want to show, group them into categories, rename them, and change their order if required.",
elements: [
{
type: "boolean",
name: this.nameCategoriesMode,
title: "Use categories to group toolbox items",
title: "Enable grouping",
titleLocation: "hidden",
defaultValue: "categories",
valueTrue: "categories",
Expand All @@ -58,11 +34,11 @@ export class CreatorPresetEditableToolboxConfigurator extends CreatorPresetEdita
{
type: "boolean",
name: this.nameShowCategoryTitles,
title: "Show category titles",
defaultValue: false,
titleLocation: "hidden",
visibleIf: this.getTextVisibleIf(this.nameCategoriesMode, "categories"),
clearIfInvisible: "onHidden",
title: "Show Categories Titles",
startWithNewLine: false,
renderAs: "checkbox"
},
Expand All @@ -73,7 +49,7 @@ export class CreatorPresetEditableToolboxConfigurator extends CreatorPresetEdita
visibleIf: this.getTextVisibleIf(this.nameCategoriesMode, "categories"),
minRowCount: 1,
allowRowsDragAndDrop: true,
addRowText: "Add new Category",
addRowText: "Add new category",
showHeader: false,
columns: [
{ cellType: "text", name: "category", isUnique: true, isRequired: true },
Expand All @@ -88,8 +64,8 @@ export class CreatorPresetEditableToolboxConfigurator extends CreatorPresetEdita
selectToRankEnabled: true,
minSelectedChoices: 1,
selectToRankAreasLayout: "horizontal",
selectToRankEmptyRankedAreaText: "Drag toolbox items to hide them",
selectToRankEmptyUnrankedAreaText: "Drag toolbox items here"
selectToRankEmptyRankedAreaText: "Drag toolbox items here to hide them",
selectToRankEmptyUnrankedAreaText: " Drag toolbox items here to show them"
}
]
},
Expand All @@ -101,8 +77,33 @@ export class CreatorPresetEditableToolboxConfigurator extends CreatorPresetEdita
selectToRankEnabled: true,
minSelectedChoices: 1,
selectToRankAreasLayout: "horizontal",
selectToRankEmptyRankedAreaText: "Drag toolbox items to hide them",
selectToRankEmptyUnrankedAreaText: "Drag toolbox items here"
selectToRankEmptyRankedAreaText: "Drag toolbox items here to hide them",
selectToRankEmptyUnrankedAreaText: " Drag toolbox items here to show them"
}
]
},
{
type: "panel",
name: "panel_toolbox_definition",
description: "Create a new toolboitem or customize one of the predefined toolbox items.",
elements: [
{
type: "matrixdynamic",
name: this.nameMatrix,
titleLocation: "hidden",
rowCount: 0,
addRowText: "Add New Item Defintion",
showHeader: false,
columns: [
{ cellType: "text", name: "name", placeholder: "Name", isUnique: true, isRequired: true },
{ cellType: "text", name: "iconName", placeholder: "Icon name" },
{ cellType: "text", name: "title", placeholder: "Title" }
],
detailPanelMode: "underRow",
detailElements: [
{ type: "text", name: "tooltip", title: "Tooltip" },
{ type: "comment", name: "json", title: "JSON object to apply when users select this toolbox item", rows: 15 }
]
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions packages/creator-presets-core/src/presets-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export class CreatorPresetEditorModel extends Base implements ICreatorPresetEdit
this.locale = "en";
this.navigationBarValue = new ActionContainer();
this.addNavigationAction("preset", "Edit Preset");
this.addNavigationAction("creator", "Review Creator");
this.addNavigationAction("results", "Preset JSON");
this.addNavigationAction("creator", "Preview Survey Creator");
this.addNavigationAction("results", "View Preset JSON");
this.addLocaleDropdown();
this.activeTab = this.navigationBar.actions[0].id;
}
Expand Down

0 comments on commit 805cf42

Please sign in to comment.