-
Notifications
You must be signed in to change notification settings - Fork 2k
A4A: Show Vendor link on the Marketplace. #101646
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
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~963 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
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.
I haven't tested this yet.
But, I have left a few comments. Let me know what you think.
{ vendor && | ||
translate( 'By {{a/}}', { | ||
components: { | ||
a: ( | ||
<a | ||
href={ vendor.vendorUrl } | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
onClick={ () => { | ||
dispatch( | ||
recordTracksEvent( 'calypso_marketplace_products_overview_vendor_click', { | ||
vendor: vendor.vendorName, | ||
} ) | ||
); | ||
} } | ||
> | ||
{ vendor.vendorName } | ||
</a> | ||
), | ||
}, | ||
} ) } |
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.
I think we can create a common component and reuse it wherever required, as it is being used in 2 places
<ProductVendorInfo />
or something similar
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.
At first, I had the same thought, but since the title is not something we can share both the Lightbox and Checkout summary due to Typography, we are left with just a translation string. I decided not to create a component for now.
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.
Sorry, I was talking only about the vendor.
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.
How about we keep this info in useProductDescription as we are already using it show the description?
Something like:
const VENDOR_INFO_MAP: Record< string, VendorInfo > = {
kestrel: {
vendorName: 'Kestrel',
vendorUrl: 'https://woocommerce.com/vendor/kestrel/',
},
'element-stark': {
vendorName: 'Element Stark',
vendorUrl: 'https://woocommerce.com/vendor/element-stark/',
},
storeapps: {
vendorName: 'StoreApps',
vendorUrl: 'https://woocommerce.com/vendor/storeapps/',
},
woocommerce: {
vendorName: 'Woo',
vendorUrl: 'https://woocommerce.com/',
},
jetpack: {
vendorName: 'Jetpack',
vendorUrl: 'https://jetpack.com/',
},
pressable: {
vendorName: 'Pressable',
vendorUrl: 'https://pressable.com/',
},
wpcom: {
vendorName: 'WordPress.com',
vendorUrl: 'https://wordpress.com/',
},
};
case 'woocommerce-constellation':
description = translate(
'A flexible, WooCommerce memberships platform to support publishers, purchasing clubs, online learning, associations, and more.'
);
vendor = VENDOR_INFO_MAP.kestrel;
break;
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.
@yashwin I decided to keep this as is for now and not transfer it to the useProductDescription
hook. Eventually, we'll shift this logic to the backend when we begin supporting over 1000 third-party products. Moreover, I want to reserve the useProductDescription
hook solely for the description to align with its name.
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.
I saw the useProductDescription
is already being used for the feature
list. Maybe it should have been named differently. Do you think we can rename this? I'm concerned about the extra things we are adding to solve this which can be easily solved by renaming this.
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.
I'm still unsure about placing this here on the hook. One concern is that we're utilizing the getVendorInfo helper function from a different use case, which could complicate its usage. 🤔
c4e8b17
to
8ffdc1b
Compare
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
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 addressing my comments.
Since my other comment is a non-blocker, I'm approving the PR.
8ffdc1b
to
895cfae
Compare
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17332778 Some locales (Hebrew) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday. Thank you @jkguidaven for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
As we now support third-party products in the A4A marketplace, it's essential to clearly identify the vendor of each product for users. This PR updates the marketplace to display the Vendor link in the UI.
Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/1936
Proposed Changes
Why are these changes being made?
Testing Instructions
/marketplace/products
.Pre-merge Checklist