Skip to content

Commit f8773bb

Browse files
JacobCoffeeclaude
andcommitted
fix malformed track names in schedule list title
Stop appending "s" to the track name for display — it was creating "Ais", "Securitys", "Lightning-talkss". The "s" suffix is only needed for slug matching, not the page title. The trackName pipe handles proper display formatting. Resolves: PYMOBIL-71 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0308c8b commit f8773bb

4 files changed

Lines changed: 60 additions & 16 deletions

File tree

src/app/pages/schedule-list/schedule-list.page.html

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,19 @@
44
<ion-menu-button [color]="liveUpdateService.needsUpdate ? 'primary' : 'medium'"></ion-menu-button>
55
<ion-badge *ngIf="liveUpdateService.needsUpdate" size=sm>1</ion-badge>
66
</ion-buttons>
7-
<ion-title *ngIf="!ios && !showSearchbar">{{trackName | trackName}}</ion-title>
8-
<ion-searchbar #search *ngIf="showSearchbar" [debounce]="250" showCancelButton="always" [(ngModel)]="sessionQueryText" (ionClear)="resetSessions()" (ionCancel)="resetSessions()" (ionChange)="searchSessions()" (ionCancel)="showSearchbar = false" placeholder="Search"></ion-searchbar>
9-
<ion-buttons slot="end">
10-
<ion-button *ngIf="!ios && !showSearchbar" (click)="showSearchbar = true && focusButton()">
11-
<ion-icon slot="icon-only" name="search"></ion-icon>
12-
</ion-button>
7+
<ion-title *ngIf="!showSearchbar" class="track-title">
8+
{{trackName | trackName : 'plural'}}
9+
</ion-title>
10+
<ion-buttons *ngIf="(trackName | lowercase) === 'ai' || (trackName | lowercase) === 'security'" slot="end">
11+
<span class="track-badge new-badge toolbar-new-badge">New track!</span>
1312
</ion-buttons>
1413
</ion-toolbar>
1514
</ion-header>
1615

1716
<ion-content fullscreen="true">
18-
<ion-header collapse="condense">
19-
<ion-toolbar>
20-
<ion-title size="large">{{trackName | trackName}}</ion-title>
21-
</ion-toolbar>
22-
23-
<ion-toolbar>
24-
<ion-searchbar [(ngModel)]="sessionQueryText" [debounce]="250" (ionClear)="resetSessions()" (ionCancel)="resetSessions()" (ionChange)="searchSessions()" placeholder="Search"></ion-searchbar>
25-
</ion-toolbar>
26-
</ion-header>
17+
<ion-toolbar class="search-toolbar">
18+
<ion-searchbar [(ngModel)]="sessionQueryText" [debounce]="250" (ionClear)="resetSessions()" (ionCancel)="resetSessions()" (ionChange)="searchSessions()" placeholder="Search"></ion-searchbar>
19+
</ion-toolbar>
2720

2821
<!-- Regular sessions display -->
2922
<ion-grid *ngIf="!isOpenSpaceView">

src/app/pages/schedule-list/schedule-list.page.scss

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
::ng-deep ion-title.track-title {
2+
font-size: 0.95rem;
3+
4+
.title-default {
5+
white-space: normal !important;
6+
overflow: visible !important;
7+
text-overflow: unset !important;
8+
}
9+
10+
div {
11+
white-space: normal !important;
12+
overflow: visible !important;
13+
text-overflow: unset !important;
14+
}
15+
}
16+
17+
.search-toolbar {
18+
--background: transparent;
19+
--border-width: 0;
20+
padding: 0 8px 4px;
21+
}
22+
23+
.search-toolbar ion-searchbar {
24+
--border-radius: 10px;
25+
--box-shadow: none;
26+
--background: var(--ion-color-step-50, #f2f2f2);
27+
font-size: 0.9rem;
28+
padding: 0;
29+
height: 36px;
30+
}
31+
32+
.toolbar-new-badge {
33+
font-size: 0.75rem;
34+
margin-right: 12px;
35+
}
36+
137
.session-card {
238
width: 100%;
339
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);

src/app/pages/schedule-list/schedule-list.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class ScheduleListPage implements OnInit {
146146
if (slugify(trackNameToCompare + (typeof track === 'string' ? '' : 's')) !== this.trackSlug) {
147147
this.excludeTracks.push(trackNameToCompare);
148148
} else {
149-
this.trackName = trackNameToCompare + (typeof track === 'string' ? '' : 's');
149+
this.trackName = trackNameToCompare;
150150
}
151151
})
152152
if (slug !== 'open-spaces') {

src/app/pipes/track-name.pipe.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ const TRACK_DISPLAY_NAMES: Record<string, string> = {
55
'Lightning-talks': 'Lightning Talks',
66
};
77

8+
const TRACK_PLURAL_NAMES: Record<string, string> = {
9+
'Ai': 'Future of AI with Python',
10+
'Security': 'Trailblazing Python Security',
11+
'Talk': 'Talks',
12+
'Keynote': 'Keynotes',
13+
'Tutorial': 'Tutorials',
14+
'Charla': 'Charlas',
15+
'Poster': 'Posters',
16+
'Lightning-talks': 'Lightning Talks',
17+
'Plenary': 'Plenaries',
18+
'Break': 'Breaks',
19+
'Sponsor Presentation': 'Sponsor Presentations',
20+
};
21+
822
const TRACK_LONG_NAMES: Record<string, string> = {
923
'Ai': 'The Future of AI with Python',
1024
'Security': 'Trailblazing Python Security',
@@ -17,6 +31,7 @@ export class TrackNamePipe implements PipeTransform {
1731
transform(value: string, format: string = 'short'): string {
1832
if (!value) return value;
1933
if (format === 'long' && TRACK_LONG_NAMES[value]) return TRACK_LONG_NAMES[value];
34+
if (format === 'plural' && TRACK_PLURAL_NAMES[value]) return TRACK_PLURAL_NAMES[value];
2035
if (TRACK_DISPLAY_NAMES[value]) return TRACK_DISPLAY_NAMES[value];
2136
return value.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
2237
}

0 commit comments

Comments
 (0)