Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(home view): use correct Quick Links data #6450

Merged
merged 2 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 37 additions & 18 deletions src/schema/v2/homeView/sections/QuickLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,55 @@ export const QuickLinks: HomeViewSection = {

const QUICK_LINKS: Array<NavigationPill> = [
{
title: "Follows",
href: "/favorites",
ownerType: OwnerType.follows,
icon: "FollowArtistIcon",
title: "Saves",
href: "/favorites/saves",
ownerType: OwnerType.saves,
icon: "HeartStrokeIcon",
},
{
title: "Auctions",
href: "/auctions",
ownerType: OwnerType.auctions,
icon: "AuctionIcon",
icon: "GavelIcon",
},
{
title: "Saves",
href: "/favorites/saves",
ownerType: OwnerType.saves,
icon: "HeartIcon",
title: "New This Week",
href: "/collection/new-this-week",
ownerType: OwnerType.collection, // TODO: collection id?
icon: undefined,
},
{
title: "Art under $1000",
href: "/collect?price_range=%2A-1000",
ownerType: OwnerType.collect,
title: "Editorial",
href: "/articles",
ownerType: OwnerType.articles,
icon: "PublicationIcon",
},
{
title: "Price Database",
href: "/price-database",
ownerType: OwnerType.priceDatabase,
title: "Statement Pieces",
href: "/collection/statement-pieces",
ownerType: OwnerType.collection, // TODO: collection id?
icon: undefined,
},

// TODO: enable once navigation is sorted out
// {
// title: "Medium",
// href: "/collections-by-category/Medium",
Comment on lines +49 to +52
Copy link
Member Author

Choose a reason for hiding this comment

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

This one is tough! I tried to build the correct href, but failed because of the unusual way in which we are routing from the home view to those screens. This will need some attention, but we can also merge here and follow up.

// ownerType: OwnerType.collectionsCategory, // TODO: category id?
// icon: "ArtworkIcon",
// },
{
title: "Editorial",
href: "/news",
ownerType: OwnerType.articles,
title: "Shows for You",
href: "/shows-for-you",
ownerType: OwnerType.shows, // TODO: use updated Cohesion type
icon: undefined,
},

// TODO: enable once eigen/11476 is merged
Copy link
Member

Choose a reason for hiding this comment

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

we might need at some point to support some versioning here - definitely not needed for now

Copy link
Member Author

Choose a reason for hiding this comment

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

@MounirDhahri yeah that's a good point, worth some discussion.

// {
// title: "Featured Fairs",
// href: "/featured-fairs",
// ownerType: OwnerType.fairs, // TODO: use updated Cohesion type
// icon: "FairIcon",
// },
]
38 changes: 19 additions & 19 deletions src/schema/v2/homeView/sections/__tests__/QuickLinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,40 @@ describe("QuickLinks", () => {
"internalID": "home-view-section-quick-links",
"navigationPills": [
{
"href": "/favorites",
"icon": "FollowArtistIcon",
"ownerType": "follows",
"title": "Follows",
"href": "/favorites/saves",
"icon": "HeartStrokeIcon",
"ownerType": "saves",
"title": "Saves",
},
{
"href": "/auctions",
"icon": "AuctionIcon",
"icon": "GavelIcon",
"ownerType": "auctions",
"title": "Auctions",
},
{
"href": "/favorites/saves",
"icon": "HeartIcon",
"ownerType": "saves",
"title": "Saves",
"href": "/collection/new-this-week",
"icon": null,
"ownerType": "collection",
"title": "New This Week",
},
{
"href": "/collect?price_range=%2A-1000",
"icon": null,
"ownerType": "collect",
"title": "Art under $1000",
"href": "/articles",
"icon": "PublicationIcon",
"ownerType": "articles",
"title": "Editorial",
},
{
"href": "/price-database",
"href": "/collection/statement-pieces",
"icon": null,
"ownerType": "priceDatabase",
"title": "Price Database",
"ownerType": "collection",
"title": "Statement Pieces",
},
{
"href": "/news",
"href": "/shows-for-you",
"icon": null,
"ownerType": "articles",
"title": "Editorial",
"ownerType": "shows",
"title": "Shows for You",
},
],
"ownerType": "quickLinks",
Expand Down