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

Add Recent News and Events Entity relationships to TopTier and ServiceEntry #573

Merged
merged 11 commits into from
Oct 16, 2024

Conversation

larsmaxwell
Copy link
Contributor

@larsmaxwell larsmaxwell commented Oct 3, 2024

Closes #572

Proposed changes

  • add entity relationship for recent news and events to core content page
  • add entity relationship for recent news and events to service entry page

Screenshots

Screenshot 2024-10-04 at 12 12 54 PM

Top Tier:
Screenshot 2024-10-04 at 11 21 01 AM
Screenshot 2024-10-04 at 11 27 35 AM

Acceptance criteria validation

  • Add Recent News and Events Entity relationships to TopTier and ServiceEntry

Other details

Alternate solutions

Possible drawbacks

Currently, the tagged content overrides the entity relationships if the tagged content exists. This could be confusing for editors until all the tagged content is removed.

Requested feedback

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ldaf ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 9:55pm

@larsmaxwell larsmaxwell marked this pull request as ready for review October 4, 2024 18:46
@larsmaxwell larsmaxwell changed the title Adds recent news feature to service group pages. Add Recent News and Events Entity relationships to TopTier and ServiceEntry Oct 4, 2024
Copy link
Contributor

@hinzed1127 hinzed1127 left a comment

Choose a reason for hiding this comment

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

Looks good, just a few thoughts on organizing some of the code that's reusable

Copy link
Member

@LouisFettet LouisFettet left a comment

Choose a reason for hiding this comment

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

This is looking good! Adding a few of my thoughts as well.

Copy link

github-actions bot commented Oct 9, 2024

Coverage after merging larsmaxwell/572/recent-news into main will be

94.94%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/hooks/server
   handleCurrentUserAndContentfulClient.ts88.94%78.13%100%90.80%132–141, 150–151, 52–53, 57, 57, 73–75, 94–96
src/lib/actions
   logout.ts48.78%0%0%51.28%18–37
src/lib/components/Accordion
   Accordion.svelte100%100%100%100%
   AccordionItem.svelte94.12%55.56%100%100%23, 33, 46, 48
   context.ts100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/Alert
   Alert.svelte94.74%57.14%100%100%34, 41, 41
src/lib/components/AnnouncementBanner
   AnnouncementBanner.svelte100%100%100%100%
src/lib/components/Breadcrumbs
   Breadcrumbs.svelte100%100%100%100%
src/lib/components/Button
   Button.svelte96.77%50%100%100%41, 50
   buttonOptions.ts100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/Card
   Card.svelte97.50%0%100%100%7
   CardGroup.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/ConditionalWrapper
   ConditionalWrapper.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/ContactCard
   ContactCard.svelte98.91%93.75%100%100%54
   Section.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/ContentfulRichText
   ContentfulRichText.svelte97.87%0%100%100%25
   context.ts98%80%100%100%8
   headings.ts93.18%50%100%95.12%37–39
   predicates.ts90.76%100%70%94.12%68, 76, 79, 82, 85
src/lib/components/ContentfulRichText/nodes
   AssetHyperlink.svelte100%100%100%100%
   Blockquote.svelte100%100%100%100%
   EmbeddedAssetBlock.svelte87.50%0%100%100%12, 16, 20, 29, 36–38
   EmbeddedEntry.svelte100%100%100%100%
   EmbeddedEntryBlock.svelte100%100%100%100%
   EntryHyperlink.svelte100%100%100%100%
   Heading1.svelte100%100%100%100%
   Heading2.svelte100%100%100%100%
   Heading3.svelte100%100%100%100%
   Heading4.svelte100%100%100%100%
   Heading5.svelte100%100%100%100%
   Heading6.svelte100%100%100%100%
   Hr.svelte100%100%100%100%
   Hyperlink.svelte100%100%100%100%
   ListItem.svelte100%100%100%100%
   Node.svelte93.33%0%100%100%7
   OrderedList.svelte100%100%100%100%
   Paragraph.svelte100%100%100%100%
   Table.svelte100%100%100%100%
   TableCell.svelte100%100%100%100%
   TableHeaderCell.svelte100%100%100%100%
   TableRow.svelte100%100%100%100%
   Text.svelte100%100%100%100%
   UnorderedList.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/CopyToClipboard
   CopyToClipboard.svelte97.62%60%100%100%75, 75
   index.ts100%100%100%100%
src/lib/components/Footer
   Footer.svelte95.34%55%100%100%105, 105, 108, 108, 38, 63, 69, 69, 75
src/lib/components/Header
   Header.svelte94.44%50%100%100%47, 47–48, 48, 51
src/lib/components/Header/Logo
   Logo.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/Header/Nav
   Nav.svelte97.06%83.33%100%100%19
   NavItem.svelte100%100%100%100%
   NavLink.svelte100%100%100%100%
   NavMenu.svelte96.40%70.59%100%100%100, 77, 79, 88, 98
   index.ts100%100%100%100%
src/lib/components/Header/Title
   Title.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/Header/User
   User.svelte94.74%0%100%100%10
   index.ts100%100%100%100%
src/lib/components/Header/__mocks__
   HeaderBackgroundImage.svelte100%100%100%100%
src/lib/components/Icon
   Icon.svelte87.50%20%100%100%19, 19, 24, 24
   index.ts100%100%100%100%
src/lib/components/Image
   BlurhashRenderer.svelte100%100%100%100%
   Image.svelte90.94%68.75%66.67%96.36%116, 150, 166, 168–169, 202, 207, 212–216, 242–246, 246, 268–269, 33, 35, 38, 50, 61, 61–62, 72–74
   index.ts100%100%100%100%
   renderBlurhash.ts100%100%100%100%
src/lib/components/IntersectionObserver
   IntersectionObserver.svelte94.74%75%100%100%36–37, 39
   RootIntersectionObserver.svelte85.19%0%100%92%14–17
   index.ts100%100%100%100%
   key.ts100%100%100%100%
   observe.ts99.03%93.33%100%100%73
src/lib/components/Link
   Link.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/LogoutLink
   LogoutLink.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/PreviewToggle
   PreviewToggle.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/Search
   Search.svelte91.30%33.33%100%96.77%37–39, 44, 44, 48
   index.ts100%100%100%100%
   options.ts100%100%100%100%
src/lib/components/SideNav
   SideNav.svelte100%100%100%100%
   SideNavItem.svelte100%100%100%100%
src/lib/components/Tag
   Tag.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/VideoCard
   VideoCard.svelte91.36%0%0%94.27%105–114, 54, 80
   getTrimmedFirstParagraph.ts100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/YoutubeSubscribeLink
   YoutubeSubscribeLink.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/constants
   date.ts100%100%100%100%
   images.ts100%100%100%100%
   support.ts43.75%0%100%50%12–14, 4–9
   tokenDuration.ts100%100%100%100%
src/lib/context
   currentUser.ts88.89%100%50%93.33%14
   pageMetadataMap.ts100%100%100%100%
src/lib/imageServices
   contentful.ts97.06%86.67%100%100%21, 48
src/lib/services/blurhashes
   index.ts50%100%0%52.94%22–38, 49–51, 6–9
src/lib/services/server/contentful
   graphqlClient.ts91%75%100%92.13%71–78, 81
   index.ts100%100%100%100%
src/lib/services/server/contentfulManagement
   getCurrentUser.ts98.08%66.67%100%100%25
   index.ts100%100%100%100%
src/lib/services/server/kv/__mocks__
   index.ts91.89%100%100%91.18%23, 27, 30
src/lib/services/server/youtube
   getYoutubeVideoData.ts74.63%16.67%50%81.36%33–34, 38, 40, 44, 49–59
src/lib/util
   classNames.ts100%100%100%100%
   dates.ts78.57%100%60%79.41%14–17, 32–34
   getErrorMessage.ts63.16%20%100%76.92%10–11, 2–3, 7–9
   getErrorMessageFromResponse.ts20%25%20%19.72%12–19, 2, 20, 23–29, 3, 30–45, 50–59, 6, 60–69, 7, 70–71, 8–9
   getYoutubeVideoIDFromURL.ts66.67%33.33%100%80%3, 3–4
   resolveWithStatus.server.ts100%100%100%100%
   slugify.ts100%100%100%100%
   warn.ts100%100%100%100%
src/routes/login
   +page.server.ts89.71%70%100%92.98%32–35, 49, 52–53
src/routes/logout
   +page.server.ts81.82%75%100%82.35%11–14
src/stories
   AccordionView.svelte100%100%100%100%
   CardView.svelte99.10%50%100%100%75

Copy link

github-actions bot commented Oct 9, 2024

@larsmaxwell larsmaxwell merged commit e2393c5 into main Oct 16, 2024
8 checks passed
@larsmaxwell larsmaxwell deleted the larsmaxwell/572/recent-news branch October 16, 2024 19:42
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.

Adds Recent News to Core Content content type
3 participants