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

feat: Update panels from field change events #1925

Closed
wants to merge 1 commit into from

Conversation

bmingles
Copy link
Contributor

@bmingles bmingles commented Apr 5, 2024

resolves #1924

Comment on lines +347 to +352
const widgetContentItem = LayoutUtils.getContentItemInRoot(
layout.root,
{
title: toUpdate.title,
}
);
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't be using the title here. The title changes when we clone panels and when we rename panels.

We should instead be matching by panelId (which we should already know if the panel was opened by AppMainContainer) or by the metadata. Problem is as you've identified below, ConsolePanel is doing a similar thing for panels that it has opened, so you can get conflicts.

Perhaps the panel/component itself should be listening for field updates, and update the widget if the underlying field changes (based somewhat on Raffi's comment that he would always want/expect the widget to reflect the currently named widget, indicating our behaviour when opening a panel and it not updating is incorrect).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the idea of the panel listening for changes and updating itself. I'll look into that.

Copy link
Contributor

@AkshatJawne AkshatJawne left a comment

Choose a reason for hiding this comment

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

@bmingles Are we still actively making code changes here? if not, we could probably close this PR since it has been open for a couple of months now as a draft?

@bmingles
Copy link
Contributor Author

Closing as we'll probably need a different approach and this has been de-prioritized since vscode extension now uses embed widget.

@bmingles bmingles closed this Jul 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opened panels should match the state of panels in the panels menu
3 participants