Skip to content

fix(search): show report numbers and EP badge in search results - #890

Open
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-888-search-report-numbers
Open

fix(search): show report numbers and EP badge in search results#890
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-888-search-report-numbers

Conversation

@TahaKhan998

@TahaKhan998 TahaKhan998 commented Jul 31, 2026

Copy link
Copy Markdown

Closes #888. Registers the CDS search result description override for community search so report numbers, accelerators, and experiments appear there as on main search, shows EP approval numbers (apprn) as a blue badge in the results label row on both, and limits each of those meta lists to two items with an ellipsis when there are more.

Comment thread assets/js/components/search/overrides/CDSRecordsResultsListItemDescription.js Outdated
Comment thread assets/js/components/search/overrides/CDSRecordsResultsListItemDescription.js Outdated
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-888-search-report-numbers branch from 7632296 to 98cb4f6 Compare August 3, 2026 15:37
@TahaKhan998

Copy link
Copy Markdown
Author
image Added limits to each of those meta lists to two items with an ellipsis when there are more.

Comment thread assets/js/components/search/overrides/CDSRecordsResultsListItemDescription.js Outdated
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-888-search-report-numbers branch 2 times, most recently from f9081c6 to c4e032d Compare August 4, 2026 11:14
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-888-search-report-numbers branch 7 times, most recently from 66a6fba to 27ae4ce Compare August 5, 2026 14:56
</>
{(cdsReferenceId || accelerators.length > 0 || experiments.length > 0) && (
<Item.Meta
className={

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.

that seems quite complex.... wouldn't work to set a max-width and add the truncate-lines class to enable the ellpsis? @kpsherva ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I tried the max-width + truncate-lines approach on the combined meta line. With many accelerators, the ellipsis cuts off before experiments, so that field gets eaten entirely. I went back to giving each part 50% max-width when both are present, so they stay on the same line and both remain visible when truncated.

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.

I would prefer if we don't add custom CSS for something that was already addressed with truncate-lines in the past. We discussed to have one line for experiments + accelerators and separate line for report numbers. if you do for each truncate-lines-1, why doesn't it work?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I tried truncate-lines-1 on accelerators and experiments separately (same meta row). they no longer sit on one line and the | separator ends up alone on its own line.

So to keep them side by side we need the extra CSS.
image

@TahaKhan998
TahaKhan998 force-pushed the fix/issue-888-search-report-numbers branch 4 times, most recently from 803e4fd to aaf0af7 Compare August 6, 2026 09:44
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-888-search-report-numbers branch from aaf0af7 to 42ef9ac Compare August 6, 2026 09:56
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.

search: show report numbers in community search and EP numbers in results

4 participants