doc/development/fe_guide/registry_architecture.md
GitLab has several registry applications. Given that they all leverage similar UI, UX, and business logic, they are all built with the same architecture. In addition, a set of shared components already exists to unify the user and developer experiences.
Existing registries:
All the registries follow an architecture pattern that includes four component types:
props or through
inject, and do not connect to the API.The complexity and communication with the API should be concentrated in the pages components, and in the container components when needed. This makes it easier to:
provide or inject
to pass static, non-reactive values coming from the app initialization.props over nested queries or Vuex bindings. Only pages and
container components should be aware of the state and API communication.delete_package.vue).Inside vue_shared/components/registry and packages_and_registries/shared, there's a set of
shared components that you can use to implement registry functionality. These components build the
main pieces of the desired UI and UX of a registry page. The most important components are:
code-instruction: represents a copyable box containing code. Supports multiline and single line
code boxes. Snowplow tracks the code copy event.details-row: represents a row of details. Used to add additional information in the details area of
the list-item component.history-item: represents a history list item used to build a timeline.list-item: represents a list element in the registry. It supports: left action, left primary and
secondary content, right primary and secondary content, right action, and details slots.metadata-item: represents one piece of metadata, with an icon or a link. Used primarily in the
title area.persisted-dropdown-selection: represents a menu that stores the user selection in the
localStorage.registry-search: implements gl-filtered-search with a sorting section on the right.title-area: implements the top title area of the registry. Includes: a main title, an avatar, a
subtitle, a metadata row, and a right actions slot.When adding a new registry: