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

GenAiButton: Change API to start/stop / Also add to NG (soho-button) #8541

Closed
tmcconechy opened this issue Mar 13, 2024 · 3 comments · Fixed by #8568, infor-design/enterprise-ng#1662 or #8619
Assignees
Labels
type: bug 🐛 [1] Velocity rating (Fibonacci)

Comments

@tmcconechy
Copy link
Member

tmcconechy commented Mar 13, 2024

Describe the bug

The recently added api to start the button animation will not work in practice because we dont know how long the animation will take.

See: https://github.com/infor-design/enterprise/blob/main/app/views/components/button/example-index.html#L205
It just uses a timeout.

Also we need to add this to the NG project:

  • the button type (icon is static and cant be changed
  • and the new animation API
<button soho-button="generative-ai" title="Love It">Generate</button>

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://main-enterprise.demo.design.infor.com/components/button/example-index.html
  2. Click on gen ai buttons

Expected behavior
In addition of passing a timeout to the button on https://github.com/infor-design/enterprise/blob/main/app/views/components/button/example-index.html#L205

Lets make two new methods. startGenerativeActionAnimation/stopGenerativeActionAnimation so it can be started and stoped on demand (or maybe start/stopAnimation.

Additional context
Sorry missed this on initial review.

@tmcconechy tmcconechy added type: bug 🐛 [1] Velocity rating (Fibonacci) labels Mar 13, 2024
@tmcconechy
Copy link
Member Author

@ericangeles can you try this suggestion we found with Landmark

@tmcconechy tmcconechy changed the title GenAiButton: Change API to start/stop GenAiButton: Change API to start/stop / Also add to NG (soho-button) Mar 15, 2024
@vonnyw
Copy link
Contributor

vonnyw commented Apr 16, 2024

I picked up this change and still seeing the animation being terminated prematurely. Looking at the code, there is a default of 5000 delay which sets the timeout versus letting the stopAnimation call to handle it.

@tmcconechy
Copy link
Member Author

Note: For a workaround the following could be used

const button = $('#btn-generate-ai-1').data('button');

button.performAnimation(100000000);
button.generativeAnimation = 100000000;
button.stopAnimation();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 [1] Velocity rating (Fibonacci)
Projects
No open projects
3 participants