From a6316a78952f7a6a2f41f4ed8412e6b1aa27d996 Mon Sep 17 00:00:00 2001 From: Philipp Fromme Date: Mon, 2 Dec 2024 11:03:06 +0100 Subject: [PATCH] chore: simplify terminology --- .../ElementTemplatesPropertiesProvider.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cloud-element-templates/properties-panel/ElementTemplatesPropertiesProvider.js b/src/cloud-element-templates/properties-panel/ElementTemplatesPropertiesProvider.js index 500ddf5..40f364c 100644 --- a/src/cloud-element-templates/properties-panel/ElementTemplatesPropertiesProvider.js +++ b/src/cloud-element-templates/properties-panel/ElementTemplatesPropertiesProvider.js @@ -15,7 +15,7 @@ import { getPropertyValue } from '../util/propertyUtil'; const LOWER_PRIORITY = 300; -const ALWAYS_DISPLAYED_GROUPS = [ +const ALWAYS_VISIBLE_GROUPS = [ 'general', 'documentation', 'multiInstance', @@ -75,7 +75,7 @@ export default class ElementTemplatesPropertiesProvider { // (3) apply entries visible if (getTemplateId(element)) { - groups = filterWithEntriesVisible(elementTemplate || {}, groups); + groups = getVisibleGroups(elementTemplate || {}, groups); } return groups; @@ -145,11 +145,11 @@ function addGroupsAfter(idOrIds, groups, groupsToAdd) { } } -function filterWithEntriesVisible(template, groups) { +function getVisibleGroups(template, groups) { if (!template.entriesVisible) { return groups.filter(group => { return ( - ALWAYS_DISPLAYED_GROUPS.includes(group.id) || + ALWAYS_VISIBLE_GROUPS.includes(group.id) || group.id.startsWith('ElementTemplates__') ); });