-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: <RelatedContent />
component
#731
Conversation
π¦ Changeset detectedLatest commit: 63aac7a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
RelatedContent
WPL component<RelatedContent />
component
<RelatedContent />
component<RelatedContent />
component
--columns: 2; | ||
} | ||
@media (--large) { | ||
--columns: 4; |
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.
Just to confirm expectations, if there are three cards provided, we still render 4 columns across vs 3 columns across?
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.
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.
Just to confirm expectations, if there are three cards provided, we still render 4 columns across vs 3 columns across?
My understanding is that this component can only render 4 cards.
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.
Interesting, so to make use of RelatedContent, folks will need to provide at least 4 cards. Or it's ok that less than 4 cards are provided, they just will still render within 4 columns? I could see the need to use less based on some of content the content I have seen on .io sites.
If we've decided that is a requirement, what do you think about adding a length check to the cards array that at least 4 cards are provided then or update types to reflect 4 cards?
cards: [RelatedContentCardProps, RelatedContentCardProps, RelatedContentCardProps, RelatedContentCardProps]
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.
FWIW also seeing less than and more than 4 related resources being used in the work @EnMod is doing with SI Partners.
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.
Interesting, so to make use of RelatedContent, folks will need to provide at least 4 cards. Or it's ok that less than 4 cards are provided, they just will still render within 4 columns? I could see the need to use less based on some of content the content I have seen on .io sites.
FWIW - I think this component should allow for multiple cards and not be limited to only 4. I wonder if it makes sense to enable that and make adjustments later. Especially if we're already seeing deviations from the initial requirements.
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.
@nandereck I agree: I think it makes sense to go with how it's currently implemented (render with 4 columns regardless of count, do not limit to 4 cards minimum). Especially with deviations already existing.
As an aside, this implementation is aligned with how local related resources components are currently implemented, an example being on our thank you page π
This reverts commit 8a4d2e8.
c9dff7d
to
2a08f5b
Compare
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.
ππΌ
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 PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @hashicorp/react-related-content@0.2.0 ### Minor Changes - [#731](#731) [`2a26b0bf`](2a26b0b) Thanks [@nandereck](https://github.com/nandereck)! - Create RelatedContent component
ποΈ Asana Task
π Preview Link
Description
Adds new
<RelatedContent />
component. One thing to note is that this does not include the initially proposed dropdown. Instead, we've replaced with a CTA (using the<StandaloneLink />
).Figma
PR Checklist π
Items in this checklist may not may not apply to your PR, but please consider each item carefully.