Closed Bug 1604868 Opened 4 years ago Closed 3 years ago

Unable to remove series from graph view

Categories

(Tree Management :: Perfherder, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: davehunt, Assigned: igoldan)

Details

(Whiteboard: fix-close-legends-from-top)

When viewing a graph view with a large number of series, I am unable to remove more than a few of these series. If I start from the bottom and work up it seems fine, but removing them from the top ends up getting into a weird state.

Steps to reproduce:

  1. Open a graph view with many series, such as this one.
  2. Click the 'x' to remove the top series from the graph.
  3. Repeat step 2

Expected result:
One by one all series should be removed from the graph view until there are none remaining.

Actual result:
The first four series appear to be removed as expected, but the colours of the remaining series become limted to two colours. When attempting to remove the 5th series, all of the data from the first 4 series reappears on the graph.

Priority: -- → P3
Priority: P3 → P1
Assignee: nobody → igoldan

The link from step #1 is faulty. Out of the 4 signatures provided as query params, following 2 are identical:

<hostname>/perfherder/graphs?highlightAlerts=1&highlightChangelogData=0&series=mozilla-central,1937041,1,10&series=mozilla-central,1934609,1,10&series=mozilla-central,1982120,1,10&series=mozilla-central,1934609,1,10&timerange=31536000

What actually happens?

After parsing the query params, the frontend uses them as unique keys for some of its components. So we get 2 components with identical keys, which confuses ReactJs & causes such weird behavior.
As a general rule: ReactJs mandates all components that act like list items have unique identifiers in the form of the key attribute, so they can be properly managed.

With that said, I'm not sure about the ideal solution. Some options:

  1. silently sanitize query params by eliminating duplicate series
  2. pop up a warning notification, informing the user about the faulty URL

Thoughts?

Flags: needinfo?(dave.hunt)
Whiteboard: fix-close-legends-from-top

(In reply to Ionuț Goldan [:igoldan] from comment #1)

The link from step #1 is faulty. Out of the 4 signatures provided as query params, following 2 are identical:

<hostname>/perfherder/graphs?highlightAlerts=1&highlightChangelogData=0&series=mozilla-central,1937041,1,10&series=mozilla-central,1934609,1,10&series=mozilla-central,1982120,1,10&series=mozilla-central,1934609,1,10&timerange=31536000

What actually happens?

After parsing the query params, the frontend uses them as unique keys for some of its components. So we get 2 components with identical keys, which confuses ReactJs & causes such weird behavior.
As a general rule: ReactJs mandates all components that act like list items have unique identifiers in the form of the key attribute, so they can be properly managed.

With that said, I'm not sure about the ideal solution. Some options:

  1. silently sanitize query params by eliminating duplicate series
  2. pop up a warning notification, informing the user about the faulty URL

Thoughts?

Of these options, I think I prefer #1 however the real issue here is that I somehow was served a link with duplicate series. As this was opened over a year ago I doubt we'll be able to identify the source of the problem, though my best guess would be that it's from arewefastyet.com. I'm going to close this as INCOMPLETE, and we can reopen if we see this again.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(dave.hunt)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.