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

#24 - Use script tag for prompts and admin path #41

Conversation

ianmeigh
Copy link
Collaborator

The Admin path used by the editor magic wand and the prompts are no longer assigned as JavaScript variables in the window global and get added to the DOM in a script tag (id = wagtail-ai-config).

Closes #24.

Admin path used by the editor magic wand and the prompts are now read
from a script tag.
@ianmeigh ianmeigh requested a review from tm-kn December 15, 2023 13:31
Copy link
Member

@tm-kn tm-kn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good, left a few comments! Thanks!

src/wagtail_ai/static_src/custom.d.ts Outdated Show resolved Hide resolved
src/wagtail_ai/static_src/custom.d.ts Outdated Show resolved Hide resolved
src/wagtail_ai/static_src/utils.tsx Outdated Show resolved Hide resolved
src/wagtail_ai/wagtail_hooks.py Outdated Show resolved Hide resolved
src/wagtail_ai/static_src/AIControl.tsx Outdated Show resolved Hide resolved
@ianmeigh ianmeigh requested a review from tm-kn December 15, 2023 18:08
@ianmeigh ianmeigh marked this pull request as ready for review December 20, 2023 10:37
@ianmeigh ianmeigh self-assigned this Dec 20, 2023
@tomusher
Copy link
Member

Thanks @ianmeigh!

@tomusher tomusher merged commit 85b1092 into wagtail:main Dec 20, 2023
9 checks passed
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.

Should we be assigning JS variables to the window global?
3 participants