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

Clean up UX of property inspector #7718

Merged
merged 1 commit into from Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/property-inspector/src/index.ts
Expand Up @@ -154,8 +154,12 @@ export class SideBarPropertyInspectorProvider extends PropertyInspectorProvider
if (placeholder) {
this._placeholder = placeholder;
} else {
this._placeholder = new Widget();
this._placeholder.node.textContent = 'No properties to inspect.';
const node = document.createElement('div');
const content = document.createElement('div');
content.textContent = 'No properties to inspect.';
content.className = 'jp-PropertyInspector-placeholderContent';
node.appendChild(content);
this._placeholder = new Widget({ node });
this._placeholder.addClass('jp-PropertyInspector-placeholder');
}
layout.widget = this._placeholder;
Expand Down
12 changes: 10 additions & 2 deletions packages/property-inspector/style/base.css
Expand Up @@ -6,12 +6,20 @@

.jp-PropertyInspector {
display: flex;
align-items: center;
justify-content: center;
color: var(--jp-ui-font-color1);
background: var(--jp-layout-color1);
}

.jp-PropertyInspector-content {
flex-grow: 1;
}

.jp-PropertyInspector-placeholder {
display: flex;
align-items: center;
justify-content: center;
}

.jp-PropertyInspector-placeholderContent {
padding: 8px;
}