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: support NOIRLab announcements #599

Merged
merged 1 commit into from
Oct 28, 2024
Merged

feat: support NOIRLab announcements #599

merged 1 commit into from
Oct 28, 2024

Conversation

alexgoff
Copy link
Contributor

@alexgoff alexgoff commented Oct 28, 2024

Resolves #598

Add support for NOIRLab announcements to news pages and to the SWR data mixer.

To test:

  • (optional) pull corresponding API branch to get updated text in Craft
  • Add a news post in Craft with the "Announcement" tag and an announcement ID
  • See that the article appears on the client
  • See that the article is searchable with title/image/date
  • See that the article appears on homepage news grid
  • Remove either the "Announcement" tag or the ID in Craft
  • See that the post reverts to a Craft entry

@alexgoff alexgoff requested a review from ericdrosas87 October 28, 2024 20:34
@alexgoff alexgoff self-assigned this Oct 28, 2024
contacts: Array<ReleaseContact> | (string | undefined);
}

const Contacts: FunctionComponent<ContactsProps> = ({ contacts = [] }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

revamp the Contacts component, announcements send their contacts as an HTML chunk instead of an array. Display will be slightly different between press releases and announcements because of this.


if (pressReleaseId) {
// Announcements
if (slug !== "feature" && pressReleaseId) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add a second server data fetch to the news page if this is detected as an announcement

@alexgoff alexgoff merged commit e2e8806 into develop Oct 28, 2024
2 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