Skip to content

Commit

Permalink
Fix dedicated IDE page
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Fusco <[email protected]>
  • Loading branch information
josephfusco committed Feb 28, 2024
1 parent 0d8e7df commit bb774f9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
27 changes: 25 additions & 2 deletions styles/wpgraphql-ide.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
color: inherit;
}

/* Fix layout shift from drawer opening */
body {
/* Fix layout shift from drawer opening everywhere except the dedicated IDE page */
body:not(.graphql_page_graphql-ide) {
top: var(--wp-admin--admin-bar--height) !important;
}

Expand All @@ -119,3 +119,26 @@ body {
.wpgraphql-logo-link {
display: flex;
}

/* Dedicated IDE page for new editor */

/* Ful-width editor on dedicated page */
body.graphql_page_graphql-ide #wpcontent {
padding-left: 0;
}
/* Ful-height editor on dedicated page */
body.graphql_page_graphql-ide #wpgraphql-ide-root {
height: calc(100vh - var(--wp-admin--admin-bar--height));
}

body.graphql_page_graphql-ide .AppRoot {
height: 100%;
}

body.graphql_page_graphql-ide #wpbody-content {
padding: 0;
}

body.graphql_page_graphql-ide #wpfooter {
display: none
}
2 changes: 1 addition & 1 deletion wpgraphql-ide.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function register_dedicated_ide_menu(): void {
* @return void
*/
function render_dedicated_ide_page(): void {
echo '<div id="' . WPGRAPHQL_IDE_ROOT_ELEMENT_ID . '">IDE GOES HERE</div>';
echo '<div id="' . WPGRAPHQL_IDE_ROOT_ELEMENT_ID . '"></div>';
}

/**
Expand Down

0 comments on commit bb774f9

Please sign in to comment.