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

Gutenberg: Fix displaying validation warning and usage of PHP function #1612

Merged
merged 3 commits into from
Nov 16, 2018

Conversation

miina
Copy link
Contributor

@miina miina commented Nov 12, 2018

Makes use of core/notices. Updates creating a warning notice.

See #1604.

@kienstra
Copy link
Contributor

Sorry, Will Review Tomorrow

Hi @miina,
Sorry for the delay. Would it be alright if I reviewed this tomorrow?

@miina
Copy link
Contributor Author

miina commented Nov 13, 2018

@kienstra Of course!

@kienstra kienstra changed the base branch from develop to 1.0 November 15, 2018 07:14
@kienstra kienstra changed the base branch from 1.0 to develop November 15, 2018 07:15
@kienstra
Copy link
Contributor

Sorry For The Delay

Hi @miina,
Thanks a lot for fixing this, and sorry for the delay in reviewing it.

@kienstra
Copy link
Contributor

kienstra commented Nov 15, 2018

Looks Good, Request For Review

Hi @westonruter,
Could you please review this when you have a chance?

@miina's PR looks good, and it fixes the issue as I understand it.

It would be great to have this PR in 1.0, but when I changed the target branch from develop to 1.0, it looks like this might have been branched off another branch, as more commits appeared.

Here's a feature branch with Miina's commits cherry-picked onto a branch off of 1.0, in case that might help.

Before

before-console-errors

After

after-gutenberg-expected

@westonruter
Copy link
Member

I'm re-basing the commits here onto the 1.0 branch.

@westonruter westonruter added this to the v1.0 milestone Nov 16, 2018
@westonruter westonruter changed the base branch from develop to 1.0 November 16, 2018 01:44
@westonruter westonruter force-pushed the fix/displaying-validation-warning branch from 6f05668 to 34301c1 Compare November 16, 2018 01:45
@westonruter westonruter changed the title Gutenberg blocks: Fix displaying validation warning Gutenberg: Fix displaying validation warning and usage of PHP function Nov 16, 2018
@westonruter westonruter merged commit 957cdf8 into 1.0 Nov 16, 2018
@westonruter westonruter deleted the fix/displaying-validation-warning branch November 16, 2018 02:16

module.validationWarningNoticeId = wp.data.dispatch( 'core/editor' ).createWarningNotice( noticeElement, { spokenMessage: noticeMessage } ).notice.id;
wp.data.dispatch( 'core/notices' ).createNotice( 'warning', noticeMessage, noticeOptions );
Copy link
Member

Choose a reason for hiding this comment

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

I'm getting an error here now when attempting to edit an existing post:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@westonruter Weird, that would indicate as if core/notices wouldn't exist. Is this with the latest version of Gutenberg?

Copy link
Member

Choose a reason for hiding this comment

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

Humm. I'm not seeing the issue anymore. I opened an incognito window and everything. I'll report if I see it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants