Refactor docs space and fix space settings node overlap

This commit is contained in:
Brenden Harrell committed 2021-09-13 22:11:21 -05:00
1 parent ec582c45bc
commit a93925e520
12 files changed
+118 -30

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@@ -0,0 +1,33 @@
{
"type": "Docs Space Settings",
"level": 4,
"propertyNameAtParent": "docsSpaceSettings",
"attachingRules": {
"compatibleTypes": "Docs Space->"
},
"editors": {
"config": true
},
"initialValues": {
"config": "{\"indexContent\": true \n }"
},
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity"
}
],
"addLeftIcons": true
}
@@ -0,0 +1,33 @@
{
"type": "Docs Space Style",
"level": 4,
"propertyNameAtParent": "docsSpaceStyle",
"attachingRules": {
"compatibleTypes": "Docs Space->"
},
"editors": {
"config": true
},
"initialValues": {
"config": "{\"backgroundColor\":\"UI_COLOR.BLACK\",\"node\":{\"fontSize\":16,\"imageSize\":60,\"type\":{\"fontColor\":\"UI_COLOR.WHITE\"},\"name\":{\"fontColor\":\"UI_COLOR.WHITE\"},\"menuItem\":{\"backgroundColor\":\"UI_COLOR.BLACK\",\"fontColor\":\"UI_COLOR.WHITE\",\"fontSize\":14,\"imageSize\":14}}}"
},
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity"
}
],
"addLeftIcons": true
}
@@ -32,15 +32,15 @@
"level": 0, "level": 0,
"childrenNodesProperties": [ "childrenNodesProperties": [
{ {
"name": "spaceStyle", "name": "docsSpaceStyle",
"type": "node", "type": "node",
"childType": "Space Style", "childType": "Docs Space Style",
"autoAdd": true "autoAdd": true
}, },
{ {
"name": "spaceSettings", "name": "docsSpaceSettings",
"type": "node", "type": "node",
"childType": "Space Settings", "childType": "Docs Space Settings",
"autoAdd": true "autoAdd": true
} }
] ]
@@ -0,0 +1,18 @@
{
"type": "Docs Space Settings",
"definition": {
"text": "This node allows the user to determine how the docs space will be loaded by the current workspace.",
"updated": 1631587592724
},
"paragraphs": [
{
"style": "Subtitle",
"text": "Properties",
"updated": 1631587516173
},
{
"style": "List",
"text": "indexContent defines whether the contents of the docs space will be indexed for searching upon loading the workspace. If false docs space will be disabled allowing faster load times for development."
}
]
}
@@ -0,0 +1,13 @@
{
"type": "Docs Space Style",
"definition": {
"text": "This node is currently a place holder that will eventually allow users to adjust the visual apperance of the docs space.",
"updated": 1631589004055
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and select the pencil button to enter edit mode."
}
]
}
@@ -23,8 +23,8 @@ function newFoundationsDocsSearchEngine() {
*/ */
let docsSpaceNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Docs Space') let docsSpaceNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Docs Space')
if (docsSpaceNode !== undefined) { if (docsSpaceNode !== undefined) {
if (docsSpaceNode.spaceSettings !== undefined) { if (docsSpaceNode.docsSpaceSettings !== undefined) {
let indexContent = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.spaceSettings.payload, 'indexContent') let indexContent = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.docsSpaceSettings.payload, 'indexContent')
if (indexContent === false) { if (indexContent === false) {
callbackFunction() callbackFunction()
return return
@@ -9,7 +9,7 @@
"config": true "config": true
}, },
"initialValues": { "initialValues": {
"config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false,\"shortcuts\":{\"toggleMapMode\":\"M\",\"toggleDrawRelationshipLines\":\"R\",\"toggleDrawParentLines\":\"C\",\"saveWorkspace\":\"S\",\"adjustAspectRatio\":\"A\"}, \"indexContent\": true \n }" "config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false,\"shortcuts\":{\"toggleMapMode\":\"M\",\"toggleDrawRelationshipLines\":\"R\",\"toggleDrawParentLines\":\"C\",\"saveWorkspace\":\"S\",\"adjustAspectRatio\":\"A\"} \n }"
}, },
"menuItems": [ "menuItems": [
{ {
@@ -13,12 +13,6 @@
"relatedUiObject": "Design Space", "relatedUiObject": "Design Space",
"actionFunction": "payload.executeAction" "actionFunction": "payload.executeAction"
}, },
{
"action": "Add UI Object",
"label": "Add Docs Space",
"relatedUiObject": "Docs Space",
"actionFunction": "payload.executeAction"
},
{ {
"action": "Delete UI Object", "action": "Delete UI Object",
"askConfirmation": true, "askConfirmation": true,
@@ -20,13 +20,8 @@
}, },
{ {
"style": "List", "style": "List",
"text": "physics determines whether the environment is static (false) or dynamic (true). When physics is set to true, nodes in the design space are affected by th gravitational pull and repulsion of other nodes.", "text": "\"physics\" determines whether the environment is static (false) or dynamic (true). When physics is set to true, nodes in the design space are affected by th gravitational pull and repulsion of other nodes.",
"updated": 1631554248476 "updated": 1631588883144
},
{
"style": "List",
"text": "indexContent defines whether the contents of the docs space will be indexed for searching upon loading the workspace. If false docs space will be disabled allowing faster load times for development.",
"updated": 1631554443380
}, },
{ {
"style": "List", "style": "List",
@@ -38,31 +33,33 @@
}, },
{ {
"style": "List", "style": "List",
"text": "node refers to every node in the design space." "text": "\"node\" here refers to every node in the design space. This collection of properties adjusts the settings of all nodes in the design space.",
"updated": 1631588871268
}, },
{ {
"style": "List", "style": "List",
"text": "distancePercentage", "text": "distancePercentage adjusts the baseline distance between nodes.",
"updated": 1631554058045 "updated": 1631588124341
}, },
{ {
"style": "List", "style": "List",
"text": "radiusPercentage is the radius of the circular nodes'menu applied as a percentage of an arbitrary default radius." "text": "radiusPercentage is the radius of the circular nodes' menu applied as a percentage of an arbitrary default radius. A higher value will lead to a larger node menu.",
"updated": 1631588202567
}, },
{ {
"style": "List", "style": "List",
"text": "massPercentage is the refernce mass of nodes that affect the attraction and repulsion of the environment's pysics whe the physics setting is set to true.", "text": "massPercentage is the reference mass of nodes that affects the attraction and repulsion of the environment's physics when the physics setting is set to true.",
"updated": 1609863964761 "updated": 1631588798797
}, },
{ {
"style": "List", "style": "List",
"text": "animationSteps", "text": "animationSteps adjusts the amount of steps the animation takes to open a node menu upon hovering over it. A higher value leads to smoother transtion.",
"updated": 1631554296700 "updated": 1631588728860
}, },
{ {
"style": "List", "style": "List",
"text": "menuItem refers to the items on the right-hand side of nodes'menus and has the following three properties.", "text": "menuItem refers to the items on the right-hand side of a node's menus and has the following three properties.",
"updated": 1631554154211 "updated": 1631588761551
}, },
{ {
"style": "List", "style": "List",