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

[WebviewView] Changing Title When webviewView.visible === false #106083

Closed
GordonSmith opened this issue Sep 4, 2020 · 4 comments · Fixed by #106892
Closed

[WebviewView] Changing Title When webviewView.visible === false #106083

GordonSmith opened this issue Sep 4, 2020 · 4 comments · Fixed by #106892
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded webview Webview issues
Milestone

Comments

@GordonSmith
Copy link

Testing #105764

When the WebviewView is not visible, changing the title is not reflected visually:

        this._webviewView.onDidChangeVisibility(e => {
            this._webviewView.title = this._webviewView.visible ? "All Good!": "Never Displayed";
        });
@mjbvz mjbvz added this to the September 2020 milestone Sep 8, 2020
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Sep 8, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Sep 8, 2020

Doesn't reproduce for me:

Sep-08-2020 15-01-20

Can you please share your full example?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Sep 8, 2020
@GordonSmith
Copy link
Author

GordonSmith commented Sep 9, 2020

I should have mentioned that his is when its in a bottom "Panel" and not a side tree, IOW:

 "contributes": {
    "viewsContainers": {
      "panel": [
        {
          "id": "my-fancy-view",
          "title": "Fancy View",
          "icon": "fancy.icon"
        }
      ]
    },
    "views": {
      "my-fancy-view": [
        {
          "type": "webview",
          "id": "my-webview",
          "name": "Webview"
        }
      ]
    }
  }

@mjbvz mjbvz added webview Webview issues and removed info-needed Issue requires more information from poster labels Sep 10, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Sep 10, 2020

@sbatten I believe the issue is in CompositePart here:

if (this.activeComposite && this.activeComposite.getId() === compositeId) {

If an extension updates the title when switching away from a view—or updates the title of a non-active view—then the if condition fails so we never call this.updateTitle.

Could we move the updateTitle call outside of the conditional?

@sbatten
Copy link
Member

sbatten commented Oct 1, 2020

reverted 2ac1523, will fix with a separate implementation of update title like panelPart has

jmannanc pushed a commit to jmannanc/vscode that referenced this issue Oct 26, 2020
@eamodio eamodio added the verified Verification succeeded label Oct 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded webview Webview issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@eamodio @GordonSmith @sbatten @mjbvz and others