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

Add Waves Block 🌊 #86

Merged
merged 51 commits into from
May 21, 2020
Merged

Add Waves Block 🌊 #86

merged 51 commits into from
May 21, 2020

Conversation

ajlende
Copy link
Contributor

@ajlende ajlende commented May 2, 2020

Summary

After chatting with @pablohoneyhoney, the motion background idea is getting simplified, both from a UX and a code perspective. Part of the simplification involves splitting it into two types of blocks: color effects, and image effects. This PR is for the waves color effect.

Changes from motion background

  • Render directly to a canvas (no more multiple blocks per canvas)
  • Remove image selection, only do colors/gradients
  • Add gradient fallback for devices without hardware acceleration (or JS disabled)
    • Gradient fallback
    • Investigate rendering to image for fallback
  • Add controls for minimum height like the cover block
  • Use InnerBlocks like the cover block
  • Respect prefers-reduced-motion ( thanks for the suggestion @talldan :) )
  • Fix bug where effect doesn't show until refreshing page
  • Try to provide some sort of color contrast a11y
  • Rename 'Gradient' to 'Color' in settings panel
  • Use theme colors for default colors
  • Provide better effect defaults
  • Further design feedback
  • New design assets (icon, etc.)

Screenshots

high resolution editor screenshot

Walkthrough

create color effects block

adjust text styles

adjust block size

adjust block animation

adjust block colors

Fallback when hardware acceleration or JavaScript is disabled

JavaScript disabled

When prefers-reduced-motion setting is enabled

prefers reduced motion

Outdated screenshots

When prefers-reduced-motion setting is enabled

reduce-motion

Fallback when hardware acceleration is disabled

fallback

Plugin Bundle

a8c-waves-2020-05-21.zip

Outdated bundles

a8c-color-effects-2020-05-14.zip

@ajlende ajlende added the Enhancement New feature or request label May 2, 2020
@ajlende ajlende self-assigned this May 2, 2020
@ajlende
Copy link
Contributor Author

ajlende commented May 2, 2020

@pablohoneyhoney feel free to add any design critique or ideas here. I've been adding things to the checklist in the description as I think of them.

@ajlende
Copy link
Contributor Author

ajlende commented May 8, 2020

It doesn't seem like I can do much for color a11y right now. WordPress/gutenberg#13862 is open, and the solution for the Group block doesn't seem to apply since text color is entirely controlled by the InnerBlocks.

@ajlende ajlende marked this pull request as ready for review May 13, 2020 16:09
@pablohoneyhoney
Copy link

Can we further reduce the limits of the distortion? @ajlende

@ajlende ajlende changed the title Add Color Effects Block Add Waves Block May 21, 2020
@ajlende ajlende changed the title Add Waves Block Add Waves Block 🌊 May 21, 2020
@ajlende ajlende merged commit ed854b6 into master May 21, 2020
@ajlende ajlende deleted the add/color-effects branch May 21, 2020 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants