Show if collapsed field has any content

I’ve created this feature request after the recent release of collapsible fields.

I’d love if I could get a count or an indicator that a (collapsed) field has content, so it’s obvious at a glance. Otherwise, if we have collapsed a field, we have to expand it to check if there is any content.

The solution we have with comments for example, makes it so we don’t have to expand it to know if there is any content. We can see directly “No comments”, if there are no comments.

For example, we can now have our rich text field “Notes for editors” on wiki pages, and we can just keep them collapsed, since they are only relevant in some cases, when making edits, and most of the time, you are reading.

And a few (only) articles could have files or whiteboards attached, though as a reader it would be nice to have that field collapsed most of the time, since it’s so uncommon.

There is a tradeoff between convenience and performance here: when a Field is collapsed, we don’t query any data at all. To show an indicator if a Field is empty or not, we have to send an extra request — in the case of a rich-text Field, it would be a request to a separate /docs service.

Comments and back-references are special cases: both Fields are hidden when empty (Comments for read-only users only) so we have to query at least the aggregate data anyway.

So far we have decided to prioritize performance for all other Fields but we’ll keep an eye on the feedback.

1 Like

That make sense, I suspected it might be a performance tradeoff.

1 Like