Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added output data changed signal #1006

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

ngondalia
Copy link
Contributor

@ngondalia ngondalia commented Aug 30, 2023

Introduced a new signal to indicate that the data on the server has been updated and therefore the components should refetch the data and rerender the components. This PR handles the signal in table-output-component and timegraph-output-component. We have a use case where data is modified on the server, and we want the components to rerender with the new data. Currently, the user would have to close the active trace panel and reopen it to see the changes.

@ngondalia ngondalia changed the title Add and handle data changed signal Added output data changed signal Aug 30, 2023
@ngondalia ngondalia force-pushed the addDataChangedSignal branch 2 times, most recently from 0a80768 to 2f7993a Compare August 30, 2023 21:34
Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. I have some comments.

@@ -143,6 +144,9 @@ export class SignalManager extends EventEmitter implements SignalManager {
fireRedoSignal(): void {
this.emit(Signals.REDO);
}
fireOutputDataChanged(): void {
this.emit(Signals.OUTPUT_DATA_CHANGED);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the signal have a payload to indicate which data provider or data providers were changed? This would allow receivers to filter out signals and only act on it if it is meant for them?

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that is a good idea. I will add that in the next patch.

@bhufmann
Copy link
Collaborator

Introduced a new signal to indicate that the data on the server has been updated and therefore the components should refetch the data and rerender the components. This PR handles the signal in table-output-component and timegraph-output-component. We have a use case where data is dynamically modified on the server, and we want the components to rerender with the new data. Currently, the user would have to close the active trace panel and reopen it to see the changes.

@ngondalia Interesting update. It sounds like that it is for some streaming / monitoring use case. If your server is modifying data, do you have some notification channel implemented from your custom server to the front-end? Please let me know.

@ngondalia
Copy link
Contributor Author

Introduced a new signal to indicate that the data on the server has been updated and therefore the components should refetch the data and rerender the components. This PR handles the signal in table-output-component and timegraph-output-component. We have a use case where data is dynamically modified on the server, and we want the components to rerender with the new data. Currently, the user would have to close the active trace panel and reopen it to see the changes.

@ngondalia Interesting update. It sounds like that it is for some streaming / monitoring use case. If your server is modifying data, do you have some notification channel implemented from your custom server to the front-end? Please let me know.

Sorry, the word "dynamically" was misleading and wrong here. The data gets modified based on some trace type specific settings/filters coming from our custom webviews within our extension. The front end initiates the data modification, therefore we dont have the need for the server to notify the front-end of anything. It already knows that data has changed, as well as the type of data that has changed.

Introduced a new signal to indicate that the data on the server has
been updated and therefore the components should refetch the data and
rerender the components. This PR handles the signal in table-output-component
and timegraph-output-component. We have a use case where data is dynamically
modified on the server, and we want the components to rerender with the new data.
Currently, the user would have to close the active trace panel and reopen it to
see the changes. Added output descriptors as the signal payload.

Signed-off-by: Neel Gondalia <ngondalia@blackberry.com>
@ngondalia ngondalia force-pushed the addDataChangedSignal branch from 2f7993a to 63c0789 Compare September 1, 2023 20:10
@ngondalia ngondalia requested a review from bhufmann September 1, 2023 20:14
Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

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

It looks good to me. To test I added a command to trigger the refresh. Thanks for the contribution.

@bhufmann bhufmann merged commit f7cee94 into eclipse-cdt-cloud:master Sep 7, 2023
2 checks passed
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.

3 participants