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

Full Site Editing: Add a Site Logo block #18811

Merged
merged 25 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3cce651
Add a site logo block
scruffian Nov 19, 2019
088bb64
show a preview while the image uploads
scruffian Dec 10, 2019
161092f
change the block icon
scruffian Dec 10, 2019
8a24f7f
show an inline error message in the site logo block
scruffian Dec 10, 2019
620a0d3
hide the error when a file is successful
scruffian Dec 10, 2019
2c815e4
use mediaflow to replace the image in the logo block
scruffian Dec 10, 2019
a2f1c7e
fix typo in dismissible prop
scruffian Dec 11, 2019
66a1434
update the entity fetching mechanism
scruffian Jun 23, 2020
5b53fe9
use lightBlockWrapper flag
scruffian Jun 23, 2020
94f3059
fix image resizing
scruffian Jun 23, 2020
df47969
match the front/back end markup
scruffian Jun 23, 2020
30a6dbb
fix alignment in the BlockControls
scruffian Jun 23, 2020
70ce3d7
fix alignment in the BlockControls
scruffian Jun 23, 2020
e54cbd7
uopdate icon
scruffian Jun 30, 2020
632bc72
simplify code
scruffian Jun 30, 2020
7fef33b
Hide the spinner when the site logo has loaded
scruffian Jun 30, 2020
9288aec
Use the real url for the site logo
scruffian Jul 9, 2020
13a5265
remove dead code
scruffian Jul 9, 2020
e343862
remove unused CSS
scruffian Jul 9, 2020
0d2585b
combine the useSelect calls
scruffian Jul 9, 2020
2f08a3b
pass an empty array to useSelect to stop it firing on every render
scruffian Jul 9, 2020
b860109
Linter fixes
scruffian Jul 9, 2020
884d081
add fixtures for the site-logo block
scruffian Jul 9, 2020
9718c79
remove unused code
scruffian Jul 9, 2020
8638ccf
fix for linter
scruffian Jul 9, 2020
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: 1 addition & 0 deletions lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function gutenberg_reregister_core_block_types() {
'query.php' => 'core/query',
'query-loop.php' => 'core/query-loop',
'query-pagination.php' => 'core/query-pagination',
'site-logo.php' => 'core/site-logo',
'site-title.php' => 'core/site-title',
'template-part.php' => 'core/template-part',
)
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
@import "./search/editor.scss";
@import "./separator/editor.scss";
@import "./shortcode/editor.scss";
@import "./site-logo/editor.scss";
@import "./social-link/editor.scss";
@import "./social-links/editor.scss";
@import "./spacer/editor.scss";
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import * as socialLink from './social-link';
import * as widgetArea from './widget-area';

// Full Site Editing Blocks
import * as siteLogo from './site-logo';
import * as siteTitle from './site-title';
import * as templatePart from './template-part';
import * as query from './query';
Expand Down Expand Up @@ -198,6 +199,7 @@ export const __experimentalRegisterExperimentalCoreBlocks =
...( __experimentalEnableFullSiteEditing
? [
siteTitle,
siteLogo,
templatePart,
query,
queryLoop,
Expand Down
16 changes: 16 additions & 0 deletions packages/block-library/src/site-logo/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "core/site-logo",
"category": "layout",
"attributes": {
"align": {
"type": "string"
},
"width": {
"type": "number"
}
},
"supports": {
"html": false,
"lightBlockWrapper": true
}
}
Loading