In the marker schema, support label templates with conditional behavior depending on whether a field is present #5314
Labels
markers
Anything to do with marker data structures, marker chart, or the marker table
profile data
Issues related to the profile format, data structure, or profile upgraders
We have custom code for the FileIO marker's
tableLabel
:profiler/src/profile-logic/marker-schema.js
Lines 307 to 315 in c195710
Mostly what's happening is that some fields are optional, and those fields shouldn't be surrounded by brackets or separated by spaces or dashes if they're not present.
It would be nice if we could achieve the same result with some extensions to the label template syntax.
A similar request was made in the past by @fqueze, when he wanted to share the same schema for these two markers, to reduce code duplication at the schema declaration: https://share.firefox.dev/4fWgc0B
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: