Skip to content
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

Upload your template button not present #62

Open
Aniruddha-Shriwant opened this issue May 12, 2021 · 2 comments
Open

Upload your template button not present #62

Aniruddha-Shriwant opened this issue May 12, 2021 · 2 comments

Comments

@Aniruddha-Shriwant
Copy link
Contributor

Aniruddha-Shriwant commented May 12, 2021

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
@algomaster99
Copy link
Member

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

@DianaLease
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants