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

Add the new media flow to the media text block #19198

Merged
merged 2 commits into from
Jan 7, 2020

Conversation

draganescu
Copy link
Contributor

Description

Requires #18139 There is a new replace flow offered by a component which is currently implemented in the Image Block. This PR implements the new flow in the Media + Text block.

How has this been tested?

Tested locally.

Screenshots

Screenshot 2019-12-17 at 17 06 37

@draganescu draganescu changed the title Add the new media flow to the media text block wip: Add the new media flow to the media text block Dec 17, 2019
@draganescu draganescu changed the title wip: Add the new media flow to the media text block Add the new media flow to the media text block Dec 18, 2019
@draganescu draganescu added the [Block] Media & Text Affects the Media & Text Block label Dec 18, 2019
@draganescu draganescu force-pushed the add/media-flow-media-text-block branch from 47d9458 to b74fc82 Compare January 6, 2020 11:20
@draganescu draganescu requested a review from Soean January 6, 2020 11:21
mediaUrl: newURL,
href: newHref,
mediaId: undefined,
sizeSlug: DEFAULT_SIZE_SLUG,
Copy link
Member

Choose a reason for hiding this comment

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

There is no sizeSlug attribute in the media-text block.

export const LINK_DESTINATION_ATTACHMENT = 'attachment';
const LINK_DESTINATION_MEDIA = 'media';
const LINK_DESTINATION_ATTACHMENT = 'attachment';
const DEFAULT_SIZE_SLUG = 'large';
Copy link
Member

Choose a reason for hiding this comment

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

We can remove the default, because there is no sizeSlug attribute.

Copy link
Member

@Soean Soean left a comment

Choose a reason for hiding this comment

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

Thanks, works great!

@draganescu draganescu merged commit 6a940eb into master Jan 7, 2020
@draganescu draganescu deleted the add/media-flow-media-text-block branch January 7, 2020 09:36
@ellatrix ellatrix added this to the Gutenberg 7.3 milestone Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants