Tuesday, March 31, 2020

OPUS Update for March 2020 - Sort on Multiple Fields, Improved Mobile Support

As we continue in these challenging times, we hope you will enjoy some of the new features we've provided for you this month:

  • The ability to sort on more than one metadata field at a time
  • Improved support for small mobile devices and tablets
  • A minor change to the Multiple Target List field to make your life easier

Multiple-Field Sort

There are many cases where sorting on a single metadata field is not enough to give you the ordering you might want. For example, if you sort on Planet, you have no control over what order the observations for a particular planet are presented in. OPUS has always added OPUS ID as a second sort field to guarantee determinism in the results, but what if you wanted to search first on Planet, then for a given planet on Instrument Name, then for a given Planet+Instrument Name on Intended Target Name, and then for a given Planet+Instrument Name+Intended Target Name on Observation Start Time? The OPUS API has supported this ability for awhile, but now the UI does too!

The current sort fields are presented near the top of the Browse and Cart tabs. The same sort order is used for both tabs, and for both the Gallery and Table views.


Each sort field is shown in order; OPUS ID is always required and must be the last field, so it is shown to the right of a vertical divider. The sort direction for each field can be flipped between ascending and descending by clicking on the field name and the arrows show the direction chosen (down is ascending and up is descending, representing how the observations will be displayed). All sort fields except the final OPUS ID can removed by clicking on the X.

To add a new field (maximum 9), click on the +. You will be presented with a drop-down list of all of the unused fields you have currently selected using Select Metadata. The new field you select will be added at the end of the list (but before OPUS ID). If you want to sort on a field that isn't shown, you need to first add it to the available list using Select Metadata. Once you've added a field to the sort order, you can remove it from the displayed fields using Select Metadata if you'd rather not see the value in the slideshow or table. You can also reorder the fields with drag-and-drop. Using these techniques we can produce the sort order discussed above:


In the Table view, each table header field that is in the sort order has a small number inside a circle. This number represents the position of that field in the sort order list. If a field is in the sort order, you can click on the table header for that field to flip its sort direction. If a field is not in the sort order, you can click on the table header to sort on that field. If there are only two or fewer fields (including OPUS ID) currently being sorted on, clicking on a table header field will replace the current sort with that field. This gives the same behavior that OPUS had previously. However, if there are more than two fields, you will be asked if you want to append the field you clicked on to the end of the sort order, or if you want to replace the entire sort order with that single field. Using Ctrl+click on a table header field is a short cut to append the field to the end of the sort order.

If you would like to reset the sort order to the default (Observation Start Time, OPUS ID), simply click on Sort by or its icon.

Improved Mobile Support

OPUS is now much more responsive and is usable in smaller browsers, all the way down to the size of an iPhone 5. As browser size decreases, some features (such as download links and feedback) are inaccessible because they make the screen too crowded and are unlikely to be used on a small mobile device anyway. Note that Safari (the default browser) on iOS has "features" (such as hiding and showing the URL navigation bar, and allowing pull-to-refresh even when there's nothing to refresh) that make using OPUS more difficult, and there is no way around these "features". If you want to have a better experience using OPUS on an iOS device, we suggest using Chrome instead.

Here is what OPUS looks like now on an iPhone 7:





As always, we welcome your feedback. Stay safe everyone.

No comments:

Post a Comment