Skip to content

Conversation

@Soean
Copy link
Member

@Soean Soean commented Jun 4, 2025

Summary

The plvt_sanitize_setting() function of the view transitions plugin sanitizes the default values, not the input values. Currently, the new input values of the selectors are not saved. This PR fixes the problem.

@Soean Soean requested a review from felixarntz as a code owner June 4, 2025 08:51
@github-actions
Copy link

github-actions bot commented Jun 4, 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: Soean <soean@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.

@codecov
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

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

Project coverage is 68.06%. Comparing base (05444d4) to head (8f3679f).
Report is 3 commits behind head on trunk.

Files with missing lines Patch % Lines
plugins/view-transitions/includes/settings.php 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #2036   +/-   ##
=======================================
  Coverage   68.06%   68.06%           
=======================================
  Files          92       92           
  Lines        7626     7626           
=======================================
  Hits         5191     5191           
  Misses       2435     2435           
Flag Coverage Δ
multisite 68.06% <0.00%> (ø)
single 37.03% <0.00%> (ø)

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.

@westonruter westonruter added [Plugin] View Transitions Issues for the View Transitions plugin [Type] Bug An existing feature is broken labels Jun 4, 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.

Yikes! This must have broken at some point late during #2025, because I had tested it before and confirmed it working.

Thanks for catching that @Soean!

This reminds me... it's an early release, but we should really add unit test coverage. :)

Since this is a rather critical bug/limitation, I'll publish this fix in a 1.0.1.

@felixarntz felixarntz changed the title View Transitions: Fix reference in settings.php for selector options Fix view transitions setting values not being saved Jun 4, 2025
@felixarntz felixarntz added this to the view-transitions 1.0.1 milestone Jun 4, 2025
@felixarntz felixarntz merged commit 7421594 into WordPress:trunk Jun 4, 2025
13 checks passed
@Soean Soean deleted the fix/view-transition-settings-save branch June 4, 2025 16:44
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] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants