Skip to content

feat: add new featored blog field - #77

Merged
matej-marcisovsky merged 1 commit into
mainfrom
65-featured-blog-post
Jul 30, 2026
Merged

feat: add new featored blog field#77
matej-marcisovsky merged 1 commit into
mainfrom
65-featured-blog-post

Conversation

@matej-marcisovsky

@matej-marcisovsky matej-marcisovsky commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Task Link

Task #

Description

Adds a featuredBlogPost relation on the Blog single type. The blog index uses that pick for the hero (falling back to the newest post when unset) and keeps the pinned post out of the list / Load More so it doesn’t appear twice.

New environmental variables

If your PR introduces new environment variables, please list them here along with a description of their use and apply the requires-env-vars label.

Checklist - author

  • Assignee is set (the active developer of this PR).
  • Reviewers are set (team members who will review the code).
  • PR is linked I have linked the PR to an issue in Jira.
  • Description I have described the changes proposed in the PR clearly and concisely (more important than what is why).
  • Screenshots/Videos I have added screenshots/videos or they were not needed.
  • Environmental variables are listed or they were not needed.
  • Unit/Integration tests are added for all utilities and business important logic
  • Labels I have added labels to the PR.
    • Use requires-env-vars when PR requires environmental variables
    • Use ready-for-review when PR is ready to be looked at
    • Use ready-to-merge when PR has a passing review
    • Use needs-revisions when PR has comments that block merge
    • Use do-not-review when PR is daft only and you don't want to get a review
  • [OPTIONAL] Conversation/documentation is started in places where the code is not self-explanatory

Before merging

  • PR is approved
  • All conversations are resolved
  • Pipelines are not failing

Checklist - reviewer

  • I understand all proposed changes.
  • Necessary after deploy steps are handled by someone (adding new env var, syncing config, running migration...)

@matej-marcisovsky matej-marcisovsky self-assigned this Jul 28, 2026
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website-ui Ready Ready Preview, Comment Jul 28, 2026 9:59pm

Request Review

@fonodi fonodi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looking good, good job 👍


const remainingPosts = featuredPost
? posts.filter((post) => post.documentId !== featuredPost.documentId)
: [...posts]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: I'm not sure you need to spread the posts into an array, if they are already an array.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

its just a typescript thing - posts are a readonly type (returned from the api) but remainingPosts is returned as a mutable array

it would probably be ok if i suppressed this type error but i think its safer to leave it this way

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No, it's the right call then, thank you 🙏

@matej-marcisovsky
matej-marcisovsky merged commit d59e0fc into main Jul 30, 2026
4 checks passed
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.

2 participants