Can we talk about the changed behaviour of the Back button in v12?

I want to start a conversation about the behaviour of the Back Button on the item page and how it’s apparently changing (IMO for the worse) in v12.

For as long as I can remember, when you have a relational chain of O2M, M2O, or M2M items, the back button has always behaved the same as the browser back button when navigating back up the relational chain from child to parent relational items.

To clarify what I mean, let’s image you have three collections: Country, City, and Venue, each with a nested O2M relation to the level below. So a Country has a O2M list of Cities, and a City has a O2M list of Venues (each with “Show a link to this item” enabled).

So you’re in the Countries Collection list view and you click on “United Kingdom” to go the item view, which includes your O2M list of the Cities in that country. You then click the link next to “Bristol” to navigate to the item detail view for that city, and then from there you click “O2 Academy” in the O2M list of venues to go to the item view for that venue.

Currently, clicking the Back button at this point will take you back to the Bristol city item view, then clicking it again will take you back to the United Kingdom country item view, and clicking a third time would take you back to the Collection list view of Countries. This makes total sense. It navigates you back up through the relational chain to where you came from.

This behaviour actually changed in 11.14.1 and the back button began taking you instead to the Collection view of the current item, however you navigated there. So in my example above, from the “O2 Academy” venue, clicking back would take you to the Collection view list of all Venues (as opposed to taking you back to the Bristol item page.)

At the time, this really confused our users, and so I reported it as a bug (Back Button behaviour is broken in 11.14.1 · Issue #26540 · directus/directus · GitHub) and it quickly got fixed and reverted back to the usual behaviour.

However, now it seems that in v12, a decision has been taken to once again change to the behaviour seen in 11.14.1. I raised it on the Discord chat, and a Directus team member initially raised it as a bug again for me (Back Button behaviour is broken in 12.0.0-rc1 · Issue #27649 · directus/directus · GitHub). But he later came back and told me that this time, it’s an intended design decision and not a bug (xiiui ← Back button always navigates one level up by HZooly · Pull Request #27004 · directus/directus · GitHub).

This feels counter-intuitive to me, as I would consider that a Back button should always mimic the functionality of the browser back button, taking you back to the previous page you were on, not taking you up a different route.

I accept that if you were to navigate directly to a venue item (without having come to it from its parent city) and then click back, it makes sense to take you back to the Venues collection list view, but if you come to it from a parent relational item, it should take you back to that parent item. I don’t consider that anywhere near as confusing as the new v12 behaviour where you’re always reversing back up to somewhere you don’t want to be.

I’m genuinely curious to know the justification for this change in behaviour, and what other users think about it.

Yes, we can always just use the browser back button instead, but our experience shows this is really confusing for users. In our project, we have many of these nested O2M relationships, and our users spend a lot of time navigating down and back up through the relational levels. Removing the ability to navigate back up from within the app interface is just awkward and confusing.

Why not give us a choice in the Project settings about how the back button will behave? Or better still, add an additional “Up” button that always takes you up to the Collection list view, and leave the Back button always taking you back to the previous page you were on?

1 Answer

1

Thanks for the detailed write-up @Burvs - it’s useful to have the relational chain scenario spelled out.

To be clear: the back button in v12 takes you to the collection list view on whichever item you’re currently on. It’s not a history button, and it’s also not traversing the relational hierarchy.

I recognise that doesn’t fully match the framing of “up one level in navigation,” and I can see why the relational drilling use case feels underserved by it. In your Country → City → Venue example, the browser back button is genuinely the right tool for retracing that path.

Your suggestion of a separate “Up” button that does navigate the relational hierarchy is worth noting as it would provide both behaviours a clear home. I can’t promise anything on the roadmap, but it’s a well-reasoned idea and I’ll discuss it with the wider team.

Thanks for your response @James_White . I'm just curious to know what thought process was behind the design change? Do people genuinely feel it's less confusing this way? And that the change is worth confusing existing users? The button is labelled "Back" when you hover over it, and it doesn't actually go "back" anymore. It goes "up".