Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Customizer: Add widget blocks section. #16204
This PR adds the widget blocks editor to a new section in the Customizer. The
This is still a work in progress as
After those issues are resolved, more work needs to be done to make the live preview work without page refreshes.
How has this been tested?
This has only been tested manually.
Types of Changes
New Feature: Add a widget blocks section to the Customizer.
requested review from
Jun 17, 2019
3 times, most recently
Jun 17, 2019
The issues have been fixed. They were caused by an incompatibility between how widget blocks are stored and legacy widgets sanitization for the Customizer. Next up, live-preview enhancements!
Hi @epiqueras, thank you for working on this task! There is good progress here in a short amount of time :)
@jorgefilipecosta 's feedback.
The next tasks would be not rendering the
youknowriad left a comment
I took this for a spin, and it's great. I feel with the saving and previewing we kind of addressed the most difficult challenges of this screen.
Some things that would be good to improve.
What do you think?
I also had some PHP notices while saving the areas
Yeah, that would look a lot better. I'll follow up this PR with that as suggested.
This makes a lot of sense, specially because the current tree is still being modified in parallel, but what if we have
I'll fix those in the new component tree in this PR, should be simple.
Looks like new Customizer PHP incompatibilities with post IDs being used as sidebar content. There's probably a hook to bailout from whatever it's trying to do, I'll look into it after the other changes.
Hi @epiqueras, excellent work here, it is fantastic that you managed to find solutions that allow us to test complex feature like the customizer previews
I'm noticing a bug that was not happening in the tests yesterday, not sure if it is something in my setup, it would be good to have a double check here:
It works as expected for me. But I think one changeset has to be taking precedence over the other. I don't think showing both edit options at the same time is a good idea. It will confuse users at best, and cause bugs at worst. Can we hide the legacy option if the new one is enabled?
jorgefilipecosta left a comment •
Thank you for all the work, the iterations and diving deep on this feature
I think we can merge (right after Travis is happy) and continue the development in other PR's
Travis is identifying a lint problem on FILE: /app/lib/customizer.php. We should also update the "since versions" on some functions. Feel free to apply these changes and merge after.
For future reference/tests, I'm also writing here potential issues found during my tests. I don't think they are blockers.
Some issues I noticed that I think it is because we did not have yet a mechanism to handle the case:
Things that may not be related/may be something on my setup/ plugins I have, etc:
Another issue I noticed is that if we add blocks to an area. We save everything; we reload the customizer we go to the standard widgets section; we delete the "Blocks Area" widget, and we try to re-add other widgets, the widget add does not work, and it is impossible for the user to re-add widgets using just the customizer. So if a user tries our experimental section and then wants to revert the only option is using the old widget screen, it is impossible using just the customizer, and some users may not be aware the widgets screen exist and use the customizer all the time. I guess this issue is the one with the most priority.