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

Reordering displays the blocks incorrectly #3481

Closed
miina opened this issue Oct 10, 2019 · 3 comments
Closed

Reordering displays the blocks incorrectly #3481

miina opened this issue Oct 10, 2019 · 3 comments
Labels
Bug Something isn't working

Comments

@miina
Copy link
Contributor

miina commented Oct 10, 2019

Bug Description

The block preview in the Reordering interface is off.

Expected Behaviour

The block preview when reordering should reflect the actual page layout quite accurately.

Steps to reproduce

  1. Add some blocks.
  2. Start Reordering
  3. Observe the difference

Screenshots

Editor:
Screenshot 2019-10-10 at 19 29 50

Reordering:
Screenshot 2019-10-10 at 19 29 40

Additional context

  • Gutenberg plugin version (if applicable): latest develop as of 10th of October. Also tested with the latest stable release.

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The block preview when reordering should reflect the actual page layout in terms of layout and proportions

Implementation brief

QA testing instructions

Demo

Changelog entry

  • Improved Gutenberg compatibility on the reorder screen
@miina miina added Bug Something isn't working AMP Stories labels Oct 10, 2019
@swissspidy
Copy link
Collaborator

Ah, was just about to file this as well.

There were some significant changes to the BlockPreview component in Gutenberg. We now don‘t have to scale down and position elements ourselves anymore I think.

@swissspidy swissspidy added this to the v1.4 milestone Oct 18, 2019
@swissspidy swissspidy modified the milestones: v1.4, v.1.4.1 Oct 24, 2019
@spacedmonkey
Copy link
Contributor

Screenshot from 2019-10-28 13-18-08
Screenshot from 2019-10-28 13-17-25

I played around with the css property transform: scale(0.5); to scale the original pages. This results in a perfect preview. However, it would mean we would have to reimplement the reordering.

@swissspidy
Copy link
Collaborator

We probably need to adjust the BlockPreview's viewportWidth prop, as Gutenberg uses that for its internal scale(). Right now we do our own, which is now obsolete though. In other words:

  • Remove our custom scale()
  • Adjust viewportWidth so the preview is correct again

@westonruter westonruter modified the milestones: v.1.4.1, v1.5 Nov 7, 2019
@westonruter westonruter removed this from the v1.5 milestone Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants