Sitecore / Sitecore.Commerce.Headstart.ReactAdmin

This is a basic implementation of Sitecore Commerce using the OrderCloud Javascript SDK. You can use it as a starting point to discover, understand, and learn more about the Sitecore Commerce OrderCloud capabilities.
https://sitecore-commerce-headstart-react-admin.vercel.app/
MIT License
7 stars 33 forks source link

ContentHub One Media Management #34

Open robertsoniv opened 1 year ago

robertsoniv commented 1 year ago

Please read the description of the Content Hub One milestone first.

This will require provisioning a production ContentHub One instance for demo and development purposes. We do not want to expose the administrative API keys for ContentHub One so we will have to create proxy endpoints that authenticate themselves using private environment variables.

Create a shared component that is capable of browsing, uploading, and removing media from ContentHub One. It will likely be necessary to load this component in a dialog so that it can be efficiently utilized on the Product CreateUpdateForm.

Anatomy suggestions:

const [selectedMedia, setSelectedMedia] = useState<MediaObject[]>([]);

<ContentHub.MediaSelector value={selectedMedia} onChange={setSelectedMedia}>
   <ContentHub.MediaSearchInput/>
   <ContentHub.MediaList/>
   <ContentHub.MediaUpload/>
</ContentHub.MediaSelector>
robertsoniv commented 1 year ago

Consider using the current users OrderCloud access_token to verify access to the proxied ContentHub One endpoints. We could even define some custom roles specifically for read/write permission.