Skip to content

Conversation

nikunj8866
Copy link
Contributor

Summary

Fixes #2040

Relevant technical choices

A new option(transition_speed) is added to control the speed of view transition animations (in milliseconds). This allows theme developers to customize how fast transitions appear.

The placeholder plvt-view-transition-duration in the animation CSS is replaced in PHP with the actual speed value (converted from milliseconds to seconds).

image

@nikunj8866 nikunj8866 requested a review from felixarntz as a code owner June 12, 2025 10:02
Copy link

github-actions bot commented Jun 12, 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: nikunj8866 <nikunj8866@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>
Co-authored-by: felixarntz <flixos90@git.wordpress.org>

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

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 22.00000% with 39 lines in your changes missing coverage. Please review.

Project coverage is 67.16%. Comparing base (4b31f55) to head (636a3c5).
Report is 18 commits behind head on trunk.

Files with missing lines Patch % Lines
plugins/view-transitions/includes/settings.php 0.00% 32 Missing ⚠️
plugins/view-transitions/includes/theme.php 61.11% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2051      +/-   ##
==========================================
- Coverage   67.31%   67.16%   -0.15%     
==========================================
  Files          93       93              
  Lines        7718     7745      +27     
==========================================
+ Hits         5195     5202       +7     
- Misses       2523     2543      +20     
Flag Coverage Δ
multisite 67.16% <22.00%> (-0.15%) ⬇️
single 36.51% <0.00%> (-0.13%) ⬇️

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.

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.

Thank you for the PR @nikunj8866! Overall this looks like a good start. There are a few things that need to be cleaned up for a bit more stable approach and cleaner API.

@nikunj8866 nikunj8866 requested a review from felixarntz June 13, 2025 09:13
@mukeshpanchal27 mukeshpanchal27 added [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] View Transitions Issues for the View Transitions plugin no milestone PRs that do not have a defined milestone for release labels Jun 17, 2025
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.

@nikunj8866 This is looking very good. Two points of follow up feedback, one thing I missed before.

Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Left some feedbacks.

@mukeshpanchal27
Copy link
Member

@nikunj8866 This branch has conflicts that must be resolved

Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Thanks @nikunj8866 for the updates.

Overall, it looks solid to me. Let's do one final round of feedback, and then it should be good to go.

nikunj8866 and others added 2 commits June 30, 2025 13:15
Added translators comments

Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Added translators comments

Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
@mukeshpanchal27
Copy link
Member

@nikunj8866 This branch has conflicts could you please resolve the conflict?

@nikunj8866
Copy link
Contributor Author

@nikunj8866 This branch has conflicts could you please resolve the conflict?

@mukeshpanchal27 Resolved conflict.

@mukeshpanchal27
Copy link
Member

@felixarntz Could you please take a look when you have a moment?

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.

@nikunj8866 Code looks almost good to go, just a few nit-picks.

I tested this locally, and it works well, except for the default transition looking weird when there are shifting elements (via view-transition-name). See comments below.

@nikunj8866
Copy link
Contributor Author

@felixarntz Thank you for the feedback. I've made the changes as per your feedback. Please review it at your convenience.

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.

@nikunj8866 Thank you, looks great!

@felixarntz felixarntz added this to the view-transitions n.e.x.t milestone Jul 8, 2025
@felixarntz felixarntz removed the no milestone PRs that do not have a defined milestone for release label Jul 8, 2025
@felixarntz felixarntz merged commit ac22ba5 into WordPress:trunk Jul 8, 2025
17 checks passed
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.

Allow control over view transition animation duration
3 participants