Skip to content
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

Add a way to mark "stale" replacement variables in the Google preview #14589

Open
afercia opened this issue Mar 19, 2020 · 0 comments
Open

Add a way to mark "stale" replacement variables in the Google preview #14589

afercia opened this issue Mar 19, 2020 · 0 comments

Comments

@afercia
Copy link
Contributor

afercia commented Mar 19, 2020

Is your feature request related to a problem? Please describe.

Some replacement variables can't be updated "on the fly" while users change related values.

There are just too many fields or other form controls to listen to that affect some replacement variables. An example of this is the WooCommerce price variable. See https://github.com/Yoast/wpseo-woocommerce/pull/556

Screenshot 2020-03-19 at 12 19 47

This value depends on:

  • the regular price
  • the sale price, if any
  • the "from" and "to" sale price dates, if any
  • whether the "to" sale price date is expired
  • any tax applied to the product, whether the price includes or excludes taxes
  • for variable products: whether any variation price has been changed

Listening to changes for all these values would likely be a "can of worms".

Similarly, other replacement variables may have the same problem.

Describe the solution you'd like

This was quickly discussed internally. @jdevalk suggested to mark in some way the stale variables in the snippet editor, maybe using a tooltip. Whether it's a tooltip or something else, we should find a way to inform users that variable is not updated and users need to save the product to reflect the change in the Google preview

Why do you think this feature is something we should consider for the Yoast SEO plugins?

To give users correct feedback about the Google preview state.

Additional context

This would need changes in both Yoast SEO and the SnippetPreview / SnippetEditor JavaScript components.

It could be done similarly to how the "highlighted words" work. I played a bit with this already and have some Proof Of Concept code.

More advanced changes for products in the Google preview:
https://github.com/Yoast/featurerequests/issues/480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants