Giter VIP home page Giter VIP logo

gws-genai-addon-sample's People

Contributors

dependabot[bot] avatar mansari avatar vinay-google avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gws-genai-addon-sample's Issues

render_actions vs renderActions ?

I just noticed you mention renderActions in the common card ui generator, and then render_actions in the card ui generators, what's the difference?

What I want to achieve is to create a dynamic dropdown (fetch from a database and based on the selection display a list of items).

The problem is I can't get the onChangeAction to work this is on my home card so I configured the action to trigger the function of my home card.

              {
                widgets: [
                  {
                    selectionInput: {
                      type: 'DROPDOWN',
                      name: 'projects',
                      label: 'Select project',
                      items: projects.map((project) => ({
                        text: project.name,
                        value: project.id,
                        selected: project.id === selectedProjectId,
                      })),
                      onChangeAction: {
                        function:
                          'https://xxxxxxxx/onCalendarHomePageOpen',
                        parameters: [],
                      },
                    },
                  },
                ],
              }

I see this error:

Cannot find field: action in message google.apps.card.v1.SubmitFormResponse

Then I add render_actions and the onChange works, but the rest state breaks.

This same thing happens when I try to navigate back to the home card from another one.

Tried with updateCard instead of pushCard but no luck.

Thank you very much

Local development

Hi @Mansari and @vinay-google

Thanks for this great example! , was very useful.

I have everything working but now I'm not sure how my team and I can work locally on the project.

What I did was to tunnel server.js with ngrok and put the public url on deployment.json and default.json, then rebuilding . It works, I can see my local changes but now if anyone wants to work it will have to re-deploy with their own ngrok url blocking the rest of the team.

Is there another way to work locally? I could only find this which shows there is live reload: https://developers.googleblog.com/2021/03/evolving-google-workspace-add-ons-with.html but it doesnt explain how

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.