Skip to content

Commit

Permalink
Naming improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMDoerner committed Dec 12, 2024
1 parent f1722b4 commit 60a5312
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 class="text-center mb-3">Wiki Overview</h1>
[borderColorVar]="option.color"
[isActive]="option.active"
[isSelectable]="true"
(entryClick)="toggleSidebarEntry(option, $event)"
(entryClick)="toggleCategory(option, $event)"
></app-selectable-entry>
}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/campaign/pages/graph-page/graph-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class GraphPageComponent {
.subscribe((linkIdToDelete) => this.onDeleteLink(linkIdToDelete));
}

toggleSidebarEntry(option: SidebarOption, mode: 'INACTIVE' | 'ACTIVE') {
toggleCategory(option: SidebarOption, mode: 'INACTIVE' | 'ACTIVE') {
const newActiveEntries = new Set(this.activeCategories());
switch (mode) {
case 'INACTIVE':
Expand Down
4 changes: 2 additions & 2 deletions src/design/molecules/_models/search-preferences.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface SidebarOption {
export interface CategoryOption {
label: string;
active: boolean;
color: string;
Expand All @@ -17,4 +17,4 @@ export const DEFAULT_SEARCH_PREFERENCES = [
{ label: 'SessionAudio', active: false, color: '--sessionaudio-color' },
{ label: 'Rules', active: false, color: '--rules-color' },
{ label: 'Spell', active: false, color: '--spell-color' },
] as const satisfies SidebarOption[];
] as const satisfies CategoryOption[];
2 changes: 1 addition & 1 deletion src/design/molecules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export { BadgeListEntry, BadgeListSelectOptions } from './_models/badge-list';
export { ListEntry } from './_models/list';
export {
DEFAULT_SEARCH_PREFERENCES,
SidebarOption,
CategoryOption as SidebarOption,
} from './_models/search-preferences';
export { ToggleState } from './_models/toggle';
export { ArticleFooterComponent } from './article-footer/article-footer.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from '@angular/core';
import { SelectableEntryComponent } from '../../atoms/selectable-entry/selectable-entry.component';
import {
CategoryOption,
DEFAULT_SEARCH_PREFERENCES,
SidebarOption,
} from '../_models/search-preferences';

@Component({
Expand All @@ -21,10 +21,10 @@ import {
})
export class SidebarLegendComponent {
interactable = input(false);
sidebarEntries = input<SidebarOption[]>(DEFAULT_SEARCH_PREFERENCES);
sidebarEntries = input<CategoryOption[]>(DEFAULT_SEARCH_PREFERENCES);

@Output() sidebarChange: EventEmitter<SidebarOption[]> = new EventEmitter<
SidebarOption[]
@Output() sidebarChange: EventEmitter<CategoryOption[]> = new EventEmitter<
CategoryOption[]
>();

constructor() {}
Expand Down

0 comments on commit 60a5312

Please sign in to comment.