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

fix(core): Fix breadcrumb links on PDP #728

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

christensenep
Copy link
Contributor

What/Why?

The breadcrumb links on the PDP were all pointing to #. I've added the path field to the getProduct query so that we have the path of each category available to populate the link with.

Testing

Verified that the breadcrumb links on the PDP now link to the correct page.

@christensenep christensenep requested a review from a team as a code owner April 3, 2024 21:56
Copy link

changeset-bot bot commented Apr 3, 2024

🦋 Changeset detected

Latest commit: 5fd5952

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

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

Copy link

vercel bot commented Apr 3, 2024

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

Name Status Preview Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview Apr 3, 2024 9:56pm
catalyst-testbed ✅ Ready (Inspect) Visit Preview Apr 3, 2024 9:56pm
4 Ignored Deployments
Name Status Preview Updated (UTC)
catalyst-1millionproducts-store ⬜️ Ignored (Inspect) Apr 3, 2024 9:56pm
catalyst-au ⬜️ Ignored (Inspect) Apr 3, 2024 9:56pm
catalyst-storybook ⬜️ Ignored (Inspect) Apr 3, 2024 9:56pm
catalyst-uk ⬜️ Ignored (Inspect) Apr 3, 2024 9:56pm

>
<Link href="#">{breadcrumb.name}</Link>
<Link href={path ?? '#'}>{name}</Link>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we want to do something more complex here if path is null, I'm not sure how much of an edge case that is.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it doesn't need to be a link if there is no path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I experimented with this, will also involve remove the hover:text-primary styling above, and I started to wonder if it's worth the complexity (I'm honestly not sure why a category would not have a path)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm honestly not sure why a category would not have a path

Good question, maybe that is something we need to look into at the API level 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed this is an extreme edge case, don't think we need to account for it any more gracefully than this.

@christensenep christensenep added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit fa83629 Apr 3, 2024
15 checks passed
@christensenep christensenep deleted the fix-product-breadcrumbs branch April 3, 2024 22:16
@github-actions github-actions bot mentioned this pull request Apr 3, 2024
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