-
Notifications
You must be signed in to change notification settings - Fork 55
fix(content-gifting): ux tweaks and other fixes #4318
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
Conversation
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.
Pull Request Overview
This PR implements UX tweaks and fixes for the content gifting feature, focusing on proper handling of URL query parameters, metering configuration warnings, and UI improvements when users reach their gifting limit.
- Prioritize URL query arg over cookie for gift link authentication
- Add warning/error notices in the wizard when gates have metering enabled
- Hide Jetpack sharing service when gifting is unavailable due to metering
- Disable URL input selection when member has reached gifting limit
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wizards/audience/views/setup/content-gating.js | Adds error and warning notices for metering configuration issues |
| src/content-gate/content-gifting.js | Prevents URL input interaction when gifting limit is reached |
| includes/wizards/audience/class-audience-wizard.php | Passes content gifting validation data to JavaScript |
| includes/content-gate/content-gifting/class-content-gifting.php | Implements gifting availability checks, metering notices, query arg prioritization, and Jetpack integration control |
| includes/content-gate/class-content-gate.php | Adds post status to gate data structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
includes/content-gate/content-gifting/class-content-gifting.php
Outdated
Show resolved
Hide resolved
| copyButton.disabled = true; | ||
| } else { | ||
| urlInput.disabled = false; | ||
| delete urlInput.style.pointerEvents; |
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.
nit: urlInput.style.pointerEvents = '' or urlInput.style.removeProperty('pointer-events') would be more conventional for style props (though delete works in practice).
|
Hey @miguelpeixe, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
# [6.25.0-alpha.7](v6.25.0-alpha.6...v6.25.0-alpha.7) (2025-11-19) ### Bug Fixes * **content-gifting:** ux tweaks and other fixes ([#4318](#4318)) ([ae2de8f](ae2de8f))
# [6.25.0](v6.24.3...v6.25.0) (2025-11-24) ### Bug Fixes * **content-gifting:** ux tweaks and other fixes ([#4318](#4318)) ([ae2de8f](ae2de8f)) * **contrib-meter:** ensure percentage follows bar progress when using linear style ([#4320](#4320)) ([3b9208b](3b9208b)) * display an error when a Collection title already exists ([#4268](#4268)) ([8055c83](8055c83)) * **newspack-ui:** remove margin-top for helper text when inside input-card ([#4285](#4285)) ([007d2c1](007d2c1)) * prevent spawning of Accessibility Statement pages ([#4237](#4237)) ([e1d12b4](e1d12b4)) * repeat button block styles in collections for WP 6.9 ([#4319](#4319)) ([e1386c9](e1386c9)) * **stripe-gateway:** disable Link by default on new installs ([#4288](#4288)) ([213a252](213a252)) ### Features * content gifting ([#4207](#4207)) ([f0c4d8f](f0c4d8f)) * content gifting ([#4207](#4207)) ([3880833](3880833)) * **content-gifting:** custom article link expiration ([#4313](#4313)) ([566ad6d](566ad6d)) * **contrib-meter:** add contribution meter block ([#4305](#4305)) ([5634314](5634314)) * **contrib-meter:** add contribution meter block ([#4305](#4305)) ([dc894bd](dc894bd)) * **contrib-meter:** create block patterns ([#4311](#4311)) ([e318c01](e318c01)) * **contrib-meter:** update cache invalidation logic and end date ([#4314](#4314)) ([d7b54aa](d7b54aa)) * **cover-fees:** support non-donation purchases ([#4298](#4298)) ([87e126f](87e126f)) * fix user login problem ([f834b3a](f834b3a)) * merge remote-tracking branch 'origin/trunk' into alpha ([748702f](748702f)) * **my-account:** update mobile navigation to use hamburger menu and display current page title ([#4303](#4303)) ([764a7d3](764a7d3)) * **my-account:** use newspack-ui in the sidebar ([#4302](#4302)) ([87cf937](87cf937)) * **newspack-icons:** add key ([#4278](#4278)) ([f275328](f275328)) * **newspack-ui-icons:** align icons with WordPress/Newspack set and use shared class ([#4281](#4281)) ([52a0eac](52a0eac)) * **ras:** implement OAuth redirect handling for RAS login ([#4290](#4290)) ([b84aae1](b84aae1)) * **ras:** implement OAuth redirect handling for RAS login ([#4290](#4290)) ([22586e1](22586e1)) * **rss:** allow RSS feed customization with new extra tags filters ([#4231](#4231)) ([34c235e](34c235e)) * **rss:** change rss media hook and use CDATA on media desc ([#4280](#4280)) ([8292c7a](8292c7a)) * **subscriptions:** change frequency intervals strategy ([#4301](#4301)) ([b652dba](b652dba)) * trigger alpha release ([617fa29](617fa29)) * **ui:** spinner tweaks ([#4300](#4300)) ([31f3e5e](31f3e5e)) * **variation-modal:** display variation description ([#4286](#4286)) ([0f5e017](0f5e017)) * **web-preview:** update components with new dropdown menu and title ([#4292](#4292)) ([6015eae](6015eae))
# [6.26.0-alpha.1](v6.25.1...v6.26.0-alpha.1) (2025-11-27) ### Bug Fixes * **content-gifting:** ux tweaks and other fixes ([#4318](#4318)) ([952dd83](952dd83)) * **contrib-meter:** ensure percentage follows bar progress when using linear style ([#4320](#4320)) ([cbe8665](cbe8665)) * hide Content Gate CPT from WP Admin menu ([#4321](#4321)) ([70bbe7e](70bbe7e)) * make some Collections spacing more specific to archive pages ([#4293](#4293)) ([21daeaf](21daeaf)) * **media:** move default image UI to Advanced Settings ([#4296](#4296)) ([a22f06d](a22f06d)) * **modal-checkout:** prevent session reload after new customer account ([#4310](#4310)) ([89208fc](89208fc)) * **my-account:** add payment method query var ([#4325](#4325)) ([a7f2cb1](a7f2cb1)) * **my-account:** select font size ([#4324](#4324)) ([31a48c0](31a48c0)) * repeat button block styles in collections for WP 6.9 ([#4319](#4319)) ([6e3c5f8](6e3c5f8)) * **subscription-modal:** limited subscriptions ([#4309](#4309)) ([715f3c9](715f3c9)) ### Features * add autocomplete + token + multiselect component ([#4289](#4289)) ([84a8eda](84a8eda)) * **content-gifting:** custom article link expiration ([#4313](#4313)) ([c00f054](c00f054)) * listen to gforms events for newsletters ([#4312](#4312)) ([2f0e0e3](2f0e0e3)) * **my-account:** add "Product" column to the Subscriptions page ([#4323](#4323)) ([ba91e4c](ba91e4c))
|
🎉 This PR is included in version 6.26.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [6.27.0-alpha.1](v6.26.0...v6.27.0-alpha.1) (2025-12-02) ### Bug Fixes * **content-gifting:** ux tweaks and other fixes ([#4318](#4318)) ([952dd83](952dd83)) * **contrib-meter:** ensure percentage follows bar progress when using linear style ([#4320](#4320)) ([cbe8665](cbe8665)) * hide Content Gate CPT from WP Admin menu ([#4321](#4321)) ([70bbe7e](70bbe7e)) * make some Collections spacing more specific to archive pages ([#4293](#4293)) ([21daeaf](21daeaf)) * **media:** move default image UI to Advanced Settings ([#4296](#4296)) ([a22f06d](a22f06d)) * **modal-checkout:** prevent session reload after new customer account ([#4310](#4310)) ([89208fc](89208fc)) * **my-account:** add payment method query var ([#4325](#4325)) ([a7f2cb1](a7f2cb1)) * **my-account:** select font size ([#4324](#4324)) ([31a48c0](31a48c0)) * repeat button block styles in collections for WP 6.9 ([#4319](#4319)) ([6e3c5f8](6e3c5f8)) * **subscription-modal:** limited subscriptions ([#4309](#4309)) ([715f3c9](715f3c9)) ### Features * add autocomplete + token + multiselect component ([#4289](#4289)) ([84a8eda](84a8eda)) * **content-gifting:** custom article link expiration ([#4313](#4313)) ([c00f054](c00f054)) * listen to gforms events for newsletters ([#4312](#4312)) ([2f0e0e3](2f0e0e3)) * **my-account:** add "Product" column to the Subscriptions page ([#4323](#4323)) ([ba91e4c](ba91e4c))
|
🎉 This PR is included in version 6.27.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [6.27.0](v6.26.4...v6.27.0) (2025-12-08) ### Bug Fixes * **content-gifting:** ux tweaks and other fixes ([#4318](#4318)) ([952dd83](952dd83)) * **contrib-meter:** ensure percentage follows bar progress when using linear style ([#4320](#4320)) ([cbe8665](cbe8665)) * hide Content Gate CPT from WP Admin menu ([#4321](#4321)) ([70bbe7e](70bbe7e)) * make some Collections spacing more specific to archive pages ([#4293](#4293)) ([21daeaf](21daeaf)) * **media:** move default image UI to Advanced Settings ([#4296](#4296)) ([a22f06d](a22f06d)) * **modal-checkout:** prevent session reload after new customer account ([#4310](#4310)) ([89208fc](89208fc)) * **my-account:** add payment method query var ([#4325](#4325)) ([a7f2cb1](a7f2cb1)) * **my-account:** select font size ([#4324](#4324)) ([31a48c0](31a48c0)) * repeat button block styles in collections for WP 6.9 ([#4319](#4319)) ([6e3c5f8](6e3c5f8)) * **subscription-modal:** limited subscriptions ([#4309](#4309)) ([715f3c9](715f3c9)) ### Features * add autocomplete + token + multiselect component ([#4289](#4289)) ([84a8eda](84a8eda)) * **content-gifting:** custom article link expiration ([#4313](#4313)) ([c00f054](c00f054)) * listen to gforms events for newsletters ([#4312](#4312)) ([2f0e0e3](2f0e0e3)) * **my-account:** add "Product" column to the Subscriptions page ([#4323](#4323)) ([ba91e4c](ba91e4c))
|
🎉 This PR is included in version 6.27.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
NPPD-1014 NPPD-1015 NPPD-1016 NPPD-1017
A few tweaks to content gifting:
How to test the changes in this Pull Request:
Other information: