-
Notifications
You must be signed in to change notification settings - Fork 946
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
Community Spotlight Members Round 2 #3751
Conversation
✅ Deploy Preview for docs-getdbt-com ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@@ -100,7 +100,7 @@ function CommunitySpotlightCard({ frontMatter, isSpotlightMember = false }) { | |||
</div> | |||
)} | |||
{description && !isSpotlightMember && ( | |||
<p className={styles.spotlightMemberDescription}>{truncateText(description)}</p> | |||
<p className={styles.spotlightMemberDescription} dangerouslySetInnerHTML={{__html: truncateText(description)}} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruh-roh, dangerouslySetInnerHtml
! 😆 I'm sure it's fine, but just for my own curiosity: what's this change for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to support html links within the description
field on the cards within the spotlight index page. Doing the same for the description on individual spotlight member pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah gotcha, thanks!
website/src/components/communitySpotlightCard/styles.module.css
Outdated
Show resolved
Hide resolved
// This date determines where the 'Previously on the Spotlight" text will show. | ||
// Any spotlight members with a 'dateCreated' field before this date | ||
// will be under the 'Previously..' header. | ||
const currentSpotlightDate = new Date('2023-06-01') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this need to be updated manually whenever we do a new spotlight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah since we're using the dateCreated
field we're using this to know where to show the Previously
header
No required changes; just a couple of clarifying questions. |
// Otherwise href, title, rel values all counted as text. | ||
if(hasLinks) { | ||
const linkText = str.match(/(?<=<a ).*(?=<\/a>)/g) | ||
if(linkText?.length && linkText[0]?.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is neat!! i hate regex but i love regex!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!! very clean!
Asana
What are you changing in this pull request and why?
This adds the latest addition of Community Spotlight Members. Adjustments to the
communitySpotlightCard
andcommunitySpotlightList
components were made to support showing aPreviously on the spotlight
header for older spotlight members.Previews
https://deploy-preview-3751--docs-getdbt-com.netlify.app/community/spotlight
https://deploy-preview-3751--docs-getdbt-com.netlify.app/community/spotlight/josh-devlin