Skip to content

Add html marker format type#4200

Closed
parttimenerd wants to merge 1 commit into
firefox-devtools:mainfrom
parttimenerd:parttimenerd_markdown_marker
Closed

Add html marker format type#4200
parttimenerd wants to merge 1 commit into
firefox-devtools:mainfrom
parttimenerd:parttimenerd_markdown_marker

Conversation

@parttimenerd

Copy link
Copy Markdown
Contributor

Add format type html to include custom HTML in marker fields. This allows prettier formatting of imported markers without altering the profiler UI itself.
An example is the following, in which a table is used to format environment variables and their values:

image

Sample profile

@canova

canova commented Aug 23, 2022

Copy link
Copy Markdown
Member

I'm not sure if adding an html into a json file format is a good option. Firefox Profiler UI may change and this makes it really vulnerable for breaking in case of a dramatic change. Also sanitization is always a problem. And usually mixing json with html is not a good idea.
Why do you need this specifically? From your example, you can do the same thing with marker schema without needing this additonla html type.

For this example: Yes, probably you'll have different environment values in your program. But this is probably a one time marker that you need to add in the profiler run, right? You can change a marker schema on the fly. Like in your marker schema:

...
data: [
      { key: 'LC_TERMINAL_VERSION', label: 'LC_TERMINAL_VERSION', format: 'string' },
      { key: 'COLOR', label: 'COLOR', format: 'string' },
      { key: 'ITERM_PROFILE', label: 'ITERM_PROFILE', format: 'string' },
      ...
],
...

You can populate the data fields as much as you like for that specific profile data. And if you have another marker with the different environment variables, you can generate a different one if needed.

@parttimenerd

Copy link
Copy Markdown
Contributor Author

You're right, I'll replace it with two types list and table. I'll add two PRs today.

@parttimenerd

Copy link
Copy Markdown
Contributor Author

Superseeded by #4201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants