This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
Releases: front/gutenberg-js
Releases · front/gutenberg-js
v3.0.0💥
v3.0.0 Breaking changes
- We removed
react
,react-dom
,moment
andjquery
from gutenberg-js package, but it still needs those libraries to run, so don't forget to include them in your editor page. Example:
<!-- Example: -->
<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/[email protected]/min/moment.min.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script>window.lodash = _.noConflict();</script>
- Also, we only have 2 style files:
style.css
andblock-library/style.css
. The editor needs both, but front end only needs the blocks style (block-library/style.css
).
// Gutenberg JS Style
import '@frontkom/gutenberg-js/build/css/block-library/style.css';
// import '@frontkom/gutenberg-js/build/css/components/style.css';
// import '@frontkom/gutenberg-js/build/css/nux/style.css';
// import '@frontkom/gutenberg-js/build/css/editor/style.css';
// import '@frontkom/gutenberg-js/build/css/block-library/theme.css';
// import '@frontkom/gutenberg-js/build/css/block-library/edit-blocks.css';
import '@frontkom/gutenberg-js/build/css/style.css';
- The index request ('/') now is 'wp/v2/themes'.
// response
[{
theme_supports: {
formats: ['standard', 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'audio'],
'post-thumbanials': true,
'responsive-embeds': false,
},
}]
- The editor
settings
object requires a new property:
const settings = {
...
postLock: {
isLocked: false,
},
...
};
- New request: wp/v2/media OPTIONS Requests Upload Permissions from the REST API.
{
headers: {
get: value => {
if (value === 'allow') {
return [ 'POST' ];
}
},
},
}
v3.0.0-rc7
- Removed
@wordpress/block-library
and@wordpress/blocks
overrides (data-attributes)
v3.0.0-rc6 ⏪
- Removed lodash from externals
- Added jQuery back to externals
v3.0.0-rc5 ⏪
- Added
@wordpress/notices
overrides back
v3.0.0-rc4 ⏪
- Removed jQuery from externals and added it as a dependency
v3.0.0-rc3 🔖
v3.0.0-rc3
- Upgrading to Gutenberg 4.4.0
Added
- PostPublishButton override to be controlled by the canPublish setting (@wordrpess/editor)
Removed
- @wordpress/notices overrides
- Temporary style fix for Media&Text block
Changed
- Image blocks (Cover, Gallery, Image and Cover) overrides (@wordrpess/block-library)
ApiFetch
- New request: wp/v2/media OPTIONS Requests Upload Permissions from the REST API.
{
headers: {
get: value => {
if (value === 'allow') {
return [ 'POST' ];
}
},
},
}
v3.0.0-rc2 💥
- Upgraded to Gutenberg 4.2.0
v3.0.0-rc1
- Removed install script
- Added @wordpress/* packages as dependencies
v3.0.0-rc
Migrating to v3.0.0
- We removed
react
,react-dom
,moment
andlodash
(and jquery) from gutenberg-js package, but it still needs those libraries to run, so don't forget to include them in your editor page.
<!-- Example: -->
<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/[email protected]/min/moment.min.js"></script>
<script src="https://unpkg.com/[email protected]/lodash.min.js"></script>
<script>window.lodash = _.noConflict();</script>
- Also, we only have 2 style files:
style.css
andblock-library/style.css
. The editor needs both, but front end only need blocks style (block-library/style.css
).
// Gutenberg JS Style
import '@frontkom/gutenberg-js/build/css/block-library/style.css';
// import '@frontkom/gutenberg-js/build/css/components/style.css';
// import '@frontkom/gutenberg-js/build/css/nux/style.css';
// import '@frontkom/gutenberg-js/build/css/editor/style.css';
// import '@frontkom/gutenberg-js/build/css/block-library/theme.css';
// import '@frontkom/gutenberg-js/build/css/block-library/edit-blocks.css';
import '@frontkom/gutenberg-js/build/css/style.css';
- The index request ('/') now is 'wp/v2/themes'.
// response
[{
theme_supports: {
formats: ['standard', 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'audio'],
'post-thumbanials': true,
'responsive-embeds': false,
},
}]
- The editor
settings
object requires a new property:
const settings = {
...
postLock: {
isLocked: false,
},
...
};
gutenberg-overrides
Added
-
packages/edit-post overrides
-
addQueryArgs
to 'Manage All Reusable Blocks' link (ToolsMoreMenuGroup) -
addQueryArgs
to 'Manage All Reusable Blocks' link (Inserter Menu) -
OPEN_GENERAL_SIDEBAR
andCLOSE_GENERAL_SIDEBAR
effects
Changed
-
MediaUpload component and implement the Media Library with existing images
-
'cover-image' to 'cover'
Removed
-
BlockListBlock override
-
insertDefaultBlock
action override -
mediaUpload override
v2.1.0
Updated to wordpress/gutenberg 3.7.0