Widgets panel will not wait to display until the preview loads.
Also fixes problems with `margin-top` in panels where other panels' `active` states change, as well as ensuring sections of deactivated panel collapse before panel is hidden to prevent the pane from becoming empty of controls.
Fixes#33052.
Fixes#33567.
git-svn-id: https://develop.svn.wordpress.org/trunk@35231 602fd350-edb4-49c9-b593-d223f7449a82
The Menu Customizer feature includes a performance technique whereby the controls for nav menu items are only embedded into the DOM once the containing menu section is expanded. This commit implements the same DOM deferral for widgets but goes a step further than just embedding the controls once the widget area's Customizer section is expanded: it also defers the embedding of the widget control's form until the widget is expanded, at which point the `widget-added` event also fires to allow any additional widget initialization to be done. The deferred DOM embedding can speed up initial load time by 10x or more. This DOM deferral also yields a reduction in overall memory usage in the browser process.
Includes changes to `wp_widget_control()` to facilitate separating out the widget form from the surrounding accordion container; also includes unit tests for this previously-untested function. Also included are initial QUnit tests (finally) for widgets in the Customizer.
Fixes#33901.
git-svn-id: https://develop.svn.wordpress.org/trunk@34563 602fd350-edb4-49c9-b593-d223f7449a82
While these two tests will help ensure we don't repeat our mistakes, they mostly help lay the foundation for more tests that still need to be written.
See #32688
Props adamsilverstein, jorbin
git-svn-id: https://develop.svn.wordpress.org/trunk@33451 602fd350-edb4-49c9-b593-d223f7449a82
Also only exclude these characters for the `words` type. They should be counted for other types.
Add the ASCIIOnly option to the uglify config to preserve escaped unicode characters.
See #30966. Fixes#27391.
git-svn-id: https://develop.svn.wordpress.org/trunk@33292 602fd350-edb4-49c9-b593-d223f7449a82
* The WordCounter should only do one thing: count words. This makes it also easier to test.
* Add some really basic unit tests.
* Instead of only refreshing the count on enter and delete, refresh the count when the user stops typing. Also look at paste and content changes in TinyMCE.
* Use `match` instead of `replace` when it is appropriate.
* More readable code.
See #30966. Fixes#26620.
git-svn-id: https://develop.svn.wordpress.org/trunk@32856 602fd350-edb4-49c9-b593-d223f7449a82
* If the resulting text node is empty, don't remove all the content from the paragraph.
* If there's an empty text node at the start of the paragraph, ignore it and consider the next node to be the start.
See #31441.
git-svn-id: https://develop.svn.wordpress.org/trunk@32832 602fd350-edb4-49c9-b593-d223f7449a82
This plugin can automatically format text patterns as you type. It includes two patterns: unordered (`* ` and `- `) and ordered list (`1. ` and `1) `). If the transformation in unwanted, the user can undo the change by pressing backspace, using the undo shortcut, or the undo button in the toolbar.
This is the first TinyMCE plugin that has unit tests and there's some good groundwork for adding tests to existing plugins in the future.
First run. See #31441.
git-svn-id: https://develop.svn.wordpress.org/trunk@32699 602fd350-edb4-49c9-b593-d223f7449a82
* Always fall back to using the default template if no custom template exists.
* Provide a set of default params when constructing new `Section` and `Panel` objects.
Includes QUnit tests.
Props celloexpressions, westonruter, ocean90.
Fixes#30737.
git-svn-id: https://develop.svn.wordpress.org/trunk@32681 602fd350-edb4-49c9-b593-d223f7449a82
Includes tests for the broken `activate()`/`deactivate()` methods, which were fixed in [30871].
props westonruter.
see #30701.
git-svn-id: https://develop.svn.wordpress.org/trunk@30919 602fd350-edb4-49c9-b593-d223f7449a82
- Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink. 9a2d01cc14
- Fixed nodeChanged selection issue where the image selection wouldn't be removed if you clicked right after/before it. dd729c67e0
- Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly. caadfb05dd
See #29310
git-svn-id: https://develop.svn.wordpress.org/trunk@29576 602fd350-edb4-49c9-b593-d223f7449a82
`ob_end_flush()` flushes the output buffer *and* turns output buffering off, same as `ob_get_flush()`.
props m_i_n.
see #28009 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@28217 602fd350-edb4-49c9-b593-d223f7449a82