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

Alignment panel fix for single element #1193

Merged
merged 7 commits into from
Apr 20, 2020
Merged

Conversation

ndev1991
Copy link
Contributor

@ndev1991 ndev1991 commented Apr 14, 2020

Fixes #1246
For single selection, alignment should work based on page.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2020

Size Change: +46 B (0%)

Total Size: 821 kB

Filename Size Change
assets/js/edit-story.js 445 kB +46 B (0%)
ℹ️ View Unchanged
Filename Size Change
assets/css/edit-story.css 3.04 kB 0 B
assets/css/stories-dashboard.css 3 kB 0 B
assets/js/stories-dashboard.js 369 kB 0 B

compressed-size-action

Copy link
Contributor

@barklund barklund left a comment

Choose a reason for hiding this comment

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

It doesn't actually work for me.

Also, this would be a good occasion to add a full unit test of this panel with all sorts of elements, sizes and positions. The actual alignment handlers in the custom hook should be tested independently from the main panel (simply testing that it invokes the handlers properly).

@ndev1991 ndev1991 added the Type: Bug Something isn't working label Apr 16, 2020
@ndev1991
Copy link
Contributor Author

@barklund Added tests for panel and the custom hooks.

@ndev1991 ndev1991 requested a review from barklund April 16, 2020 11:48
Copy link
Contributor

@barklund barklund left a comment

Choose a reason for hiding this comment

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

Works most excellently, just a few minor comments on style and tests.

@ndev1991 ndev1991 requested a review from barklund April 17, 2020 16:07
Copy link
Contributor

@barklund barklund 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!

@swissspidy swissspidy merged commit 6a314b0 into master Apr 20, 2020
@swissspidy swissspidy deleted the alignment-panel-fix branch April 20, 2020 08:29
obetomuniz added a commit that referenced this pull request Apr 20, 2020
* master: (30 commits)
  Update list of Google Fonts (#1272)
  Exclude template assets from plugin bundle for now (#1267)
  Alignment panel fix for single element (#1193)
  Bump polished from 3.5.1 to 3.5.2 (#1262)
  Bump eslint-plugin-testing-library from 3.0.3 to 3.0.4 (#1264)
  Bump lint-staged from 10.1.4 to 10.1.6 (#1263)
  Bump babel-jest from 25.3.0 to 25.4.0 (#1265)
  Bump jest from 25.3.0 to 25.4.0 (#1266)
  Removed unneeded init code
  Update MultiPartPill to use css power
  Updated SVGs to use currentColor
  Fixed typos
  Template Detail: Updated header and added left/right controls
  use thumbnail size from theme
  Dashboard: Remove circular imports from dashboard app (#1256)
  Bump lint-staged from 10.1.3 to 10.1.4 (#1257)
  fix popover layout
  fix dropdown alignment
  removes new line for buttons
  no boolean in proptypes
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element alignment (align and justify) should work for single element based on page
4 participants