zenodo-rdm icon indicating copy to clipboard operation
zenodo-rdm copied to clipboard

Record search result item styling for branded communities

Open slint opened this issue 11 months ago • 0 comments

Task overview

  • [ ] Frontpage
  • [ ] Global search
  • [ ] Branded community frontpage
  • [ ] Branded community search
  • [ ] Any non-branded community search

We have multiple records search result views where we want the records, depending on their communities, to display differently. We'll use the following terminology:

Branded community (BC): a community that has theme set (e.g. the EU community) Sub-community (SC): a community that has parent set (e.g. a project community like Horizon-ZEN or FAIRCORE4EOSC)

Frontpage and global search

  • Records with a BC as the default:
    • MUST display the BC's banner
    • MUST use the BC theme colors for the title and date label
    • MUST NOT show the BC in the "Part of" section
  • Records with an SC as the default, or no default community set:
    • MUST display using the normal site theme
    • MUST list all their communities in the "Part of" section (even BCs that are not set as default)

Correct frontpage display

Image

Branded community frontpage (recent uploads) and records search

  • Records with a BC as the default:
    • MUST NOT display the BC's banner
    • MUST use the BC theme colors for the title and date label
    • MUST NOT show the BC in the "Part of" section
  • Records with an SC as the default, or no default community set:
    • MUST NOT display the BC's banner
    • MUST use the BC theme colors for the title and date label
    • MUST NOT show the BC in the "Part of" section

Correct branded community frontpage display

Image

Sub-community (or any community's) records search

  • TBD by Lars

Banner-styling has been commented out in the following places:

  • zenodo-rdm
    • https://github.com/zenodo/zenodo-rdm/blob/e8405127e4f9d7f8f8059f81fc3bbcc0f854593e/templates/semantic-ui/zenodo_rdm/macros/record_item.html#L32
  • invenio-app-rdm
    • https://github.com/inveniosoftware/invenio-app-rdm/blob/95d6ef564d3fd45c96030a9cac00e6fb465b1f4b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayPartOfCommunities.js#L13
    • https://github.com/inveniosoftware/invenio-app-rdm/blob/95d6ef564d3fd45c96030a9cac00e6fb465b1f4b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js#L88
    • https://github.com/inveniosoftware/invenio-app-rdm/blob/95d6ef564d3fd45c96030a9cac00e6fb465b1f4b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js#L56
    • https://github.com/inveniosoftware/invenio-app-rdm/blob/95d6ef564d3fd45c96030a9cac00e6fb465b1f4b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js#L51

All views rendered using ReactSearchKit need to know (via config or similar) if they are being rendered in a BC context. This is important so that we know when to hide BC banner AND skip them in the "Part of" section.

slint avatar Mar 08 '24 08:03 slint