Commit Graph

15 Commits

Author SHA1 Message Date
Jake Spurlock 9ed92faaca Build/Test Tools: Enable JSDocs to be linted with ESLint.
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands:

* `npm run lint:jsdoc`
* `npm run lint:jsdoc:fix`

The latter will run the linter and try to fix an possible issues automatically.

Fixes #43828.
Props netweb, atimmer, kamataryo, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48650 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 23:33:51 +00:00
Jake Spurlock c3cdd9c962 Customize: Ensure that widgets and nav-menus can be closed after entering content.
Previously, the ⌧ button would close the search panel, or remove the results. This restores that, in addition pressing escape will do the same.

Fixes #48198.

Props garrett-eclipse, tobifjellner, afercia, JavierCasares.



git-svn-id: https://develop.svn.wordpress.org/trunk@48461 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 20:13:49 +00:00
Sergey Biryukov 196859f90f Customize: When a menu item is removed from the menu, uncheck its source item on the available items panel.
Props donmhico, garrett-eclipse, audrasjb.
Fixes #46830.

git-svn-id: https://develop.svn.wordpress.org/trunk@47356 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 11:12:18 +00:00
Sergey Biryukov cfc3b57488 Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:43:23 +00:00
Sergey Biryukov a03bb54546 Docs: Replace `@returns` tags in JS docs with `@return`.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead:
https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@46800 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-29 17:59:47 +00:00
Sergey Biryukov ea5bfe134f Docs: Add missing full stops to `@returns` tags in JS docs, per the documentation standards.
Props shital-patel, kalpshit.
Fixes #48305.

git-svn-id: https://develop.svn.wordpress.org/trunk@46799 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-29 16:55:01 +00:00
Jonathan Desrosiers 6d413590b7 Customize: Formally deprecate unused Customizer classes.
The `WP_Customize_New_Menu_Control` and `WP_Customize_New_Menu_Section` PHP classes and `wp.customize.Menus.NewMenuControl` JS class were deprecated in 4.9 through [42034] with the intention of removing them in 5.0. Since more time has passed than originally intended, this change leaves `WP_Customize_New_Menu_Control` and `WP_Customize_New_Menu_Section` to prevent any potential backwards compatibility issues, and formally deprecates them. The `wp.customize.Menus.NewMenuControl` JS class is removed.

Props weston.ruter, matthias-reuter, jrf.
Fixes #42364.

git-svn-id: https://develop.svn.wordpress.org/trunk@46637 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 16:46:55 +00:00
Sergey Biryukov 21de64fc34 Customize: Remove duplicate `attr_title` assignment in `api.Menus.MenuItemControl.renderContent()`.
See #47838.

git-svn-id: https://develop.svn.wordpress.org/trunk@46401 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-05 02:31:14 +00:00
Jake Spurlock 2ff8e68e15 Menus: Replace http with https in placeholders.
Encourage the use of https with the placeholder text in menus.

Fixes #46312
Props aksl95, audrasjb, celloexpressions, SergeyBiryukov, jorbin.


git-svn-id: https://develop.svn.wordpress.org/trunk@46330 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-26 20:30:59 +00:00
Jake Spurlock c957e2573e Update wp.a11y.speak() to sanitize HTML before display.
Props iandunn, adamsilverstein, sstoqnov, peterwilsoncc


git-svn-id: https://develop.svn.wordpress.org/trunk@45979 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 17:11:22 +00:00
Sergey Biryukov fb189a6d5c Customizer: Trim whitespace from custom link URLs.
This complements a similar fix for the Menus screen in [45655].

Props donmhico, audrasjb.
Fixes #47888. See #47723.

git-svn-id: https://develop.svn.wordpress.org/trunk@45869 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-21 00:26:45 +00:00
Gary Pendergast fa886b237f Admin: Don't use the `keyup` event in addition to the `input` event.
The `keyup` event was used to provide support for IE8, where which doesn't support the `input` event. As we dropped IE8 support some time ago, this was simply adding unnecessary complexity and double-event triggers.

Props dlh, afercia.
Fixes #32882.



git-svn-id: https://develop.svn.wordpress.org/trunk@44539 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 02:56:24 +00:00
Jonathan Desrosiers 26d5633417 Docs: Future-proof comments referencing 5.0 TODOs.
Some Customizer-related files contain inline comments referencing work to do for #42364 for 5.0. Those comments are now outdated as #42364 was moved to the 5.1 milestone.

Merges [43887] to trunk.

Props dlh, pento.
Fixes #45115.

git-svn-id: https://develop.svn.wordpress.org/trunk@44228 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 04:47:41 +00:00
Anton Timmermans 78f2b0e731 Docs: Add file doc `@output` annotations.
These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of
truth.

The `build` folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the
project.

Props adamsilverstein, herregroen, omarreiss, pento.
Fixes #44361.


git-svn-id: https://develop.svn.wordpress.org/trunk@43347 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-15 10:18:44 +00:00
Gary Pendergast ef37f002ee Once upon a midnight dreary, while I coded, weak and weary,
In many a strange and curious file of forgotten lore—
While I pondered, blaming Nacin, my notifications suddenly awakened,
As of someone quietly DMing;—DMing me, I can’t ignore.
“’Tis some contributor,” I muttered, “DMing me an idea or four—
            Only this and nothing more.”

Ah, distinctly I remember, at WordCamp US, last December;
A mad proposal nearly laid me—down out cold—upon the floor.
Curious, I listened closely;—to a plan I agreed with, mostly—
A way to make our JavaScript—JavaScript which was a chore—
Maintainable, extendable, for the future, is what I saw.
            Guten-ready for evermore.

Open here I switch to Slack, when, with many a patch and hack,
In there stepped Omar, a JavaScript developer hardcore;
Pronouncing all the changes fit; ready now to be commit;
“There’s nothing else for us to do,” DMing me, “It’s done!” he swore—
“No longer random guessing at which file need next be explored—
            Let’s move on, we’re all aboard.”

Moved all together, grouped and managed, in folders all is packaged,
The code had all been cleaned and tidied, important parts moved to the fore,
“Though this change be useful here,” I said, “it is too large, I fear,
We couldn’t manage such a patch, we’ve done nothing like this before—
Tell me where doth go this change, change to make our codebase soar!”
            Quoth Omar, “In WordPress Core.”

Props omarreis for shepherding this significant change.
Props adamsilverstein, aduth, atimmer, dingo_bastard, frank-klein, gziolo, herregroen, jaswrks, jeremyfelt, jipmoors, jorbin, netweb, ocean90, pento, tjnowell, and youknowriad for testing, feedback, discussion, encouragement, commiserations, etc.
I make no apologies for this commit message.
Fixes #43055.



git-svn-id: https://develop.svn.wordpress.org/trunk@43309 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-23 10:04:22 +00:00