Skip to content

Commit 022c55e

Browse files
committed
refactor: . rename various variables to hiddenClasses
1 parent e65c232 commit 022c55e

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

src/Layout/LayoutHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
export function generateHiddenClassForTaskList(taskListHiddenClasses: string[], hide: boolean, component: string) {
1+
export function generateHiddenClassForTaskList(hiddenClasses: string[], hide: boolean, component: string) {
22
if (hide) {
3-
taskListHiddenClasses.push(hiddenComponentClassName(component));
3+
hiddenClasses.push(hiddenComponentClassName(component));
44
}
55
}
66

src/Layout/QueryLayout.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class QueryLayout {
1717
}
1818

1919
public getHiddenClasses() {
20-
const taskListHiddenClasses: string[] = [];
20+
const hiddenClasses: string[] = [];
2121
const componentsToGenerateClassesOnly: [boolean, string][] = [
2222
// The following components are handled in QueryRenderer.ts and thus are not part of the same flow that
2323
// hides TaskLayoutComponent items. However, we still want to have 'tasks-layout-hide' items for them
@@ -30,11 +30,11 @@ export class QueryLayout {
3030
[this.queryLayoutOptions.hidePostponeButton, 'postpone-button'],
3131
];
3232
for (const [hide, component] of componentsToGenerateClassesOnly) {
33-
generateHiddenClassForTaskList(taskListHiddenClasses, hide, component);
33+
generateHiddenClassForTaskList(hiddenClasses, hide, component);
3434
}
3535

36-
if (this.queryLayoutOptions.shortMode) taskListHiddenClasses.push('tasks-layout-short-mode');
36+
if (this.queryLayoutOptions.shortMode) hiddenClasses.push('tasks-layout-short-mode');
3737

38-
return taskListHiddenClasses;
38+
return hiddenClasses;
3939
}
4040
}

src/Layout/TaskLayout.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,14 @@ export class TaskLayout {
1616
}
1717
}
1818
public generateHiddenClasses() {
19-
const taskListHiddenClasses: string[] = [];
19+
const hiddenClasses: string[] = [];
2020
this.taskLayoutOptions.toggleableComponents.forEach((component) => {
21-
generateHiddenClassForTaskList(
22-
taskListHiddenClasses,
23-
!this.taskLayoutOptions.isShown(component),
24-
component,
25-
);
21+
generateHiddenClassForTaskList(hiddenClasses, !this.taskLayoutOptions.isShown(component), component);
2622
});
2723

2824
// Tags are hidden, rather than removed. See tasks-layout-hide-tags in styles.css.
29-
generateHiddenClassForTaskList(taskListHiddenClasses, !this.taskLayoutOptions.areTagsShown(), 'tags');
25+
generateHiddenClassForTaskList(hiddenClasses, !this.taskLayoutOptions.areTagsShown(), 'tags');
3026

31-
return taskListHiddenClasses;
27+
return hiddenClasses;
3228
}
3329
}

0 commit comments

Comments
 (0)