Skip to content

Content Translation: Improve loading effect - #977

Merged
dkotter merged 3 commits into
WordPress:developfrom
yogeshbhutkar:content-translation/improve-loading-effect
Aug 26, 2026
Merged

dkotter merged 3 commits into
WordPress:developfrom
yogeshbhutkar:content-translation/improve-loading-effect

Conversation

@yogeshbhutkar

@yogeshbhutkar yogeshbhutkar commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What, Why, and How?

The previous loading animation used a background-clipping technique with the hard-coded content-neutral-weak color. As a result, the loading state replaced the element’s existing text color with the default gray and required additional clipping and blend-mode workarounds to handle elements with their own backgrounds. It also had issues rendering the animation properly with text highlights + custom text colors.

This PR replaces that implementation with a simpler mask-based animation. Because the mask operates on the element’s existing rendering instead of supplying a new color, it retains the underlying text and background colors while removing the previous background-clipping and blend-mode workarounds.

Mask-* has good support score.

Use of AI Tools

AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5.6 Sol
Used for: Suggesting mask properties, and code review.

Screencast

Before After
Before-01 after-latest

Changelog Entry

Fixed - Improves the Content Translation loading animation to preserve existing text and background colors.

Open WordPress Playground Preview

@codecov

codecov Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.57%. Comparing base (8016220) to head (e2a6031).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #977   +/-   ##
==========================================
  Coverage      74.57%   74.57%           
  Complexity      3132     3132           
==========================================
  Files            132      132           
  Lines          12213    12213           
==========================================
  Hits            9108     9108           
  Misses          3105     3105           
Flag Coverage Δ
unit 74.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Disables editing the blocks while the translation is pending.
- Includes fixes to the shimmer animation, such as respecting current color, using two-layered background image to persist the background color, etc.
- Updated the shimmer animation to utilize CSS mask properties instead of background images for improved performance and visual consistency.
- Adjusted opacity for loading elements to enhance visibility during loading states.
@yogeshbhutkar
yogeshbhutkar force-pushed the content-translation/improve-loading-effect branch from 1554375 to e2a6031 Compare August 26, 2026 06:15
@yogeshbhutkar
yogeshbhutkar marked this pull request as ready for review August 26, 2026 06:56
@yogeshbhutkar
yogeshbhutkar requested a review from a team August 26, 2026 06:56
@github-actions

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@dkotter dkotter added this to the 1.4.0 milestone Aug 26, 2026
@dkotter
dkotter merged commit fc6bb2d into WordPress:develop Aug 26, 2026
34 checks passed
@yogeshbhutkar
yogeshbhutkar deleted the content-translation/improve-loading-effect branch August 26, 2026 14:23
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