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

Render Contentful rich text content #22

Merged
merged 23 commits into from
May 5, 2023
Merged

Conversation

Benaiah
Copy link
Contributor

@Benaiah Benaiah commented Apr 14, 2023

Jira ticket: LDAF-211

Proposed changes

  • Adds a ContentfulRichText component that renders regular Contentful rich text.
  • Adds a page at /test-contenful-content that uses the ContentfulRichText component.

Screenshots

Screenshot is of the Contentful rich text preview page.

image

Acceptance criteria validation

  • Contentful rich text example document renders correctly
  • Tests added to cover the change

@Benaiah Benaiah marked this pull request as ready for review April 14, 2023 02:23
@Benaiah Benaiah force-pushed the benaiah/render-contentful-content branch from e76a8ea to 9091841 Compare April 14, 2023 18:29
@Benaiah Benaiah force-pushed the benaiah/render-contentful-content branch from fe05198 to bb8019d Compare May 4, 2023 20:15
@vercel
Copy link

vercel bot commented May 4, 2023

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 May 5, 2023 8:11pm


declare global {
/* eslint-disable-next-line @typescript-eslint/no-namespace */
namespace Vi {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will need to be updated if we merge the vitest dependency update (#105) first.

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.

Got a few comments / questions (all of which are probably not blockers), but this looks good! Excited to plug in our CMS content and see the magic happen.

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.

Latest changes all look good! I have one more minor suggestion but I think this is good to go!

src/routes/test-contentful-content/+layout.svelte Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented May 5, 2023

Coverage after merging benaiah/render-contentful-content into main will be

98.28%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/lib/components/Button
   Button.svelte100%100%100%100%
   buttonOptions.ts83.33%100%0%93.75%10
   index.ts100%100%100%100%
src/lib/components/ContentfulRichText
   ContentfulRichText.svelte100%100%100%100%
   headings.ts89.36%66.67%66.67%92.68%31, 37–39
   predicates.ts96.72%100%90%98.46%63
src/lib/components/ContentfulRichText/nodes
   Blockquote.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/Header
   Header.svelte93.33%50%80%100%48, 48–49, 49, 52
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.svelte93.33%33.33%100%100%19, 19
   index.ts100%100%100%100%
src/lib/components/Image
   Image.svelte87.31%68.75%33.33%91.98%112, 117–121, 137, 137, 156–157, 17–22, 40, 69, 76–77, 89, 91–92
src/lib/components/IntersectionObserver
   IntersectionObserver.svelte94.74%75%100%100%36–37, 39
   RootIntersectionObserver.svelte85.19%0%100%92%14–17
   index.ts66.67%100%0%100%
   key.ts100%100%100%100%
   observe.ts99.05%93.75%100%100%73
src/lib/components/Link
   Link.svelte100%100%100%100%
   index.ts100%100%100%100%
src/lib/components/Search
   Search.svelte90.63%33.33%100%96.49%32–34, 39, 39, 43
   index.ts66.67%100%0%100%
   options.ts66.67%100%0%100%
src/lib/util
   classNames.ts100%100%100%100%
   warn.ts100%100%100%100%

@github-actions
Copy link

github-actions bot commented May 5, 2023

Reports for unit and end-to-end tests of 1b2a12a have been committed to the gh-pages branch.

You can view the unit test coverage report, the end-to-end test report, and the bundle visualizer once changes have propagated (this may take a few minutes).

@Benaiah Benaiah merged commit a637168 into main May 5, 2023
@Benaiah Benaiah deleted the benaiah/render-contentful-content branch May 5, 2023 20:14
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