Skip to content

Commit

Permalink
chore: simplify terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Dec 2, 2024
1 parent c5076da commit 55cc4e5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { getPropertyValue } from '../util/propertyUtil';

const LOWER_PRIORITY = 300;

const ALWAYS_DISPLAYED_GROUPS = [
const ALWAYS_VISIBLE_GROUPS = [
'general',
'documentation',
'multiInstance',
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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__')
);
});
Expand Down

0 comments on commit 55cc4e5

Please sign in to comment.