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

Refactor top tier page to avoid splitting up rendering between page and layout #361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Benaiah
Copy link
Contributor

@Benaiah Benaiah commented Aug 8, 2023

Proposed changes

  • Instead of conditionally rendering the hero portion of the top tier page in a parent +layout.svelte, extracts the layout into a separate Layout component, uses it in the +layout.svelte, exempts the top tier page from the topmost layout, and then uses the Layout component in the top tier page to render with a custom version of the regular layout.

Acceptance criteria validation

  • Manually verified
  • Tests continue to pass

@vercel
Copy link

vercel bot commented Aug 8, 2023

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

Name Status Preview Updated (UTC)
ldaf ✅ Ready (Inspect) Visit Preview Aug 8, 2023 7:25pm

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Coverage after merging benaiah/dont-split-up-top-tier-page-rendering into main will be

96.43%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/lib/components/Accordion
   Accordion.svelte100%100%100%100%
   AccordionItem.svelte95.65%66.67%100%100%21, 35
   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.svelte98.04%50%100%100%41
   buttonOptions.ts100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/Card
   Card.svelte97.50%0%100%100%7
   index.ts100%100%100%100%
src/lib/components/ConditionalWrapper
   ConditionalWrapper.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/ContactCard
   ContactCard.svelte100%100%100%100%
   Section.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/ContentfulRichText
   ContentfulRichText.svelte97.87%50%100%100%25
   context.ts98.04%80%100%100%8
   headings.ts93.18%50%100%95.12%37–39
   predicates.ts91.67%100%75%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.svelte100%100%100%100%
   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.50%60%100%100%71, 71
   index.ts100%100%100%100%
src/lib/components/Header
   Header.svelte92.37%38.46%80%100%68, 68–69, 69, 72, 88, 88, 88
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.svelte98.25%83.33%100%100%59, 68
   index.ts100%100%100%100%
src/lib/components/Header/Title
   Title.svelte100%100%100%100%
   index.ts100%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.svelte89.82%64.71%50%95.69%122, 138, 140–141, 157, 162, 166–171, 171, 193–194, 201–205, 205, 225–226, 24, 26, 29, 41, 88
   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/Search
   Search.svelte91.43%20%100%96.88%39–41, 46, 46, 50
   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/VideoCard
   VideoCard.svelte98.91%0%100%100%80
   index.ts100%100%100%100%
src/lib/constants
   images.ts100%100%100%100%
   support.ts43.75%0%100%50%12–14, 4–9
src/lib/context
   pageMetadataMap.ts100%100%100%100%
src/lib/imageServices
   contentful.ts97.06%86.67%100%100%21, 48
src/lib/services/contentful
   graphqlClient.ts90.11%66.67%100%91.46%65–72, 74
src/lib/services/youtube
   getYoutubeVideoData.ts100%100%100%100%
   index.ts100%100%100%100%
src/lib/util
   classNames.ts100%100%100%100%
   getErrorMessageFromResponse.ts11.84%100%0%12.68%12–19, 2, 20, 23–29, 3, 30–45, 48–59, 6, 60–69, 7, 70–71, 8–9
   warn.ts100%100%100%100%
src/stories
   AccordionView.svelte100%100%100%100%
   CardView.svelte99.09%50%100%100%74

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

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.

1 participant