-
Notifications
You must be signed in to change notification settings - Fork 11
fix: gas-tags-not-showing #1604
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
Conversation
✅ Deploy Preview for veda-ui 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.
Thanks for fixing @BhattaraiSijan! Adding a few nit comments, the rest seems to work as expected.
@@ -153,6 +153,7 @@ export default function HubContent(props: HubContentProps) { | |||
{displayStories.map((d) => { | |||
const pubDate = new Date(d.pubDate); | |||
const topics = getTaxonomy(d, TAXONOMY_TOPICS)?.values; | |||
const gases = getTaxonomy(d, 'Gas')?.values; // Retrieve the Gas taxonomy |
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.
@BhattaraiSijan Can we please add a new taxonomy type TAXONOMY_GASES
here:
export const TAXONOMY_GRADE = 'Grade'; |
const gases = getTaxonomy(d, TAXONOMY_GASES)?.values
@@ -225,6 +226,37 @@ export default function HubContent(props: HubContentProps) { | |||
))} | |||
</CardTopicsList> | |||
) : null} | |||
{gases?.length ? ( // Render Gas pills |
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.
Can we please remove obsolete comments like this?
@@ -153,6 +153,7 @@ export default function HubContent(props: HubContentProps) { | |||
{displayStories.map((d) => { | |||
const pubDate = new Date(d.pubDate); | |||
const topics = getTaxonomy(d, TAXONOMY_TOPICS)?.values; | |||
const gases = getTaxonomy(d, 'Gas')?.values; // Retrieve the Gas taxonomy |
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.
Also, can we also please make sure to clean up obsolete comments like // Retrieve the Gas taxonomy
?
Closed PR because it turns out it was the intended behavior that only TOPICS be shown as those pills. |
Related Ticket: NASA-IMPACT/veda-ui#1597
Description of Changes
This pull request resolves the issue where the "Gas" taxonomy pills (e.g.,
CH₄
,CO₂
) were not being rendered in the footer of story cards. The following changes were made:HubContent
component to retrieve the "Gas" taxonomy using thegetTaxonomy
function.Notes & Questions About Changes
getTaxonomy
function was already available and used to retrieve taxonomy data for "Topics." It was reused to fetch the "Gas" taxonomy.CardTopicsList
andPill
components were sufficient for rendering the pills.Validation / Testing [Link : deploy preview]
CH₄
,CO₂
) are displayed in the footer of story cards when the "Gas" taxonomy is present in the story metadata.