Skip to content

Conversation

summer-cook
Copy link
Contributor

@summer-cook summer-cook commented Feb 2, 2024

Story

Gets markdown working on the browse page. Homepage will still use snippets.

Related

Expected Behavior Before Changes

  • As a user, I would not see markdown in descriptions on the browse page that contain markdown

Expected Behavior After Changes

  • As a user, i will see markdown in descriptions on the browse page that contain markdown
  • As a user, I will see snippets on the featured service page, and descriptions on the browse/search page.

Screenshots / Video

Browse page will use description with markdown Video: https://share.zight.com/o0uOqZx2 image
Featured services will still use snippet image

Copy link

vercel bot commented Feb 2, 2024

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

Name Status Preview Comments Updated (UTC)
webstore-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 10:01pm

Comment on lines 51 to 57
const truncateDescription = (desc = '', maxLength, isOpen) => {
if (desc.length <= maxLength || isOpen) return { truncated: desc, cutOffIndex: desc.length }
const lastSpaceIndex = desc.substring(0, maxLength).lastIndexOf(' ')
const ellipsis = isOpen ? '' : '...'
return { truncated: desc.slice(0, lastSpaceIndex) + ellipsis, cutOffIndex: lastSpaceIndex }
}

Copy link
Member

Choose a reason for hiding this comment

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

can this get moved to "utils/helpers.js"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes definitely, i just tried putting it back there and it worked! for some reason when i first tried that it didn't want to work for me.. but it was probably some other confounding error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants