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

Embeds: adjust ordering to better reflect usage. #2175

Merged
merged 1 commit into from Aug 4, 2017

Conversation

mtias
Copy link
Member

@mtias mtias commented Aug 3, 2017

This is a very minimal and low effort step towards better organizing embeds without making any bigger changes.

image

See #2120.

@mtias mtias added [Feature] Blocks Overall functionality of blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Aug 3, 2017
@codecov
Copy link

codecov bot commented Aug 3, 2017

Codecov Report

Merging #2175 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2175   +/-   ##
=======================================
  Coverage   22.15%   22.15%           
=======================================
  Files         138      138           
  Lines        4283     4283           
  Branches      723      723           
=======================================
  Hits          949      949           
  Misses       2814     2814           
  Partials      520      520
Impacted Files Coverage Δ
blocks/library/embed/index.js 45.97% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2beeb4c...be821c7. Read the comment docs.

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as reviewing these sorts of changes, it would be easier if the variants were defined as triples to loop over:

[
	[ 'core/embed', 'Embed', 'video-alt3' ],
	[ 'core-embed/twitter', 'Twitter', 'twitter' ],
	// ...
].forEach( ( [ blockName, title, icon ] ) => {
	registerBlockType(
		blockName,
		getEmbedBlockSettings( {
			title,
			icon,
		} )
	);
} );

@mtias mtias merged commit 3fe881a into master Aug 4, 2017
@mtias mtias deleted the update/order-of-embeds branch August 4, 2017 13:06
@mtias
Copy link
Member Author

mtias commented Aug 4, 2017

@aduth I like that, we would also want to allow aliases like "tweet" for twitter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants