-
Notifications
You must be signed in to change notification settings - Fork 2k
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
A4A: Show Vendor link on the Marketplace. #101646
base: trunk
Are you sure you want to change the base?
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 (~1004 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.
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;
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