-
-
Notifications
You must be signed in to change notification settings - Fork 110
Description
When unlimited custom fields land in core, it might be a good time to consider how to permit the fields to be laid out.
The implementation as it stands includes a 'position' item for each custom field defined. This allows you to control the order of them, but still means they'll all be lumped into the 'custom fields' area in the side bar. This is less than optimal.
A few thoughts:
-
Assume that any 'textarea-like' fields go in the main column beneath body and excerpt, and any other fields go in the custom fields twisty. If we (internally) designate Body as field 'a' and Excerpt as field 'b' then such custom fields could be inserted 'above' the Body by setting a position lexicographically before 'a' (e.g. numbers). To insert between Body and excerpt, the position could be 'aa' and after it could be anything after 'b'. This isn't exactly friendly, though it would work.
-
Ditch the position and permit fields to be dragged/dropped around the Write panel, then remember the layout, perhaps per user? And/or per section?
-
Permit optional blocks to be removed entirely - again, remembered per user/section perhaps? Key blocks can be moved but not deleted. But what happens when a block is removed (e.g. an 'X' is clicked alongside the field)?
One thing that might be worth considering is some kind of "tray" of fields/blocks that are currently not on-screen. Be that custom fields, excerpt, category block, meta data block, etc. Maybe if you click a button that signifies you want to edit the panel, you see this tray/sidebar.
Or maybe it's there all the time, like a drawer, waiting to be slid open and stuff dragged into/out of it? So if you want to ditch a field, open the 'drawer' and drag it in there (or maybe clicking 'X' against a field will do that without having to drag it in; then you only need to open the drawer if you want to get stuff back out). A counter on the drawer handle could show how many fields are available inside.
Perhaps we consider the way Android does management of icons on the app screens. You tap "Edit" and all the icons become draggable. You can drag them to the trash or reorder them, then just tap 'done' and your UI is how you set it. Fairly simple and intuitive (with the obvious exception being dragging one app on top of another to make a group: that's just bonkers UX).
Whether we can factor this kind of thing in, or if there's something better I don't know yet. But it beats having a tonne of prefs.
Things to concern ourselves with:
- Do only admins get to do this on behalf of users? Or do all users get to do it?
- Is it done per user or per group/role?
- Can a layout be set for each Section? Does that overcomplicate things and we should defer that to plugins? It does mean Ajax to switch things when a Section is changed... and what then happens to any content that's already set, but isn't deemed useful in this Section? Ditch it on Save if it's missing/the field's in the drawer?
- If per-Section layouts can be defined, what happens with other panels that don't rely on Sections? Inconsistent.
- How to store all this customisation info. localStorage means per device and only for a user. As a (global or per-user / per-group) pref means it works across the board, which might not suit if you hop between mobile and desktop.
Lots to think about. Ideas more than welcome.