-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Nux: Standardize reduced motion handling using media queries #68423
Conversation
Closing this as the component is deprecated |
@im3dabasia While this component is indeed deprecated, it would be good to have more consistency in styling across the Gutenberg project. Feel free to reopen this PR. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hi @t-hamano, I explored the NUX package and specifically tried locating where the DotTip component is used in the editor, but I couldn’t find its implementation. Could you kindly guide me on where it is used so I can record a screencast? Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explored the NUX package and specifically tried locating where the DotTip component is used in the editor, but I couldn’t find its implementation.
That's right. To actually see the DotTip
component, we'll need to add your own code.
For example, update the Edit
component of any block to the following:
import { useBlockProps } from '@wordpress/block-editor';
import { DotTip } from '@wordpress/nux';
export default function CodeEdit() {
const blockProps = useBlockProps();
return (
<div { ...blockProps }>
<DotTip tipId="test-1">
Click here to add the product to your shopping cart.
</DotTip>
</div>
);
}
Then in your browser console run the following (If you hide the DotTip):
wp.data.dispatch( 'core/nux' ).enableTips()
Then you should see the following UI:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Part of: #68282
What?
Refactors animation and transition styles to use media not (prefers-reduced-motion) for improved accessibility, ensuring a better experience for users who prefer reduced motion.
Why?
It addresses instances where animations and transitions were not optimized for Data Views for individuals with reduced motion settings, ensuring a smoother and more inclusive user experience.
How?
This PR updates the outdated reduce-motion mixin implementation and resolves previously missed instances by adopting the new approach defined in the parent issue.
Screenshots or screencast