cicero-word-add-in icon indicating copy to clipboard operation
cicero-word-add-in copied to clipboard

Upload your template button not present

Open Aniruddha-Shriwant opened this issue 4 years ago • 2 comments

Bug Report 🐛

Previously there was a button for uploading a custom template in the add-in

image

But now due to update accordproject/ui-components from ^0.93.2-20200730175739 to ^0.97.0 hence the current add-in looks like this

image

As a result of this, we can't upload custom templates to the document through the add-in.

Steps to Reproduce

  1. Run the add-in and see that currently there is a button named "Add a new library item" click on it nothing happens

For Testing purpose I had done this:

  1. Uninstall the @accordproject/ui-components by npm uninstall @accordproject/ui-components
  2. Install the previous version by npm i @accordproject/ui-components@^0.93.2-20200730175739
  3. Now run the add-in again it works as it used to work before, I had even uploaded [[email protected]](https://templates.accordproject.org/[email protected]) template and it was uploaded successfully

Context (Environment)

Desktop

  • OS: Windows 10
  • Browser: Chrome
  • MS Word Version: 2016

Aniruddha-Shriwant avatar May 12 '21 08:05 Aniruddha-Shriwant

What is the purpose of "Add new library item", @irmerk @DianaLease ?

algomaster99 avatar May 15 '21 08:05 algomaster99

Not sure if this is intentional, but it looks like the Library component will only render that button if both onUploadItem and onImportItem are passed to the component as props: https://github.com/accordproject/web-components/blob/6b185a13fa44270921a8ef5c014df238af9c5fba/packages/ui-components/src/Library/index.js#L95

In the Word add-in, we are only passing onUploadItem.

DianaLease avatar May 20 '21 21:05 DianaLease