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

Post Revisions: Rework layout of main post revisions containers #20232

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

frontdevde
Copy link
Contributor

@frontdevde frontdevde commented Nov 27, 2017

This PR

  • adds a rework of the layout of the main post revisions containers
  • resolves several cross-browser issues incl. diff content not showing in Safari

How to test

Repeat the following in Chrome, Safari, Firefox & Edge
(if you're missing any you could use browserstack.com)

  • Use the calypso.live link below or check out locally
  • Navigate to or create a post with revisions
  • Click on the History button to trigger the Post Revisions modal
  • The revisions should load including their content
  • Open wpcalypso.wordpress.com in a second tab
  • Repeat the same process in the second tab as described above
  • The visual appearance of tab 1 and tab 2 should basically be identical

Cross-browser testing

Chrome
Everything should look like before.
In addition, all content should now always stay in the modal, even when resizing erratically.

screen shot 2017-11-27 at 00 05 45

Safari
Safari should now always display the diff content after it's been computed.
No weird hardware acceleration hack needed anymore, it just works. Fixes #20000 .

screen shot 2017-11-27 at 00 07 10

Firefox
Surf around, any intermittent glitches observed previously should be gone.
If you don't spot anything that's a good sign :)

screen shot 2017-11-27 at 00 06 30

Edge
Yep, even Edge should look good now. 🎉

screen shot 2017-11-27 at 00 09 57

@frontdevde frontdevde added [Feature] Post/Page Editor The editor for editing posts and pages. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 27, 2017
@frontdevde frontdevde self-assigned this Nov 27, 2017
@matticbot
Copy link
Contributor


@include breakpoint( '>660px' ) {
border-left: 1px solid darken($sidebar-bg-color, 5%);
z-index: 1; // Put the list above the action-buttons:before overlay gradient. -shaun
width: 230px;
bottom: 73px;
flex-basis: 230px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

On desktop the flex-basis defines the width.

left: 0;
height: 120px;
}
flex-basis: 120px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

On mobile the flex-basis defines the height thanks to flex-direction: column-reverse;

@jblz jblz requested a review from shaunandrews November 27, 2017 15:52
@jblz
Copy link
Member

jblz commented Nov 27, 2017

@shaunandrews -- I'd appreciate a quick pass on this if you have a second.

@jblz
Copy link
Member

jblz commented Nov 27, 2017

This is working well on Chrome for me -- we should test on Edge once #20186 is merged & this rebased.

@frontdevde frontdevde force-pushed the update/post-revisions/layout-rework branch from cbc7ba3 to dc2e142 Compare November 27, 2017 16:59
@frontdevde
Copy link
Contributor Author

@jblz PR #20186 was merged and this PR rebased with master.
Should be good to test in Edge now as well 👍

@shaunandrews
Copy link
Contributor

I managed to break the site switcher with this PR. Steps to reproduce:

  1. View a revision
  2. Cancel out of the revisions modal
  3. Click the back arrow in the top-left of the editor
  4. Open the site switch (click Switch Site in the sidebar)

You'll get something like this:

pasted_image_at_2017_11_27_12_28_pm_720

You should get something like this, with a search input and a message about hidden sites (if you have any):

pasted_image_at_2017_11_27_12_31_pm_720

There's a little scrolling lag in Safari as the revisions load, but after a few seconds it seems to resolve itself. I'm sad mobile is still "turned off," but I get the reasoning (performance issues related to client-side diff'ing).

Otherwise, this looks good.

@frontdevde
Copy link
Contributor Author

Thanks for having a look at the PR and reporting this issue, @shaunandrews!
As the issue mentioned is reproducible on wpcalypso, it appears to be unrelated to the changes introduced in this PR. It, therefore, shouldn't block this PR. The issue has been noted either way and we've created a task for further investigation.

Copy link
Member

@jblz jblz left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@jblz jblz added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 27, 2017
@frontdevde frontdevde merged commit 1c76468 into master Nov 27, 2017
@frontdevde frontdevde deleted the update/post-revisions/layout-rework branch November 27, 2017 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor: History: Doesn't show in Safari until you click the cancel button
4 participants