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

Close the post publish panel only when the post becomes dirty #6822

Merged
merged 1 commit into from
May 18, 2018

Conversation

youknowriad
Copy link
Contributor

This PR fixes a regression introduced here #6209 (comment) where we consider post being saved as dirty, so we need to ensure we're not saving the post before closing the post publish panel.

Testing instructions

  • Publish a post
  • The post publish panel should show up
  • Start editing something
  • The post publish panel should hide.

@youknowriad youknowriad added the [Type] Bug An existing feature does not function as intended label May 18, 2018
@youknowriad youknowriad added this to the 2.9 milestone May 18, 2018
@youknowriad youknowriad self-assigned this May 18, 2018
@youknowriad youknowriad requested a review from gziolo May 18, 2018 10:56
@@ -3,6 +3,7 @@
*/
import { join } from 'path';
import { URL } from 'url';
import { SSL_OP_CRYPTOPRO_TLSEXT_BUG } from 'constants';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

oups

@youknowriad youknowriad force-pushed the fix/post-publish-close-panel branch 2 times, most recently from d0da8f1 to eba0562 Compare May 18, 2018 10:57
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

E2e test looks great and covers exactly what I checked manually.

@youknowriad youknowriad force-pushed the fix/post-publish-close-panel branch from eba0562 to 10e9fa7 Compare May 18, 2018 11:04
@youknowriad youknowriad merged commit ac54d9e into master May 18, 2018
@youknowriad youknowriad deleted the fix/post-publish-close-panel branch May 18, 2018 11:11
await page.click( '.editor-post-publish-panel__toggle' );

// Wait for a second ( wait for the animation )
await wait( 1000 );
Copy link
Member

@aduth aduth May 24, 2018

Choose a reason for hiding this comment

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

Is there a way to express this with waitForSelector (e.g. a class or pseudo-class on the available button)? How else can we discourage using wait as a crutch? Could we call this something like waitDurationYesImCertainWaitForSelectorIsNotABetterOption( 1000 ) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:) haha I like the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants