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 formatting options to the Table block inspector sidebar #7035

Closed

Conversation

SymbolicallyMe
Copy link

@SymbolicallyMe SymbolicallyMe commented May 30, 2018

Description

Related #6923.

This PR addresses my issue #7008 which requests that formatting options be added to the Table block inspector sidebar. The following formats were added:

  1. Table border color
  2. Table cell text size
  3. Table cell text color
  4. Table cell background color

How has this been tested?

This solution was tested using the following steps:

  1. Create a new page, add a Table block, then add text to each of the four initial table cells.
  2. Select any cell and apply a border color (applies to all cells).
  3. Select each cell and apply a text and background color, and text size.
  4. Ensure that each adjustment creates an undo level for the TinyMCE instance by checking changes that occur when pressing the Undo and Redo action buttons.
  5. Ensure all changes save correctly when saving then previewing the page.

Screenshots

sidebar

Types of changes

  1. New dependencies
    • isEmpty and parseInt from lodash
    • tinycolor from tinycolor2
    • FontSizePicker and PanelBody from @wordpress/components
    • ContrastChecker, InspectorControls and PanelColor from @wordpress/editor
  2. Stylesheet changes - Changed default border color to dark grey since the previous style inherited the color from the color property.
  3. New Table block methods to help set styles and state

This was tested in:

  • WordPress 4.9.6
  • Gutenberg 2.9.2
  • Apache/PHP 7.1.16
  • MySQL 5.7.22

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@strarsis
Copy link
Contributor

strarsis commented Nov 21, 2018

@SymbolicallyMe: Can table cells (between rows and columns) be merged?
And could classes be assigned to each table cell or row?

@talldan talldan added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Dec 5, 2018
@talldan
Copy link
Contributor

talldan commented Dec 5, 2018

I've added the stale label, as unfortunately the wholesale changes in #8767 mean that a lot of this code is now outdated.

@gziolo
Copy link
Member

gziolo commented Jan 4, 2019

Thanks @SymbolicallyMe for the time you’ve spent on this pull request.

I’m closing this pull request because it is outdated as pointed out by @talldan in the previous comment #7035 (comment).

Feel free to reopen this PR when you resolve all merge conflicts and make it work with the latest version of the block.

@gziolo gziolo closed this Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants