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

Customizer: Simple Payments Widget does not work on WP-Admin's Appearance > Widgets interface. #25576

Closed
rodrigoi opened this issue Jun 19, 2018 · 9 comments
Labels
Jetpack Simple Payments [Status] Stale [Type] Bug When a feature is broken and / or not performing as intended

Comments

@rodrigoi
Copy link
Contributor

rodrigoi commented Jun 19, 2018

The Simple Payments Widget customizer form does not load correctly on Appearance > Widgets.

screen shot 2018-06-18 at 22 45 08

@rodrigoi rodrigoi added Jetpack Simple Payments [Type] Bug When a feature is broken and / or not performing as intended labels Jun 19, 2018
@rodrigoi rodrigoi added this to the Simple Payments Sprint milestone Jun 19, 2018
@Copons
Copy link
Contributor

Copons commented Jun 21, 2018

As far as I can see, there are two main reasons why this doesn't work:

  • The customizer.js is only enqueued in the Customizer (easily fixable).

  • The widget events (such as widget-added, widget-synced, and widget-updated) are not triggered in the Widgets page, or are not triggered with the same frequency as in the Customizer.

Now, this second reason is quite a problem.
Maybe it's worth refactoring customizer.js so that it doesn't use any custom events, but instead relies heavily on jQuery's event delegation to target dynamically added elements? 🤔

@rodrigoi
Copy link
Contributor Author

Maybe it's worth refactoring customizer.js so that it doesn't use any custom events, but instead relies heavily on jQuery's event delegation to target dynamically added elements?

we rely on those customizer events to handle the media library and we'll need them (in particular widget-updated to improve the handling of enable/disable states on form elements. Even if we remove all the event delegation for components, we'll still need them.
Do we have alternative events while on the Widgets interface?

@Copons
Copy link
Contributor

Copons commented Jun 21, 2018

Do we have alternative events while on the Widgets interface?

So, I'm not an expert of this kind of things, but (one of) the major pain point is that widget-sync apparently never triggers in the Widgets page, but I have no idea if we've got alternatives there.

One passage I'm lost in the widget code, is how we fill the Edit Button form with the button data.
I thought we fed it via the $instance variable, but that's not the case, and I'm frankly lost at that point. 😄
Maybe if I get unstuck there I can keep trying with workarounds. 🤔

@Copons
Copy link
Contributor

Copons commented Jun 22, 2018

@rodrigoi Considering that we're close to the JP deadline, I've opened a PR that (hopefully temporarily) hides the create/edit buttons in the Widgets page: Automattic/jetpack#9811

I think we shouldn't pursue the usual quick and dirty workaround here just to ship on time, but instead we should try and figure out the best way to solve this issue once and for all.

@gwwar
Copy link
Contributor

gwwar commented Jun 22, 2018

@Copons Maybe let's get a post up asking for opinions/options. If we feel like a proper solution won't make it in time, we can try using the temp fix for this release, and aim for a proper fix on this issue for the one after.

@Copons
Copy link
Contributor

Copons commented Jun 23, 2018

@gwwar I'll ask for opinions, but the JP deadline is on Tuesday, so I'd rather have this backup PR ready to be merged in the feature branch. 🙂

@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

@cuemarie
Copy link

👋 Hey folks! Since this issue has been inactive for quite some time, KitKat has made the decision to close it.

  • Internal reference, for more on this decision: pdqkMK-14B-p2

If you think this issue warrants another look, here are some next steps!

  1. Report anew: A new report with more current details and steps to replicate may be the best way to renew attention on this issue. Feel free to refer back to this closed issue in your report!
  2. Reopen: If you feel the issue still matches the context/history here, you can also reopen the issue and add fresh logs, screenshots and steps to reproduce.

Thanks for your involvement!

@cuemarie cuemarie closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jetpack Simple Payments [Status] Stale [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants