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

Polish code editor #4803

Merged
merged 2 commits into from
Feb 1, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion edit-post/assets/stylesheets/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ $z-layers: (
'.blocks-gallery-item__inline-menu': 20,
'.editor-block-settings-menu__popover': 20, // Below the header
'.edit-post-header': 30,
'.edit-post-text-editor__formatting': 30,
'.wp-block-image__resize-handlers': 1, // Resize handlers above sibling inserter

// Show drop zone above most standard content, but below any overlays
Expand Down
5 changes: 1 addition & 4 deletions edit-post/components/modes/text-editor/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { PostTextEditor, PostTextEditorToolbar, PostTitle } from '@wordpress/editor';
import { PostTextEditor, PostTitle } from '@wordpress/editor';

/**
* Internal dependencies
Expand All @@ -11,9 +11,6 @@ import './style.scss';
function TextEditor() {
return (
<div className="edit-post-text-editor">
<div className="edit-post-text-editor__formatting">
<PostTextEditorToolbar />
</div>
<div className="edit-post-text-editor__body">
<PostTitle />
<PostTextEditor />
Expand Down
64 changes: 13 additions & 51 deletions edit-post/components/modes/text-editor/style.scss
Original file line number Diff line number Diff line change
@@ -1,48 +1,3 @@
.edit-post-text-editor__formatting {
background: $white;
border-bottom: 1px solid $light-gray-500;
min-height: $admin-sidebar-width-collapsed;
top: $admin-bar-height-big + $header-height;

@include break-medium() {
top: $admin-bar-height + $header-height;
}

margin-left: -20px;
margin-right: -20px;
display: flex;
flex-direction: row;
flex-wrap: wrap;

@include break-small() {
left: 0px;
right: 0px;
margin-left: 0;
margin-right: 0;
position: fixed;
z-index: z-index( '.edit-post-text-editor__formatting' );
}

.auto-fold.sticky-menu &,
.auto-fold & {
@include break-medium() {
left: $admin-sidebar-width-collapsed;
}

@include break-large() {
left: $admin-sidebar-width;
}
}

.folded & {
left: $admin-sidebar-width-collapsed;
}

.sticky-menu & {
left: $admin-sidebar-width;
}
}

.edit-post-text-editor__body {
padding-top: 40px;

Expand All @@ -55,7 +10,7 @@
}
}

/* Use padding to center text in the textarea, this allows you to click anywhere to focus it */
// Use padding to center text in the textarea, this allows you to click anywhere to focus it
.edit-post-text-editor {
padding-left: 20px;
padding-right: 20px;
Expand All @@ -65,14 +20,21 @@
padding-right: calc( 50% - #{ $text-editor-max-width / 2 } );
}

.edit-post-post-text-editor {
padding-top: 20px;
padding-bottom: 0;
}

.edit-post-post-text-editor__toolbar {
width: 100%;
max-width: $text-editor-max-width;
margin: 0 auto;
}

// Always show outlines in code editor
.editor-post-title div,
.editor-post-text-editor {
border: 1px solid $light-gray-500;
}

.editor-post-text-editor {
padding: $block-padding;
min-height: 200px;
line-height: 1.8;
}
}
4 changes: 0 additions & 4 deletions edit-post/components/sidebar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@
}

/* Text Editor specific */
.edit-post-layout.is-sidebar-opened .edit-post-text-editor__formatting {
margin-right: $sidebar-width;
}

.components-panel__header.edit-post-sidebar__panel-tabs {
justify-content: flex-start;
padding-left: 0;
Expand Down
1 change: 0 additions & 1 deletion editor/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export { default as PostSwitchToDraftButton } from './post-switch-to-draft-butto
export { default as PostTaxonomies } from './post-taxonomies';
export { default as PostTaxonomiesCheck } from './post-taxonomies/check';
export { default as PostTextEditor } from './post-text-editor';
export { default as PostTextEditorToolbar } from './post-text-editor/toolbar';
export { default as PostTitle } from './post-title';
export { default as PostTrash } from './post-trash';
export { default as PostTrashCheck } from './post-trash/check';
Expand Down
21 changes: 0 additions & 21 deletions editor/components/post-text-editor/toolbar.js

This file was deleted.