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

Fix blank square plugins icon when theia starts #7756

Merged
merged 1 commit into from
May 7, 2020

Conversation

DoroNahari
Copy link
Contributor

@DoroNahari DoroNahari commented May 6, 2020

Signed-off-by: Doron Nahari [email protected]

What it does

Fixes #7751

Purpose a css solution to this issue. because of the life cycle of plugins sync and load, the div of the contributed plugin is loaded before the icon class is ready causes a blank square until then.

My solution is to first create empty mask and when the plugin icon css apply it will override it.

Before: see gif in #7751
After:
ezgif com-video-to-gif (2)

How to test

  1. Deploy a vscode extension that have a side pane such as gitlens.
  2. See that new pane added to the left pane.
  3. Refresh browser and see that for about 1 second there's no blank square and the plugin icon is loaded.

Review checklist

Reminder for reviewers

@akosyakov
Copy link
Member

I'm not sure about empty, maybe another placeholder? What if a plugin was removed in the meantime, would be there forever invisible tab?

@akosyakov akosyakov added the plug-in system issues related to the plug-in system label May 6, 2020
@DoroNahari
Copy link
Contributor Author

If plugin was removed, it's div containing the plugin-view-container class will be removed too so shouldn't be a problem.
I didn't change the existence of the tab i just changed it's appearance until the plugin icon style is loaded.

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

The changes work well for me 👍
The proposed behavior also aligns with vscode (they do not display a placeholder and no icon is present until the icon is properly loaded).

Copy link
Member

@amiramw amiramw left a comment

Choose a reason for hiding this comment

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

Works for me on gitpod. Code also look fine to me.

@akosyakov
Copy link
Member

@amiramw please merge

@amiramw amiramw merged commit 7cf845b into eclipse-theia:master May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blank square instead of plugins icons in sidebar when theia starts
4 participants