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: product-carousel and product-list now sort properly, included append checkbox control #1646

Open
wants to merge 2 commits into
base: vibes/soul-with-makeswift
Choose a base branch
from

Conversation

drewpledger
Copy link
Contributor

@drewpledger drewpledger commented Nov 15, 2024

products-list.makeswift.tsx

CleanShot.2024-11-15.at.16.10.14.mp4

products-carousel.makeswift.tsx

CleanShot.2024-11-15.at.16.11.32.mp4

@drewpledger drewpledger requested a review from a team as a code owner November 15, 2024 21:12
Copy link

vercel bot commented Nov 15, 2024

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

Name Status Preview Comments Updated (UTC)
catalyst 🔄 Building (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 3:48pm
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 3:48pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 3:48pm
catalyst-soul ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 3:48pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 3:48pm
catalyst-unstable ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 3:48pm

Copy link

changeset-bot bot commented Nov 15, 2024

⚠️ No Changeset found

Latest commit: 322fe04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines 241 to 245
if (product?.entityId) {
return product.entityId.label;
}

return product?.title || 'Product Title';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. So entity IDs have labels?

Also, why not do this?

return product?.entityId.label ?? product?.title ?? 'Product Title'

@@ -116,7 +141,7 @@ runtime.registerComponent(
}

return {
id: title ?? '',
id: index.toString(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should use a stable identifier here instead of the index

Copy link
Contributor Author

@drewpledger drewpledger Nov 18, 2024

Choose a reason for hiding this comment

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

Should we be forcing users to enter an ID or something? Alan was saying using index is the most intuitive way outside of entering one in manually. What about ${title}-${index}?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we have the ID of the product?

@drewpledger drewpledger force-pushed the dp/product-lists-sort branch from befabf9 to 09cb2d4 Compare November 18, 2024 15:34
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