Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Centralized assets in OneDrive #194

Closed
rofe opened this issue May 12, 2020 · 15 comments
Closed

Centralized assets in OneDrive #194

rofe opened this issue May 12, 2020 · 15 comments
Labels
enhancement New feature or request

Comments

@rofe
Copy link
Contributor

rofe commented May 12, 2020

Some images will be reused across multiple documents and therefore need to be manageable in a central location, e.g. product mnemonics, author pics, banner backgrounds etc. These should be stored in a dedicated OneDrive folder, and it should be simple to link/include them in multiple Word or markdown documents.

@kptdobe
Copy link
Contributor

kptdobe commented May 12, 2020

One pre-requisite is that Word allows (in a user friendly way) to reference an asset in OneDrive.

@tripodsan
Copy link
Contributor

some ideas:

  1. we can build a word plugin that let's you browse the onedrive folder (i'm sure someone already did)
  2. we can build a browser extension that let's you browse the onedrive folder
  3. we can create thumbnails with QR codes that reference the correct images.... and the author copies them from a web-catalog

@rofe
Copy link
Contributor Author

rofe commented May 12, 2020

I would do (3) but built into (2), and stay away from (1) because I think we want authors to stay in the browser as much as possible - for multiple reasons incl. the ability to preview drafts as well as using the tag picker.

Speaking of which, maybe we could extend https://app.project-helix.io/bulkedit to become a hub for Helix related tools such as bulk editing, tags and a new assets tab, and build a Chrome extension wrapper for it (for starters, a bookmarklet would do as well). Later on we could also include more features, like a preview button.

@kptdobe
Copy link
Contributor

kptdobe commented May 13, 2020

In any case, the generated Markdown should still contain a reference to the "local" image.

@tripodsan
Copy link
Contributor

tripodsan commented May 13, 2020

In any case, the generated Markdown should still contain a reference to the "local" image.

why? and if so, how would we provide the image? would we need an extra action that has read access to the image?

@kptdobe
Copy link
Contributor

kptdobe commented May 13, 2020

What would the markdown contain if it does not contain a link to the local image ? the blob storage link ? if so, how do you manage the updates, i.e. someone updates the photoshop logo (which also means all pages referencing that image must be "re-rendered" or updated)

@tripodsan
Copy link
Contributor

tripodsan commented May 13, 2020

but the generated markdown is generated. :-)
if you change the original logo, you just need to clear the cache. and the next re-render will use the new image.

you also want the HTML to point to a new resource, so the browser doesn't cache the old image.

@kptdobe
Copy link
Contributor

kptdobe commented May 13, 2020

I still do not see what the importer should write in a post md for image links in a case of a product image or how the resolution of this image in the docx will be done.
As an author, I insert the thumbnail via the web-catalog QR code. What will happen behind the scene ?

@tripodsan
Copy link
Contributor

As an author, I insert the thumbnail via the web-catalog QR code. What will happen behind the scene ?

word2md will replace the image with the correct, full-res image.

@tripodsan
Copy link
Contributor

tripodsan commented May 14, 2020

I still do not see what the importer should write in a post md for image links in a case of a product image or how the resolution of this image in the docx will be done.

The word2md does works 2 phases now.

  1. convert the docx to mdast
  2. post process mdast to upload/process the images

There is still the fallback to serve the MD from onedrive directly. we could change that, so

  1. parse the MD stored in onedrive
  2. post process mdast to upload/process the images

So, as you said, if the importer can figure the proper location of the images (being somewhere in onedrive), it could use those in the MD file stored in markdown. and word2md can still post-process the images and upload them to azure.

see:

@kptdobe
Copy link
Contributor

kptdobe commented May 14, 2020

Ok. Now the other way around: I request the xyz_post.md that contains an image referenced as /assets/logos/adobe-scan.jpg. What do you serve ?

@tripodsan
Copy link
Contributor

see https://github.com/adobe/helix-word2md/issues/109#issuecomment-628318961

if xyz_post.md is a file in onedrive, it would load the /assets/logos/adobe-scan.jpg (relative to the root folder) and post-process it (upload it to azure, etc). and then replace the img link in the md with the azure url and return the md.

IF the adobe-scan.jpg image contains a QR code that contains a URL/path to another image, it would use that one instead. (if we gonna support the media-library-thumbnail-thingy)

@rofe
Copy link
Contributor Author

rofe commented May 14, 2020

then replace the img link in the md with the azure url

Should we consider going directly to the /hlx_* image URL? This could make adobe/helix-pipeline#706 (and the entire image-handler obsolete.

@tripodsan
Copy link
Contributor

tripodsan commented May 14, 2020

Should we consider going directly to the /hlx_* image URL? This could make adobe/helix-pipeline#706 (and the entire image-handler obsolete.

no. I consider the output from word2md (gdocs2md, github) as source content, and it should only contain unaltered content. (qrCode stuff is a bit an edge case, since it involves a lot of external requests that should not happen in the pipeline)

@rofe
Copy link
Contributor Author

rofe commented May 27, 2020

@davidnuescheler suggested to table this feature until we know more about actual use cases. The ones mentioned in the description above don't actually vouch for such an elaborate system:

  • product mnemonics: the only thing we should really store centrally. They are already stored in GitHub and should be referenced from there
  • author pics, banner backgrounds etc.: we currently have no evidence of any reused images.

@rofe rofe closed this as completed May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants