[wp-trac] [WordPress Trac] #42321: Issue in create a new menu
WordPress Trac
noreply at wordpress.org
Wed Oct 25 13:07:25 UTC 2017
#42321: Issue in create a new menu
--------------------------------------+---------------------------------
Reporter: ritukaushal5693 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 4.8.2
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses: ui, administration
--------------------------------------+---------------------------------
Comment (by welcher):
@ashokrd2013 thanks for the patch!
Just a couple feedback items for you:
1. Please generate the patch from the root of the entire repo - the same
level as the `/src` and `/tests` folders. This allows the patch be applied
very easily and if there is a need for unit tests, they can be in the same
diff.
2. Can we use `_.debounce` on the keyup event to reduce the number of
times the callback gets run?
3. There are some coding standard issues in the patch. Have a read of
https://make.wordpress.org/core/handbook/best-practices/coding-
standards/javascript/#spacing .
4. It's a small thing but`menuName = $( document.getElementById( 'menu-
name' ) )` is more performant than `menuName = $( '#menu-name' )`-
https://jsperf.com/wrap-an-element-or-html-collection-in-jquery
Does this patch also address the issue with the missing border on the
Create Menu button as well? If not, no worries we can iterate on it.
Thanks for working on this!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42321#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list