Skip to content

feat: Plot uses subscribeMessageRange#1004

Open
rodrigo-rodrigues-ctw wants to merge 25 commits intodevelopfrom
feature/plot-message-range
Open

feat: Plot uses subscribeMessageRange#1004
rodrigo-rodrigues-ctw wants to merge 25 commits intodevelopfrom
feature/plot-message-range

Conversation

@rodrigo-rodrigues-ctw
Copy link
Copy Markdown
Contributor

@rodrigo-rodrigues-ctw rodrigo-rodrigues-ctw commented Mar 24, 2026

User-Facing Changes

Use subscribeMessageRange for improved data handling in Plot panel.

Description

Refactor existing plot components to support subscribeMessageRange, enhancing performance and usability. Key changes include the rework of interaction handlers and dataset builders to accommodate the new message range functionality.

The main idea of this PR is to stop the use of BlockLoader in Plot panel. BlockTopicCursor should be deprecated.

Created useSubscribeMessageRange hook to enable Panels that are not using PanelExtensionAdapter to use its logic directly. Down the line I think it would make sense to convert all the panels to PanelExtensionAdapter.

In this video, I'm comparing both implementations of Plot
https://github.com/user-attachments/assets/d5e55820-9733-4142-be24-1ca92a71df2d

Checklist

  • The web version was tested and it is running ok
  • The desktop version was tested and it is running ok
  • This change is covered by unit tests
  • Files constants.ts, types.ts and *.style.ts have been checked and relevant code snippets have been relocated

@rodrigo-rodrigues-ctw rodrigo-rodrigues-ctw marked this pull request as draft March 24, 2026 17:07
@rodrigo-rodrigues-ctw rodrigo-rodrigues-ctw marked this pull request as ready for review March 26, 2026 14:48
if (existing) {
const keysChanged =
existing.seriesKeys.size !== currentKeys.size ||
[...currentKeys].some((k) => !existing.seriesKeys.has(k));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not iterating currentKeys directly here? Wont this create a new array deconstructing currentKeys everytime is called?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currentKeys is a Set, I can't call .some method directly

@sonarqubecloud
Copy link
Copy Markdown

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