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

Refactor block settings #95

Merged
merged 27 commits into from
Sep 9, 2020
Merged

Conversation

ravewebdev
Copy link
Contributor

@ravewebdev ravewebdev commented Sep 4, 2020

Closes #91

DESCRIPTION

  • Abstracts custom color palette control to new component, ColorPaletteControl.
  • Abstracts background options panel to new component, BackgroundSettingsPanel.
  • Abstracts BackgroundSettingsPanel's media controls to new component, MediaControl.
  • Adds ContrastChecker component to Slide and Accordions blocks to check color contrast and output warning if needed.
  • Updates Slide component to use new panel/control components.
  • Updates Accordions block to use custom color HOCs in save function and withColors HOC in edit function (fixes color selection functionality).
  • Removes custom color palette from global config.js.

SCREENSHOTS

Slide block showing color contrast warning when using background color:
Screenshot_2020-09-09 Edit Post ‹ rave_RPG — WordPress(1)

Accordions block showing color selections:
Screenshot_2020-09-09 Edit Post ‹ rave_RPG — WordPress

OTHER

  • Is this issue accessible? (Section 508/WCAG 2.0AA)
  • Does this issue pass linting? (ESLint)

STEPS TO VERIFY

  1. Add Carousel block.
  2. Customize font color and background type, switching between background color, image, video. Confirm preview and frontend update accordingly.
  3. Choose similar font and background colors to trigger contrast warning.
  4. Add Accordion block.
  5. Customized font and background colors. Confirm preview and frontend update accordingly. Confirm checkmarks show on currently selected color(s).
  6. Choose similar font and background colors to trigger contrast warning.

DOCUMENTATION

Will this pull request require updating the WDS Blocks wiki?
Documentation included in README.md files for new components. Further documentation to be added as per #88.

@ravewebdev ravewebdev self-assigned this Sep 4, 2020
@ravewebdev ravewebdev added this to the 2.1.0 milestone Sep 4, 2020
@ravewebdev ravewebdev force-pushed the enhancement/91-refactor-block-settings branch 2 times, most recently from 459508e to c982fd3 Compare September 8, 2020 16:48
@ravewebdev ravewebdev changed the base branch from master to main September 8, 2020 16:48
@ravewebdev ravewebdev force-pushed the enhancement/91-refactor-block-settings branch 2 times, most recently from ee335e0 to 861ab0b Compare September 8, 2020 22:54
@ravewebdev ravewebdev force-pushed the enhancement/91-refactor-block-settings branch from 8037cc9 to 0c1154d Compare September 9, 2020 18:09
@ravewebdev ravewebdev marked this pull request as ready for review September 9, 2020 18:14
Copy link
Contributor

@gregrickaby gregrickaby left a comment

Choose a reason for hiding this comment

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

@gregrickaby gregrickaby merged commit 3c64da0 into main Sep 9, 2020
@gregrickaby gregrickaby deleted the enhancement/91-refactor-block-settings branch September 9, 2020 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor custom block settings
2 participants