Skip to content

isom-1852 collection widget on homepage latest articles #1250

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

Conversation

adriangohjw
Copy link
Member

@adriangohjw adriangohjw commented Apr 17, 2025

Problem

Closes https://linear.app/ogp/issue/ISOM-1852/collection-widget-on-homepage-latest-articles

Solution

Breaking Changes

This has breaking change as studio will try to render the component in preview and crash as there's no sitemap. There's an attempt to fix it in #1277

Features:

  • added collection widget

Improvements:

  • largely copied the component design and setup from infocards since it's supposed to be 90% similar
  • moved some utils and regex from Studio to Template for reusability and single source of truth

Tests

@adriangohjw adriangohjw added the enhancement New feature or request label Apr 17, 2025
@adriangohjw adriangohjw self-assigned this Apr 17, 2025
Copy link

linear bot commented Apr 17, 2025

@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Apr 17, 2025

Datadog Report

Branch report: adriangohjw/isom-1852-collection-widget-on-homepage-latest-articles
Commit report: 3d4d507
Test service: isomer-studio

✅ 0 Failed, 582 Passed, 46 Skipped, 1m 45.58s Total Time
⬆️ Test Sessions change in coverage: 1 increased (+6.72%)

…ngohjw/isom-1852-collection-widget-on-homepage-latest-articles
* enhance getLocalisedSitemap to get nested children folders and collections

* Update sitemap layout handling to differentiate between Collection and Content types

* add image

* add overwriteCollectionChildrenForCollectionBlock to modify collection block children

* Enhance sitemap generation by adding content selection for resources and updating getLocalisedSitemap to include index pages and nested children

* add check fo rtype

* update mocks to be more robust + fix indexpage permalink

* add tests

* remove only

* add checks for image

* add beforeeach

* Enhance resource service tests by adding collection index page scenarios and refining existing test descriptions. Update setupCollection to accept state parameter.

* remove "only"

* fix

* update query

* remove

* enhance getLocalisedSitemap to include nested resources and update query logic
@adriangohjw adriangohjw merged commit 81c5cec into main Jun 3, 2025
18 of 20 checks passed
@adriangohjw adriangohjw deleted the adriangohjw/isom-1852-collection-widget-on-homepage-latest-articles branch June 3, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants