kentico-ericd / kontent-google-sheets-add-on

Using this Google Sheets add-on, you can import new content items in Kentico Kontent, or update existing items. This can be handy when migrating content from an external database or CMS, or if your editors prefer to work in spreadsheets.
MIT License
4 stars 3 forks source link

Not all content types were returned for me to select #16

Closed ileshmistry closed 2 years ago

ileshmistry commented 3 years ago

Describe the bug Basically I'm using the add on, but when trying to retrieve the Content Types from the project, it is not listing them all

Therefore I can't select the one I was to use, it's like it is only listing a limited amount

To Reproduce Steps to reproduce the behavior:

  1. Go to Generate Sheets
  2. And you don't see the full list of Content Types

Expected behavior I would expect all content types to be available to be selected or some form of search to find the type I need

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

kentico-ericd commented 3 years ago

Hey @ileshmistry!

How many content types do you have in your project? I randomly tried testing with 37 and it worked fine.. but I'm guessing you have a lot more?

Did you see any errors in your browser's Console or Network tab when you accessed the Generate Sheet page?

ileshmistry commented 3 years ago

Hi @kentico-ericd

In this project we have around 140 and it will grow. Most of them we don't use, but for this add on we wanted to use the ones we do use :)

When I did this, I didn't check the console, as I felt it just was showing a limited list, rather than not showing anything

kentico-ericd commented 3 years ago

@ileshmistry it should be fixed now 👍

ileshmistry commented 3 years ago

@kentico-ericd I don't see any Content Types now :(

Screenshot 2021-09-01 at 12 43 13
kentico-ericd commented 3 years ago

@ileshmistry could the request still be running and just taking a long time? I don't see any errors in the add-on's logs.. do you see anything in the browser Console or Network tab?

kentico-ericd commented 3 years ago

I found out that it was caused by a GAS limitation: https://developers.google.com/workspace/add-ons/concepts/cards#card_anatomy. The content type names were added as a widget to a single section, and a section can only have 100 widgets. I've updated the UI and although the appearance is different, each widget has its own section and you can view 100+ content types without issue.

Let me know if it's working for you!

ileshmistry commented 3 years ago

@kentico-ericd It's now displaying a lot more Content Types for me thanks.

However it doesn't show them all for me :(

It's still missing about 50 more Content Types.

kentico-ericd commented 3 years ago

I think that there was also a limitation on the number of sections per card :sweat_smile: I've added full pagination so that you can see 30 types at a time along with the total at the top. Can you try it now?

ileshmistry commented 3 years ago

We had 137 Content Types. Works well for me, thanks Eric. Awesome job!

Minor point, if it is easy to do, can the buttons be swapped around and maybe make the colours more easier to know which button to press?

For me the Next button was white and the previous button dark grey.

Screenshot 2021-09-01 at 19 57 25
kentico-ericd commented 3 years ago

Glad it works! It's really weird, I noticed that when testing the button order and their colors almost seemed to changed at random.. with the current version this is what I see:

chrome_84CZ1q0ABe

But I will monitor it and see if I can nail down what's going on here 👍