Table of Contents
This has been a long time coming, and it’s finally live now. For this refactoring update, I have employed around 50 testers with various websites and content. Each tester had one or more websites. This gave me a lot of visibility into the user intent and specific scenarios and use cases.
Originally, the Admin Menu Tree Page View plugin was built for WordPress 4.9 and lower. It added a tree-like page hierarchy directly under the Pages top level menu item in the WordPress Dashboard. This was done by “hijacking” the menu, and inserting the tree right before the closing </li>
element.
This had, obviously, some cons, and the plugin had some conflicts with other Dashboard UI plugins (not that many, to be honest, but enough to break the user experience). Another con was the actual load time for websites with tons of pages and parent/child relationships. Trying to move this functionality to an AJAX call, had the unpleasant effect of making the Dashboard jumpy and jittery, as the pages were populated.
More Custom Post Types!
Another request from lots of users was to add more custom post types, and this was simply impossible for large websites, as the Dashboard menu became way too long to be manageable, and the WordPress back-end became slow to unresponsive, the more content a website had.
The solution here was to move the pages to a top level menu page. This increased the “one click away” feature to “two clicks away”, which is not a bad trade-off in my opinion, especially when all public post types are now available in a hierarchical tree layout. Having a separate page now removed the need for collapsing the child <ul>
elements, as the purpose of this plugin is to quickly see all your pages in a “bird’s eye view” manner.
New Features
New Top Level Menu Item
All public post types are now available on a separate page, by selecting a post type from a dropdown menu.
Better Performance
The Dashboard menu is untouched, and no hacky HTML is present. The plugin works perfectly in WordPress installations with lots of public post types in a tree hierarchy.
Removed Features & Functionality
As some of the plugin’s features became redundant, they needed to be removed. Expanding and collapsing the child <ul>
elements was no longer needed, so 2 JavaScript resources have been removed, along with 200 lines of CSS and 3 external images (specifically from https://ajax.googleapis.com/
). The cookies script used to remember expanded/collapsed items was also removed.
There are several plugins that offer a similar functionality, but they all have some shortcomings. Some are too heavy, code-wise, some are too heavy, feature-wise and some simply paid (nothing wrong with that).
What’s Next?
This is next on my list:
- Add caching for post types
- Remove jQuery dependency
- Remove jQueryUI dependency
- Improve dragging and dropping to work inside child elements
- Reconsider expand/collapse functionality in a better, non-intrusive way
- Add a “Trash” link to the post type pop-up