Skip to content

Commit

Permalink
Metaboxes: Try showing the metaboxes under the editor's content
Browse files Browse the repository at this point in the history
not hiden under a panel
  • Loading branch information
youknowriad committed Oct 25, 2017
1 parent 82a9b05 commit df5246e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
21 changes: 13 additions & 8 deletions editor/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@

.editor-layout {
position: relative;

.components-notice-list {
position: fixed;
top: 100px;
right: auto;
}

.editor-meta-boxes-iframe {
max-width: $visual-editor-max-width;
margin: 10px auto 0;
padding: 10px 0;
border-top: 1px solid $light-gray-500;
}
}

.editor-layout__content {
display: flex;
flex-direction: column;
margin-top: #{ -1 * $header-height };

@include break-medium {
Expand All @@ -21,9 +32,3 @@
flex-basis: 100%;
overflow-y: auto;
}

.editor-layout .components-notice-list {
position: fixed;
top: 100px;
right: auto;
}
6 changes: 5 additions & 1 deletion editor/meta-boxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ import MetaBoxesIframe from './meta-boxes-iframe';
import MetaBoxesPanel from './meta-boxes-panel';
import { getMetaBox } from '../selectors';

function MetaBox( { location, isActive } ) {
function MetaBox( { location, isActive, usePanel = false } ) {
if ( ! isActive ) {
return null;
}

if ( ! usePanel ) {
return <MetaBoxesIframe location={ location } />;
}

return (
<MetaBoxesPanel>
<MetaBoxesIframe location={ location } />
Expand Down
6 changes: 3 additions & 3 deletions editor/modes/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
position: relative;
height: 100%;
margin: 0 auto;
padding: 50px 0; // Floating up/down arrows invisible
padding: 50px 0 0; // Floating up/down arrows invisible

&,
& p {
Expand All @@ -12,11 +12,11 @@
}

@include break-small() {
padding: 50px 0;
padding: 50px 0 0;
}

@include break-large() {
padding: 60px 0;
padding: 60px 0 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion editor/sidebar/post-settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const panel = (
<DiscussionPanel />
<PageAttributes />
<DocumentOutlinePanel />
<MetaBoxes location="side" />
<MetaBoxes location="side" usePanel />
</Panel>
);

Expand Down

0 comments on commit df5246e

Please sign in to comment.