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

feat(collection): add blog variant for collections #924

Merged
merged 25 commits into from
Dec 20, 2024
Merged

Conversation

seaerchin
Copy link
Contributor

@seaerchin seaerchin commented Dec 10, 2024

Problem

  1. we want a blog variant with 2 col layout in lg/md and a singular column view on sm

Solution

  1. add a separate BlogCard component together with styling changes for CollectionResult. the CollectionResult displays in a grid layout with 2 cols by default and transitions into a single column layout on small screens
  2. for the BlogCard, the image is extracted to the top together w some spacing changes
  3. NOTE: i implemented this as a separate component for dev speed. it might be possible to combine the BlogCard and CollectionCard into a single component and use the variant to distinguish but it seemed premature because we haven't settled on the design yet (for the blog layout), so i opted to keep it separate + flexible first

Notes

  1. on medium to large views, i opted to remove the image totally rather than leave a placeholder image so that the text all aligns at the start. this was so that we could have correct spacing on small screens (as the gap-3 of the containing div still applies when display: none was set on a fake div) - trying to figure out how to conditionally render but tw itself won't be able to do thsi

Videos

Screen.Recording.2024-12-10.at.12.57.58.PM.mov

Demo

https://test-isomer-next-staging.isomer.gov.sg/cls

@seaerchin seaerchin requested a review from a team as a code owner December 10, 2024 04:59
@seaerchin seaerchin changed the title feat(collection): add blog variant for coll feat(collection): add blog variant for collections Dec 10, 2024
@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Dec 10, 2024

Datadog Report

Branch report: feat/layout-cls
Commit report: 4d95e8d
Test service: isomer-studio

✅ 0 Failed, 232 Passed, 36 Skipped, 38.7s Total Time
🔻 Test Sessions change in coverage: 1 decreased (-0.04%)

🔻 Code Coverage Decreases vs Default Branch (1)

  • vitest run --coverage 3.82% (-0.04%) - Details

@seaerchin seaerchin merged commit 7691901 into main Dec 20, 2024
18 of 20 checks passed
@seaerchin seaerchin deleted the feat/layout-cls branch December 20, 2024 03:49
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.

3 participants