Frontend: Render the Catalog Resource breadcrumb path using `webPath` instead of `rootNamespace`
Summary
This is the counterpart issue to #430791 (closed). The problem is that upon updating the scope of the global Catalog to include Public projects, there is an authorization issue on the rootNamespace
field that results in a nil
response. For this reason, it cannot be used to generate the Catalog resource breadcrumb path. We will change our approach so that the FE uses webPath
instead of rootNamespace
.
Context:
@fabiopitino
: Why do we need root namespace data? Can project's ID, full_path and name be sufficient?
@lma-git
: Afaik, theroot_namespace
field was originally added toResourceType
because:
- a) All the resources returned used to come from the same root namespace. So at the time we anticipated we may need more data from the root namespace.
- b) It allowed us to extract the root namespace Name which renders more nicely in the path title of the catalog resource. Otherwise, FE would have to infer the name from the
full_path
slug. And the slug doesn't always match the Name.Having said that, now IMO we don't really need the root namespace field anymore. I agree we could just use the Project's
full_path
and render it in the title path as is. Then the only "Name" that displays would be of the Project and not the root namespace.
@bsandlin
@f_caplette
^ I think this would be the easiest way forward right now. The Project's path is available from theweb_path
field of ResourceType.
Proposal
On the Explore pages listing the catalog resources, update the FE logic so that the path uses ResourceType's webPath
field instead of the fields under rootNamespace
. Remove rootNamespace
from the GraphQl queries.