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

Fire Weather Map Updates #585

Merged
merged 4 commits into from
Nov 1, 2024
Merged

Fire Weather Map Updates #585

merged 4 commits into from
Nov 1, 2024

Conversation

hinzed1127
Copy link
Contributor

@hinzed1127 hinzed1127 commented Nov 1, 2024

Proposed changes

Screenshots

Notice that it gets included in the navigation side bar:
Screenshot 2024-10-31 at 9 49 10 PM

Description rich text served from Contentful:
Screenshot 2024-10-31 at 9 49 20 PM

Acceptance criteria validation

  • Map route exists as page details in Contentful
  • Description for the map lives in and is served from Contentful

Other details

Alternate solutions

  • In theory, we could use a core content page, since this is a subset of those properties, but I think it's better to explicitly restrict it to just the description alongside the map.

Possible drawbacks

Requested feedback

Sorry, something went wrong.

Copy link

vercel bot commented Nov 1, 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 Nov 1, 2024 5:59pm

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.

Noticed two issues that I've noted in code review that we should look into before merging.

Additionally, the page heading is an h2, but it should be an h1. I'm unsure where that's getting set (I assume it's by the Plot?).

Comment on lines 7 to 17
const query = gql`
query FireWeatherMap {
fireDangerMapCollection(limit: 1) {
items {
description {
json
}
}
}
}
`;
Copy link
Member

Choose a reason for hiding this comment

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

This could have an adverse side-effect if there's more than one entry erroneously created; I'd recommend doing something like we did on /licensing-permits where we look up the pageMetadata ID based on the route (and then query for the one entry instead of a collection):

const metadataID = pathsToIDs.get(`/licensing-permits`);

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.

Pre-approving so I don't block you, but yeah I think at the least we need to handle the issue with the heading and the labels that appear on the parishes before merging.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…her map page. (#586)

Signed-off-by: Louis Fettet <[email protected]>
Copy link

github-actions bot commented Nov 1, 2024

Coverage after merging dh/fire-weather-map-updates into main will be

95.07%

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.svelte97.22%68.75%100%100%36, 61, 67, 67, 73
src/lib/components/Header
   Header.svelte98.75%83.33%100%100%45
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.svelte97.44%0%100%100%15
   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/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.91%68.25%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/Logo
   Logo.svelte100%100%100%100%
   index.ts100%100%100%100%
   logoOptions.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%
   constructEventSlug.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 Nov 1, 2024

@hinzed1127 hinzed1127 merged commit 7e5acd5 into main Nov 1, 2024
8 checks passed
@hinzed1127 hinzed1127 deleted the dh/fire-weather-map-updates branch November 1, 2024 18:21
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.

None yet

2 participants