diff --git a/src/components/tooltip/Marker.js b/src/components/tooltip/Marker.js index 561b92d80c..f6a4d7a1f7 100644 --- a/src/components/tooltip/Marker.js +++ b/src/components/tooltip/Marker.js @@ -241,6 +241,17 @@ class MarkerTooltipContents extends React.PureComponent { // Add the details for the markers based on their Marker schema. const schema = getSchemaFromMarker(markerSchemaByName, marker.data); if (schema) { + if (schema.description) { + const key = schema.name + '-description'; + details.push( + +
+ {schema.description} +
+
+ ); + } + for (const field of schema.fields) { if (field.hidden) { // Do not include hidden fields. @@ -268,17 +279,6 @@ class MarkerTooltipContents extends React.PureComponent { ); } - - if (schema.description) { - const key = schema.name + '-description'; - details.push( - -
- {schema.description} -
-
- ); - } } switch (data.type) { diff --git a/src/test/components/__snapshots__/MarkerChart.test.js.snap b/src/test/components/__snapshots__/MarkerChart.test.js.snap index 7e9cfd7000..e53e60fa3e 100644 --- a/src/test/components/__snapshots__/MarkerChart.test.js.snap +++ b/src/test/components/__snapshots__/MarkerChart.test.js.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`MarkerChart EmptyReasons shows a reason when a profile has no markers 1`] = `
- Name + Description :
- Marker B
- Entry Type - : + UserTiming is created using the DOM APIs performance.mark() and performance.measure().
- measure
- Description + Name :
+ Marker B
- UserTiming is created using the DOM APIs performance.mark() and performance.measure(). + Entry Type + :
+ measure
@@ -374,28 +374,28 @@ exports[`MarkerChart renders the hoveredItem markers properly 2`] = `
- Name + Description :
- Marker B
- Entry Type - : + UserTiming is created using the DOM APIs performance.mark() and performance.measure().
- measure
- Description + Name :
+ Marker B
- UserTiming is created using the DOM APIs performance.mark() and performance.measure(). + Entry Type + :
+ measure
diff --git a/src/test/components/__snapshots__/StackChart.test.js.snap b/src/test/components/__snapshots__/StackChart.test.js.snap index cb4747d4e4..bd0e3dca1d 100644 --- a/src/test/components/__snapshots__/StackChart.test.js.snap +++ b/src/test/components/__snapshots__/StackChart.test.js.snap @@ -869,28 +869,28 @@ exports[`MarkerChart shows a tooltip when hovering 1`] = `
- Name + Description :
- componentB
- Entry Type - : + UserTiming is created using the DOM APIs performance.mark() and performance.measure().
- measure
- Description + Name :
+ componentB
- UserTiming is created using the DOM APIs performance.mark() and performance.measure(). + Entry Type + :
+ measure
@@ -936,28 +936,28 @@ exports[`MarkerChart shows a tooltip when hovering 2`] = `
- Name + Description :
- componentA
- Entry Type - : + UserTiming is created using the DOM APIs performance.mark() and performance.measure().
- measure
- Description + Name :
+ componentA
- UserTiming is created using the DOM APIs performance.mark() and performance.measure(). + Entry Type + :
+ measure
diff --git a/src/test/components/__snapshots__/TooltipMarker.test.js.snap b/src/test/components/__snapshots__/TooltipMarker.test.js.snap index 7d58b48927..18acd2e838 100644 --- a/src/test/components/__snapshots__/TooltipMarker.test.js.snap +++ b/src/test/components/__snapshots__/TooltipMarker.test.js.snap @@ -4684,28 +4684,28 @@ exports[`TooltipMarker renders tooltips for various markers: UserTiming-12.5 1`]
- Name + Description :
- foobar
- Entry Type - : + UserTiming is created using the DOM APIs performance.mark() and performance.measure().
- mark
- Description + Name :
+ foobar
- UserTiming is created using the DOM APIs performance.mark() and performance.measure(). + Entry Type + :
+ mark