Another update and request for feedback, this time for improvements to editing forms! This is a part of our Q3 OpenTEAM ACTION funding, more details here . Hopefully these features can make creating and editing Assets + Logs a much more pleasant experience. There are two main changes:
Sidebar
First, this implements Gin theme’s “Content Form Sidebar”. Gin has provided this sidebar for editing Drupal nodes and recently made it available for other entity types. This does a few things:
- The sidebar is a good place to put “metadata” fields.
- It also moves the “Save” button to the top of the page which means no more scrolling to the bottom to save!
- Sidebar groups can be collapsed as well as the entire sidebar hidden
- Last, this is a good place for us to provide additional revision/authoring information that we do not currently show on the edit form: author, changed and created timestamps.
Tabs
Second, we can add vertical tabs to group fields in the edit form to:
- Group similar fields, easier navigation to fields of interest
- Decrease overall height of the form, less scrolling
Right now I have hard-coded the set of tabs you see in these screenshots. Modules cannot provide additional tabs, although that could be a followup if there is a need. But modules can define which tab fields should go in. Tabs can be in the “main” region or the “sidebar”. Here is an overview of the tabs as I thought of them:
Main tabs
- “Entity” (Displays as Asset/Log)**: Provides important & required fields: name, status, timestamp, bundle type (animal type, land type, etc). Only in the “main” region when creating new assets/logs so that the required fields are easily accessible.
- “Bundle” (Displays as the bundle, Animal, Harvest): Provides bundle-specific fields. The animal sex or birthdate, or a harvest lot number or source information.
- Info: Provides generic base fields that all assets/logs have. Notes, ID Tags, asset parents, log assets, etc. This is the default tab where fields are located.
- Location: Provides fields related to geometry or location. Geometry (map), asset location/fixed boolean, and log location reference.
- Files: Provides the file and image upload fields.
Sidebar tabs
- “Entity” (same as above)**: This tab moves to the sidebar when editing an existing asset/log. Thought being that we can save some space, these fields are changed less often.
- Meta: Provides fields for categorizing, flagging, or assigning ownership.
- Revision info: Provides the revision log message text box with additional authoring info (author, changed, created timestamp)