-
Notifications
You must be signed in to change notification settings - Fork 35
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
CustomerSegmentationTemplate / Introduce dateAdded
prop
#771
Conversation
standardMetafieldDependencies?: CustomerStandardMetafieldDependency[]; | ||
/* Date when the template was first introduced. A "New" badge will be rendered for recently introduced templates. */ | ||
dateAdded?: Date; |
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.
Thoughts on this being optional/required?
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.
optional makes sense to me 👍🏼
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 API seems a little odd, shouldn't we be able to determine this ourself (since we know when extensions are created)?
@lemonmade we need more granularity actually. For example:
|
@loic-d could these be separate extensions instead? |
@lemonmade I don't think this is a scalable solution. We have almost 20 first party templates at the moment and this list will continue to grow. It will be harder to maintain and I think it will lead to duplicate boilerplate code being shipped as part of each extension's bundle 🤔 |
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. i think this makes sense given our needs.
Adds changeset
Background
We currently display a "New" badge for recently introduced templates. Apps can feed us the date of when the template was added and we will display the badge if the date is within a month.
I've made the prop optional because but we could just set it in the past for all existing templates. I'm open to suggestions.
Solution
(Describe your solution, why this approach was chosen, and what the alternatives/impacts may be)
🎩
Checklist