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

AI chat widget and JavaScript components #5729

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Conversation

jstirnaman
Copy link
Contributor

  • Sets up JavaScript component pattern and migration to modules bundled using Hugo's built-in js.Bundle
  • Adds a footer div to contain modal triggers (custom time button and Ask AI button)
  • Loads Kapa widget script as async, but after DOMContentLoaded so that we can use the loaded eventHandler to display the Ask AI button.

TODO: fix modal button gradient background sizes and positions.

https://test2.docs.influxdata.com/influxdb/cloud-serverless/get-started/write/

- Move script tag to HTML template to make it obvious.
- Cleanup javascript to make it more component-like
- Set Kapa attributes, support setting userid
…d in code not yet ported. Cleanup syntax in local-storage and make functions available from window.LocalStorageAPI.
- componentNames are snakecase in HTML
- replace DOM selection method and jQuery eventhandler assignment
- remove old theme.js references
- removes overlay and scroll lock
- positions chat to the right and bottom
- expands sample question width to 12 cols
…for custom-time and ask-ai. Still needs some CSS help. Moves tooltip text from CSS to HTML data attribute.
…void race conditions. Call initialization from the modal trigger module and pass the show trigger function to the onload handler.
@jstirnaman jstirnaman requested a review from sanderson January 4, 2025 01:25
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

Successfully merging this pull request may close these issues.

2 participants