Skip to content

Pass items endpoint data into item model [DR-3855]#453

Merged
sarangj merged 1 commit into
qafrom
item_detail
Sep 8, 2025
Merged

Pass items endpoint data into item model [DR-3855]#453
sarangj merged 1 commit into
qafrom
item_detail

Conversation

@sarangj

@sarangj sarangj commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

Ticket:

This PR does the following:

We want to fully remove these manifest fetches, but in order to do so, I'll need to add more data to the existing items endpoint. In the meantime, get the ball rolling by using the items endpoint where I can and adding an interface to make the data types clearer.

This also uses the new endpoint for all the fields we plan on removing from the manifest, so this will unblock that work

Open questions

How has this been tested? How should a reviewer test this?

Updated existing jest tests + clicked around

Accessibility concerns or updates

Checklist:

  • I have added relevant accessibility documentation for this pull request.
  • All new and existing tests passed.
  • I have updated the CHANGELOG.md.

@vercel

vercel Bot commented Sep 4, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
digital-collections Ready Ready Preview Comment Sep 8, 2025 1:58pm

We want to fully remove these manifest fetches, but in order to do so,
I'll need to add more data to the existing items endpoint. In the
meantime, get the ball rolling by using the items endpoint where I can
and adding an interface to make the data types clearer.
orderInSequence: number;
}

export interface APIItem {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice

}

static async getItemData(uuid: string) {
static async getItemData(uuid: string): Promise<APIItem> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

like it ... just wondering if we're SURE we have ALL the fields we need in the ApiItem interface

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we don't yet! The page is still getting hydrated with both this and the manifest, this PR was just preliminary to split up some of the work. Once https://github.com/NYPL/collections-api/pull/243, I'll add a followup to this PR to completely cut out the manifest calls.

@emu47

emu47 commented Sep 8, 2025

Copy link
Copy Markdown
Member

I was able to click around a lot without any apparent issues. Not the most confident at understanding all the implications, but it looks good to me.

@sarangj sarangj merged commit e4afab8 into qa Sep 8, 2025
5 checks passed
@sarangj sarangj deleted the item_detail branch September 8, 2025 19:28
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.

2 participants