Open dahacouk opened 2 years ago
Google sheet import.
Api v3 has ended. Need to migrate to v4
The library we are using to access google sheets is no longer supported or recommended. I'll investigate a quick fix to get the basics working, but we should look at getting a better foundation sometime.
Trying to fix the current code to support the new api does not seem like a good use of time. Too many little details. It will be faster to implement a new library.
I've reworked the shopping list flow to work without the google sheets block. https://app.kendra.io/seasons/seasonsListProductsv4
The new sheets API does not let us access the sheet as a JSON file. So, this version loads the data as a csv file, and then restructures it to fit the format for a file-import block, before sending it to parse-data.
I think it will be worth reworking the google sheets block to do all of this in one go. It will make it much easier to use, as the approach I've implemented now is a bit tricky.
https://kendraio-monjipko6-kendraio.vercel.app/seasons/seasonsListProducts
Working version of the shopping cart is now available here. This uses an updated google sheets block.
@the-greenman Cool stuff! 🎉 There seems to be a colon and space prepending the items in the table of selected products. I don't seem to remember them being there. Any ideas if we can remove them?
Other than that I guess this seems good to push to the main branch? Ah! But maybe check that this solves #298 too before pushing, eh? Cheers!
The colon and space seems to be the result of changes in the UI widget. I can look into that, but it's not related to the import.
I need to add a test and update the documentation next
This Flow seems to have stopped working. Is it us or them?! 😉 @the-greenman
[UPDATE] Ah! I see this was never pushed to main. Can we do that now? Cheers!
Seems like this is working again. But for clarity should we 'delete' (actually I think it just hides it from the cloud) https://app.kendra.io/seasons/seasonsListProducts and rename the URL part of https://app.kendra.io/seasons/seasonsListProductsv4 removing 'v4'? @the-greenman
The V4 flow will be removed. It was a direct test, but does not use the block. Once the block is deployed to production, the standard flow will work.
Let's make the simple shopping cart work again. It is here: https://app.kendra.io/seasons/seasonsListProducts
And this might help: https://medium.com/kendraio/how-to-create-a-shopping-list-app-with-kendraio-app-23ce547813d7
Cheers @dahacouk