-
Notifications
You must be signed in to change notification settings - Fork 439
Conversation
aba490d
to
9998e46
Compare
**User-Facing Changes** <!-- will be used as a changelog entry --> **Description** Disambiguates two series with the same path but different header stamps so they appear as two separate series. See the "preloaded data in binary blocks" story for an example of the fix compared to the base branch
packages/studio-base/src/panels/Plot/builders/BlockTopicCursor.test.ts
Outdated
Show resolved
Hide resolved
expect(cursor.next(blocks)).toEqual(undefined); | ||
}); | ||
|
||
it("should continue from last location when new blocks arrive", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove "should" from all of these descriptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why's that? Do we not like that pattern? It's pretty typical language use for the describe/it API style. it
should. I don't feel strongly about it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I've seen both "it should work" and "it works" styles of writing test names – I don't think we're consistent today in our code
dataset: ChartDataset<"scatter", DatumWithReceiveTime[]>; | ||
}; | ||
|
||
export class CurrentCustomDatasetsBuilder implements IDatasetsBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Current
is a little confusing only because it's also used when there a multiple of something over time. I think CurrentFrameCustomDatasetsBuilder
would be a little easier to read and search for, but that might be verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names are meant to match the modes. I will add a comment to the class describing what it does.
packages/studio-base/src/panels/Plot/builders/IDatasetsBuilder.ts
Outdated
Show resolved
Hide resolved
packages/studio-base/src/panels/Plot/builders/CurrentCustomDatasetsBuilder.ts
Show resolved
Hide resolved
return; | ||
} | ||
|
||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the extra closure/bracket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the msgEvent
variable is localized since I make another one below and lint complained about variable shadowing
} | ||
} | ||
|
||
function lastMatchingTopic(msgEvents: Immutable<MessageEvent[]>, topic: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consolidate across dataset builders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📿
datasetsBuilder instanceof CurrentCustomDatasetsBuilder || | ||
datasetsBuilder instanceof CustomDatasetsBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe Plot.tsx shouldn't have to care too much about specific builder classes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably - then all of them would need a setXPath and some would ignore or throw
User-Facing Changes
Plot panel bugfixes
Description
Over the past few months there's been a lot of work on the plot panel to improve performance for large datasets. The performance has improved (yet is still not meeting expectations) and the number of bug reports as skyrocketed. Additionally, the code changes introduced thousands of lines of code that no current team member understands and can effectively debug to resolve the outstanding plot bugs.
Rather than bandaid the plot and continue with a complex and fragile architecture, I've taken a different tactic and propose a complete overhaul of the architecture while maintaining the important performance characteristics.
In this PR I do away with the following concepts from the Plot panel code:
To replace the above I've implemented:
Note: The panel does not pause/resume frame
Fixes: #7278
Fixes: FG-5381
Fixes: FG-6190
Fixes: FG-6181
Fixes: FG-6179
Fixes: FG-6171
Fixes: FG-6184
Fixes: FG-6218
Fixes: FG-6192
Fixes: FG-6189
Fixes: FG-6151
Fixes: https://github.com/orgs/foxglove/discussions/549
Showstoppers:
Errata:
grid.data[:]
crashes with the tf grid datasetTODO perf/cleanup:
/mcnasty/position.
resulted in a subscription with an "" empty field name when really this path is not yet valid and we should not update subscriptionsvoid this.#datasetsBuilderRemote.setConfig(this.#seriesConfigs);
needs error handling - maybe move the sending of the config before sending the datasets since that is already in an async functionWhen plotting an enum value the tooltip can show the "text"