Skip to content

Exhibit page#2209

Merged
axdanbol merged 19 commits intocns-websitefrom
exhibit-page
Apr 3, 2026
Merged

Exhibit page#2209
axdanbol merged 19 commits intocns-websitefrom
exhibit-page

Conversation

@edlu77
Copy link
Copy Markdown
Contributor

@edlu77 edlu77 commented Mar 30, 2026

@edlu77 edlu77 requested review from LibbyUX and axdanbol March 30, 2026 23:10
@edlu77 edlu77 self-assigned this Mar 30, 2026
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 30, 2026

View your CI Pipeline Execution ↗ for commit b8120cd

Command Status Duration Result
nx affected --targets=lint,test,compodoc --conf... ✅ Succeeded 3m 22s View ↗
nx affected --target=build,build-webcomponent,b... ✅ Succeeded 4m 49s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-03 18:25:45 UTC

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

🚀 Preview Deploy Report

✅ Successfully deployed preview here

@bherr2
Copy link
Copy Markdown
Member

bherr2 commented Mar 31, 2026

For venues, please try https://dev.scimaps.org (it's github pages underneath) instead of https://scimaps.org. I'll have to have rob enable CORS for the main scimaps.org site.

Copy link
Copy Markdown
Contributor

@LibbyUX LibbyUX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you @edlu77 !


@for (item of content(); track $index) {
<ng-container *hraContentTemplateOutlet="item" />
@if (item['tagline'] === 'Venues and events') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove! You need to turn the venues table into a content template component like everything else and have it specified in the data.yaml instead of special casing it like this.


/** header content data */
/** Venues data for the venues table */
readonly venues = input<VenueData>([]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

TableOfContentsLayoutModule,
NavigationModule,
FooterComponent,
VenuesTableComponent,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

package.json Outdated
"qs": "^6.15.0",
"rapidoc": "^9.3.8",
"rxjs": "^7.8.2",
"slugify": "^1.6.8",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove! Please don't add random packages

import { VenueData, VenueItem } from '../../schemas/venues.schema';

/** Base URL for Scimaps */
const BASE_URL = 'https://scimaps.org/';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass this as an input to the component

}
if (venue.venueImages) {
links.push(
`[Photo gallery](${[BASE_URL, 'venues/gallery', this.getSegmentedDate(venue.dateStart), this.toSlug(venue.title)].join('/')})`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor url building to a method

buildLinkUrl(path, date, title, extra) {
  const dateSegment = ...
  const titleSegment = ...
  return [
    this.linkBaseHref(),
    path,
    dateSegment,
    titleSegment,
    extra,
   ].filter(s => !!s).join('/);
}

private getSegmentedDate(date: Date): string {
const fullDate = new Date(date);
const year = fullDate.getUTCFullYear();
const day = ('0' + fullDate.getUTCDate()).slice(-2);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use String(date.getUTCDate()).padStart(2, '0')

const fullDate = new Date(date);
const year = fullDate.getUTCFullYear();
const day = ('0' + fullDate.getUTCDate()).slice(-2);
const month = ('0' + (fullDate.getUTCMonth() + 1)).slice(-2);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use String(date.getUTCMonth() + 1).padStart(2, '0')

* @returns URL-friendly slug generated from the input string
*/
private toSlug(str: string): string {
return slugify(str, { lower: true, strict: true });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at the SlugifyPipe implementation for slugifying things

readonly venues = input<VenueData>([]);

/** Columns for the venues table */
readonly columns = signal<TableColumn[]>([
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to put a constant inside a signal, just do readonly columns = [...] and in the template use [columns]="columns"

@axdanbol axdanbol merged commit 1be8c8a into cns-website Apr 3, 2026
1 check passed
@axdanbol axdanbol deleted the exhibit-page branch April 3, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants