Add animation to Docs Assistant widget#1731
Open
bucanero wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the Polkadot Docs Assistant “thinking” state by replacing the static ellipsis with an animated spark + typing dots indicator, with an accessibility-oriented status announcement while the assistant is working.
Changes:
- Updated the “thinking” message markup to render an inline SVG spark icon plus animated dots, and added ARIA status attributes.
- Added CSS animations (
da-spark,da-bounce) and flex layout for the thinking indicator, including aprefers-reduced-motionoverride. - Updated
.gitignoreto ignore the generatedsiteoutput directory.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| material-overrides/assets/stylesheets/docs-assistant.css | Adds flex layout and keyframe animations for the “thinking” indicator, plus reduced-motion handling. |
| docs/js/docs-assistant.js | Replaces the static … placeholder with icon + dot markup and sets ARIA status attributes on the thinking bubble. |
| .gitignore | Ignores the generated site directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
@illegalcall , I did this small PR based on our chat |
Contributor
|
LGTM! |
illegalcall
approved these changes
Jul 13, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the "thinking" state of the docs assistant widget so it shows an animated icon next to the three dots while the bot is looking up and writing an answer.
What changed:
docs/js/docs-assistant.js— the placeholder that used to be a static…is now a bubble containing:It also gets
role="status"andaria-label="Searching the docs and writing an answer"so screen readers announce the working state. The error fallback still works (it overwrites the bubble with the text message).material-overrides/assets/stylesheets/docs-assistant.css— added theda-spark(icon) andda-bounce(dots) keyframe animations, laid the indicator out in a flex row, and included aprefers-reduced-motionguard so the animation is disabled for users who opt out.The icon uses the existing theme variables (
--accent-default,--color-text-secondary), so it follows light/dark mode automatically like the rest of the widget. I verified it renders correctly in the browser.