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

Build collection page in catalog-next #4970

Open
1 task
FuhuXia opened this issue Nov 6, 2024 · 1 comment
Open
1 task

Build collection page in catalog-next #4970

FuhuXia opened this issue Nov 6, 2024 · 1 comment
Assignees
Labels
H2.0/Harvest-General General Harvesting 2.0 Issues

Comments

@FuhuXia
Copy link
Member

FuhuXia commented Nov 6, 2024

User Story

In order to list all datasets of the same isPartOf value, data.gov team wants have a collection page.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • GIVEN there are such three datasets from the same harvest source (id=my_sid)
    AND one dataset with identifier=my_pid, name=my_parent
    AND one dataset with identifier=my_cid1, name=my_child1, isPartOf=my_pid
    AND one dataset with identifier=my_cid2, name=my_child2, isPartOf=my_pid
    WHEN its collection page is loaded
    THEN datasets my_child1 and my_child2 are listed
    AND user can search within this collection.

Background

This can be done with Solr query using isPartOf and harvest_source_id as search terms, as in
https://catalog-next-dev-datagov.app.cloud.gov/dataset/?q=isPartOf:pid+AND+harvest_source_id:sid. But the resulted page has the search box prefilled with search terms that users do not understand, therefore users wont be able to perform their own search. We want a clean page starting with empty in the search box, and make it obvious that the current listing is a collection, same as how collection is represented in the current catalog.data.gov, such as this example.

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch

[Notes or a checklist reflecting our understanding of the selected approach]
Instead of using raw SOLR query as q=isPartOf:pid+AND+harvest_source_id:sid, we can add a new term collection_info=sid+pid, CKAN will grab the collection_info value and split it into harvest_source_id and isPartOf to be used in the python code to find all datasets that belong to the collection.

@FuhuXia
Copy link
Member Author

FuhuXia commented Nov 15, 2024

It turns out /dataset/?isPartOf=#&harvest_source_id=# is clean enough as in this sample page, just need to hide the two blocks inthe circle. Thanks to @jbrown-xentity.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H2.0/Harvest-General General Harvesting 2.0 Issues
Projects
Status: 🏗 In Progress [8]
Development

No branches or pull requests

2 participants