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

fix(ai-help): Example header highlighting #10365

Closed
wants to merge 17 commits into from
Closed

Conversation

argl
Copy link
Contributor

@argl argl commented Jan 22, 2024

Summary

This fixes an issue on example queues from either the AI help section or the blog section. In some situations, the mouse-over highlight of the example, triggered from the playground queue did not survive a scroll-into-view.

Problem

The highlight css attribute got set directly on the element from the mouse event handler. Therefore it did not survive a react re-render of the component. A render is sometimes triggered by the autmatic viewport scrolling.

Solution

Refactored the highlighting into a react state variable that is part of the UI context and properly tracked. The playground queue is currently used in the AI-help section and in the Blog section (to my knowledge).


How did you test this change?

Manually, locally

@github-actions github-actions bot added dependencies Pull requests that update a dependency file macros tracking issues related to kumascript macros plus work around features related to MDN Plus deployer Deployment (currently using AWS S3 and AWS Lambda) plus:playground plus:ai-help labels Jan 22, 2024
@argl argl closed this Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file deployer Deployment (currently using AWS S3 and AWS Lambda) macros tracking issues related to kumascript macros plus:ai-help plus:playground plus work around features related to MDN Plus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants