Skip to content

Conversation

@mukeshpanchal27
Copy link
Member

Summary

Follow-up to #2040

In #2051, we introduced the plvt_inject_animation_duration() function to support custom animation durations for non-fade transitions. For the default fade transition, however, we had to apply animation-duration directly since it doesn’t support the CSS variable --plvt-view-transition-animation-duration.

This PR refactors and improves the implementation by making plvt_inject_animation_duration() reusable across all transition types including the default fade effect. It ensures consistent handling of animation durations, whether via CSS variables or direct CSS properties, depending on what the browser supports for a given transition type.

@mukeshpanchal27 mukeshpanchal27 self-assigned this Jul 9, 2025
@mukeshpanchal27 mukeshpanchal27 added [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] View Transitions Issues for the View Transitions plugin labels Jul 9, 2025
@codecov
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 67.14%. Comparing base (ac22ba5) to head (d7a45c3).
Report is 4 commits behind head on trunk.

Files with missing lines Patch % Lines
plugins/view-transitions/includes/theme.php 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2078      +/-   ##
==========================================
- Coverage   67.16%   67.14%   -0.03%     
==========================================
  Files          93       93              
  Lines        7745     7740       -5     
==========================================
- Hits         5202     5197       -5     
  Misses       2543     2543              
Flag Coverage Δ
multisite 67.14% <33.33%> (-0.03%) ⬇️
single 36.53% <0.00%> (+0.02%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@mukeshpanchal27 mukeshpanchal27 marked this pull request as ready for review July 9, 2025 04:50
@github-actions
Copy link

github-actions bot commented Jul 9, 2025

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: mukeshpanchal27 <[email protected]>
Co-authored-by: felixarntz <[email protected]>

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

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

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

@mukeshpanchal27 Neat, I love this - great catch!

@felixarntz felixarntz merged commit 714dd71 into trunk Jul 9, 2025
31 of 32 checks passed
@felixarntz felixarntz deleted the update/follow-up-2051 branch July 9, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] View Transitions Issues for the View Transitions plugin [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants