Remove title property and update the slug to the filename in analytics visualizations
Problems to solve
-
The
title
prop is not part of a visualization, but rather dashboard panels. -
The
visualization.rb
model expects visualisations to atitle
prop which causes the GraphQL typeproductAnalyticsVisualizations
to error if a visualization file does not have antitle
. This is an issue because the visualization designer does not save the title. -
The GraphQL
productAnalyticsVisualizations.slug
field returns the visualization when it should return the slugified (_
) file name. This is needed by the visualization designer because it reads & writes to the visualization files and we're expecting the filename to match the slug.
Related issue: Product analytics - Designer outputs incorrect ... (#390707 - closed)
Proposed solution
- Update all
ee/lib/gitlab/analytics/product_analytics/visualizations/*
and visualization fixtures and remove thetitle
property. - Update the
visualization.rb
model to generate the slug based on the filename (minus.yaml
).
Implementation plan
TBD
Edited by Jiaan Louw