-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Refactor core blocks to have save and transforms in their own files (part 2) #14899
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gziolo
requested review from
ajitbohra,
jorgefilipecosta,
noisysocks,
notnownikki,
Soean,
talldan and
youknowriad
as code owners
April 10, 2019 10:16
gziolo
force-pushed
the
update/block-library-file-extraction-2
branch
from
April 10, 2019 10:18
77879c2
to
ad4bc14
Compare
gziolo
added
[Feature] Block Directory
Related to the Block Directory, a repository of block plugins
[Package] Block library
/packages/block-library
labels
Apr 10, 2019
14 tasks
gziolo
force-pushed
the
update/block-library-file-extraction-2
branch
from
April 14, 2019 13:29
ad4bc14
to
738fcc3
Compare
ellatrix
reviewed
Apr 17, 2019
ellatrix
reviewed
Apr 17, 2019
import { defaultColumnsNumber } from './shared'; | ||
|
||
export default function save( { attributes } ) { | ||
const { images, columns = defaultColumnsNumber( attributes ), imageCrop, linkTo } = attributes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this function is only used once, why not place it in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultColumnsNumber
is used also in edit.js
and index.js
at the moment.
ellatrix
approved these changes
Apr 17, 2019
gziolo
force-pushed
the
update/block-library-file-extraction-2
branch
from
April 18, 2019 10:20
738fcc3
to
d2202ff
Compare
daniloercoli
added a commit
that referenced
this pull request
Apr 18, 2019
…rnmobile/887-History-stack-is-not-empty-on-a-fresh-start-of-the-editor * 'master' of https://github.com/WordPress/gutenberg: Reset embed mocks on every request, stop request to instagram (#15046) Refactor core blocks to have save and transforms in their own files (part 2) (#14899) Fix pullquote import (#15036) Refactor core blocks to have save and transforms in their own files (part 4) (#14903) Refactor core blocks to have save and transforms in their own files (part 3) (#14902) Refactor core blocks to have deprecated extracted to their ownf files (p.1) (#14979) Test transform from media to embed blocks (#13997) If a more recent revision/autosave exists, store its state on editor setup (#7945) chore(release): publish
This was referenced Apr 29, 2019
14 tasks
This was referenced Sep 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Block Directory
Related to the Block Directory, a repository of block plugins
[Package] Block library
/packages/block-library
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Part of aligning block library to Block Registration API RFC #13693.
It's all about moving
save
andtransforms
to their own file to follow the proposal drafted in RFC. There might be some additional fields moved to their own files if I noticed that they were missed or introduced recently.Updated blocks:
How has this been tested?
npm test
npm run test-e2e
Manually tested whether all blocks load as before.