Verified Commit a069aa34 authored by Bob Van Landuyt's avatar Bob Van Landuyt
Browse files

fix: show all categories on the categories lookup page

This makes sure that we use stages.yml as the SSoT of feature category
ownership.

categories.yml changes as the product direction changes. This means
that when features get divested, they would no longer be mentioned in
categories.yml, but this does not mean the features are no longer used
by our users or that the code no longer exists. When this happens, we
can move the feature category from group.categories to
group.maintained_categories.

Having it like this means that we can remove the feature category from
categories.yml indicating this is no longer a priority from a product
perspective, while still communicating which group owns that code.

Related to gitlab-org/gitlab#549006 (comment 2622703178)
parent d340b471
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3,4 +3,9 @@ title: "Features Category Quick Lookup"
description: "Lookup table of groups and slack channels by feature category"
---

These are all categories currently owned by groups. Each category has a type that indicates its status:

- `direction`: The category is part of the product direction
- `maintained`: The category is not part of the product direction but is still maintained by the group

{{< product/categories-lookup >}}
+18 −16
Original line number Diff line number Diff line
{{- $categories := dict }}
{{- range $k, $v := site.Data.public.categories }}
  {{- $categories = merge $categories (dict $k $v) }}
{{ end }}
{{ $stages := site.Data.public.stages.stages }}
{{- range $stage_key, $stage_data := $stages }}
  {{- range $group_key, $group_data := $stage_data.groups }}
    {{- range $group_data.categories }}
      {{- $categories = merge $categories (dict . (dict "group" (merge $group_data (dict "id" $group_key)) "stage" $stage_data "type" "direction")) }}
    {{- end }}
    {{- range $group_data.maintained_categories }}
      {{- $categories = merge $categories (dict . (dict "group" (merge $group_data (dict "id" $group_key)) "stage" $stage_data "type" "maintained")) }}
    {{- end }}
  {{- end }}
{{- end }}

<table>
    <thead>
@@ -12,20 +19,15 @@
        </tr>
    </thead>
    <tbody>
        {{ range $k, $v := $categories }}
        {{ range $category, $v := $categories }}
        <tr>
        <td><code>{{$k}}</code></td>
        <td>{{- $cat := $k }}
            {{- range $key, $data := $stages }}
            {{- range $k, $v := $data.groups }}
                {{- if in .categories $cat }}
                    Group: <a href='/handbook/product/categories/#{{ replace $k "_" "-" }}-group'>{{ $data.display_name }}: {{ $v.name }}</a><br/>
                    Slack: <a href='https://gitlab.slack.com/channels/{{ $v.slack.channel }}'>#{{ $v.slack.channel }}</a><br/>
                    Engineering Manager: {{ or $v.em $v.backend_engineering_manager }}<br/>
                    Product Manager: {{ $v.pm }}<br/>
                {{- end }}
            {{- end }}
            {{- end }}
        <td><code>{{$category}}</code></td>
        <td>
            Group: <a href='/handbook/product/categories/#{{ replace $v.group.id "_" "-" }}-group'>{{ or $v.group.display_name $v.group.name}}</a><br/>
            Slack: <a href='https://gitlab.slack.com/channels/{{ $v.group.slack.channel }}'>#{{ $v.group.slack.channel }}</a><br/>
            Engineering Manager: {{ or $v.group.em $v.group.backend_engineering_manager }}<br/>
            Product Manager: {{ $v.group.pm }}<br/>
            Category type: {{ $v.type }}<br />
        </td>
        </tr>
        {{ end }}