Bug 1463055 - Font editor: merge editor panel with overview (temporary until redesign). r=pbro

MozReview-Commit-ID: 5QSEEGgsoPO

--HG--
extra : rebase_source : 35ca58c787c52106c6f9d4cd0ee326bfd6638e74
This commit is contained in:
Razvan Caliman 2018-05-21 10:22:53 +02:00
parent 6838bf9157
commit 4233922a8b
2 changed files with 14 additions and 17 deletions

View File

@ -194,10 +194,7 @@ class FontEditor extends PureComponent {
});
return dom.div(
{
className: "theme-sidebar inspector-tabpanel",
id: "sidebar-panel-fontinspector"
},
{},
// Always render UI for font family, format and font file URL.
this.renderFontFamily(font),
// Render UI for font variation instances if they are defined.

View File

@ -38,24 +38,24 @@ class FontsApp extends PureComponent {
onToggleFontHighlight,
} = this.props;
const hasFonts = fontEditor.fonts.length > 0;
return dom.div(
{
className: "theme-sidebar inspector-tabpanel",
id: "sidebar-panel-fontinspector"
},
fontEditor.isVisible ?
FontEditor({
fontEditor,
onInstanceChange,
onPropertyChange,
})
:
FontOverview({
fontData,
fontOptions,
onPreviewFonts,
onToggleFontHighlight,
})
hasFonts && FontEditor({
fontEditor,
onInstanceChange,
onPropertyChange,
}),
FontOverview({
fontData,
fontOptions,
onPreviewFonts,
onToggleFontHighlight,
})
);
}
}