Tainacan Beta 0.16 – Compound and User metadata types, Faceted Search Block, WordPress 5.4 Support

In times of social distancing, the existence of tools that enable institutions to organize and expose their digital collections becomes more relevant. Aware of this, today we made one of the biggest launches of Tainacan, bringing important changes – from the most notable to the most discreet – that we will cover in this article. It has been months of waiting since 0.15 and we are still tracing the path to 1.0. But believe us, it will be worth the wait 😉

What’s new

Introducing Compound Metadata

Imagine that your collection has several porcelain pieces from the imperial period. You have an item that is actually a set of cups. It is an item because the set is displayed together, everyone has the same author, the same date of manufacture and of course, the same characteristics such as their beautiful patterns. But there is an attribute that is more difficult to describe: the dimensions of the cups. Not only it is composed by two pieces of information in one (like the height and radius of each cup), but different cups can have these same values different from each other. This is a perfect case for building a compound metadatum:

Collection Metadata Configuration Screen, with the Dimensions compound metadatum configured.

Once inserted in your list of metadata, the compound metadata “Parent”, opens space to drag and drop “Children” metadata within itself. In the edition form of an item, the example above would look like this:

Preenchendo um metadado composto.

Although in this example the two child metadata are of the same type, we can have different types too! It is a powerful feature for Tainacan. It is worth noting that there are some restrictions on its usage (for example, importers and exporters are not yet mapped to it and it is not yet possible to have child Taxonomy metadata) so we recommend reading the documentation on the subject.

New metadata type: WordPress user

Every item on Tainacan has at least one relationship with an user logged into WordPress: its Author. But an item does not relate only to authors, maybe its items may be linked in some way to collaborators, managers, visitors … thinking about it, we’ve created a new type of metadata, which can be understood as a Relationship type metadata that instead of linking item with item, links item with an user:

An interesting option available in the configuration of this metadata is to set the Author of the Item as its default value. With it enabled, this metadata will always have the user creating the item as its initial value.

New Gutenberg block: the Faceted Search

There are at least 4 blocks that Tainacan offers to show items when creating a page or post for presenting your collection. All of these, however, work as limited versions of the complete item list, which is present on a Collection, Term, or Repository Items page. In there, we have access to filters, advanced search, visualization and pagination options. This is about to change with the arrival of the Faceted Search Block, or, in other words, the Complete Item List block:

Example of configuration of the faceted search block.

The main advantage is being able to assemble the item page fully customized – from the most complex to the simplest -, even if your theme does not support the special Tainacan pages. In addition, there are so many options for block configurations that we won’t even list them all here! Take a look at the Wiki and see everything possible with this block, to get to listings like the ones below without a line of code:

This block also comes as an alternative to a little-known feature of Tainacan: the shortcode (tainacan-search collection-id = x) that had the same function of generating the list of items on pages. It is still available, of course, and all options configurable by the block are also available via parameters for it.

New bulk action: copy values

When selecting items to perform a bulk edit, we have options such as “Remove values”, “Replace values”, “Add values”, etc. A new possibility now appears, that of “Copying values”, which will allow you to make copies of values of a certain metadata in another metadata of the same type. It can be useful, for example, to store information for security in a second metadata or even to exchange metadata from repository level to collection level.

In conjunction with the recently presented User metadata type, this allows newly created user type metadata to be able to receive the value already existing in the “Created by” field of the item, which is the Author himself.

WordPress 5.4. compatibility

At the end of March, WordPress released version 5.4. Bringing some interesting news to the block editor and privacy issues. We made some minor adjustments so that our blocks work well with these changes and you can enjoy the best of our tool.

Error popup on the Item edition form

Museum records with 50 metadata can be a nightmare to fill. Sometimes there is a mandatory metadata that has not been filled in, another that has an invalid value… and many times we only notice that these errors occurred after seeing in the lower bar of the item the warning: “There are errors in the form”. OK, but which errors? In an attempt to improve this workflow, we are introducing a new feature – which still needs to be improved – but which will certainly help anyone who goes through this situation:

Example of usage of the new Errors popup for navigting among error messages on the item edition form.

Improvements

  • Changes to the collection header interface for better clarity: all icons now have labels and a new background color:
Might look strange at first, but you will get used to 😉
  • Better accessibility and adaptation to new themes: scale of font size should now be more proportional among all elements: inputs, icons, labels, etc. For a brief demonstration of this, click to see in detail this comparison of what a child theme of TwentyTwenty (current default WordPress theme) looked like:
Notice that the font sizes are now more proportional to te theme, where the menus are considerably larger.
  • When you move the mouse to the bottom corner of the screen in the list of items for a second, the pagination bar appears. When approaching the top corner, if it is hidden, the search bar will appear. When applying any changes to the list, the scroll automatically returns to the top of the control bar:
  • Similarly, when opening a metadata or term editing form, the screen automatically scrolls to it;
  • Infinite Scroll loading on all autocompletes and taginput entry:
  • In the taxonomies list, display not only the name of the collection that uses Taxonomy, but also the Metadatum, in parentheses;
  • Display of date and time for exported files;
  • Displays lock icon in the list of metadata and filters when they are private;
  • Improved Collection edition form: avoids setting empty pages as the primary and offers a smarter selection of viewing modes:

Bugs solved!

  • Error on the repository level filters when viewed on a collection page (in installations with multiple collections);
  • Facets were not being reloaded when changing item list ordering or status;
  • The selection modal showing the list of items in Gutenberg blocks was showing non-public items.
  • Gutenberg blocks that had errors when editing their content via modal were resolved;
  • When changing pages in the list of items and returning to the previous page, the page number of the search was not maintained;
  • When applying the same sorting to any list twice in a row, the value was mistakenly changed;
  • The insertion of new terms was not being blocked if the configuration of the taxonomy did not allow it, but the metadata one did;
  • Correction of problems when loading the list of attachments when the item document is of type Text or Link;
  • User roles created by Tainacan from now on always start with the minimum permissions to access the WordPress dashboard.

For Developers

  • The long-awaited reorganization of the project’s source file structure, which should now be clearer for anyone who wants to start contributing to the code.
  • Several parameterization available for Theme developers who want to make the Item List adapted to their theme, including:
    • CSS variables for customizing colors, fonts and sizes;
    • Template variables to display or hide various elements, change the default behavior of some areas such as the filter panel;
    • These were the changes that allowed the implementation of the new Faceted Search Block and, consequently, also made the changes via “Personalize” possible in new themes.
  • New scheme to register filter types and third party metadata – including Vue.js components – without having to change the core code, just via plugins. Soon, we will show some potential that this should yield!

Get it now!

Tainacan version 0.16 is already available. You can download it or update directly from your WordPress admin panels:

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *