Skip to content

Commit

Permalink
Merge pull request #25 from material-components/feature/12-gallery-op…
Browse files Browse the repository at this point in the history
…tions

Update gallery default columns for desktop and add tooltips
  • Loading branch information
ravichdev committed Apr 6, 2021
2 parents 73d3422 + 317caff commit e0af1e4
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module.exports = function( grunt ) {
'!theme/assets/css/src/**',
'!theme/assets/css/*.map',
'!theme/assets/js/.gitignore',
'!theme/assets/js/*.css',
'!theme/assets/js/*.php',
'!theme/assets/js/*.map',
'!theme/assets/js/editor*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"columns": {
"type": "object",
"default": {
"desktop": 4,
"desktop": 5,
"tablet": 3,
"mobile": 1
}
Expand Down
21 changes: 11 additions & 10 deletions plugin/assets/src/block-editor/components/layout-controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import classNames from 'classnames';
/**
* WordPress dependencies
*/
import { BaseControl, RangeControl } from '@wordpress/components';
import { BaseControl, RangeControl, Tooltip } from '@wordpress/components';
import { useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

Expand Down Expand Up @@ -59,15 +59,16 @@ export default ( {
{ label }
<div className="components-base-control__label-actions components-base-control__layout-controls">
{ DEVICES.map( device => (
<button
key={ device.name }
className={ classNames( '', {
'is-selected': device.name === selectedDevice,
} ) }
onClick={ () => setSelectedDevice( device.name ) }
>
<i className="material-icons">{ device.icon }</i>
</button>
<Tooltip text={ device.label } key={ device.name }>
<button
className={ classNames( '', {
'is-selected': device.name === selectedDevice,
} ) }
onClick={ () => setSelectedDevice( device.name ) }
>
<i className="material-icons">{ device.icon }</i>
</button>
</Tooltip>
) ) }
</div>
</BaseControl.VisualLabel>
Expand Down
8 changes: 8 additions & 0 deletions plugin/assets/src/block-editor/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
* limitations under the License.
*/

/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';

const NAMESPACE = '/wp/v2';
export const ENDPOINTS = {
root: NAMESPACE,
Expand All @@ -24,13 +29,16 @@ export const DEVICES = [
{
name: 'desktop',
icon: 'computer',
label: __( 'Layout Settings for Desktop', 'material-design' ),
},
{
name: 'tablet',
icon: 'tablet',
label: __( 'Layout Settings for Tablet', 'material-design' ),
},
{
name: 'mobile',
icon: 'smartphone',
label: __( 'Layout Settings for Mobile', 'material-design' ),
},
];
2 changes: 0 additions & 2 deletions plugin/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ The official Material Design plugin for WordPress. Customize your site’s navig
**Stable tag:** 0.1.2
**License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)

[![Build Status](https://travis-ci.com/material-components/material-design-for-wordpress.svg?branch=develop)](https://travis-ci.com/material-components/material-design-for-wordpress) [![Coverage Status](https://coveralls.io/repos/material-components/material-design-for-wordpress/badge.svg?branch=develop)](https://coveralls.io/github/material-components/material-design-for-wordpress) [![Built with Grunt](https://gruntjs.com/cdn/builtwith.svg)](http://gruntjs.com)

## Description ##

The official Material Design plugin for WordPress. Customize your site’s navigation, colors, typography, and shapes, use Material Components, and choose from over 1,000 Google Fonts and Material Design icons. From the team behind Google’s open-source design system.
Expand Down
6 changes: 2 additions & 4 deletions theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ The official Material Design Theme for WordPress.

**Contributors:** [google](https://profiles.wordpress.org/google), [materialdesign](https://profiles.wordpress.org/materialdesign), [xwp](https://profiles.wordpress.org/xwp)
**Requires at least:** 5.0
**Tested up to:** 5.6
**Tested up to:** 5.7
**Stable tag:** 0.1.4
**License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
**Requires PHP:** 5.6

[![Build Status](https://travis-ci.com/xwp/material-design-wp-theme.svg?branch=develop)](https://travis-ci.com/xwp/material-design-wp-theme) [![Built with Grunt](https://gruntjs.com/cdn/builtwith.svg)](http://gruntjs.com)

## Description ##

The official Material Design Theme for WordPress – from the team behind Google’s open-source design system. Apply Material Design principles and Material Theming to your site, and customize its style. Pair this with the official Material Design for WordPress plugin to customize your site’s navigation, colors, typography, and shapes, use Material Components, and choose from over 1,000 Google Fonts and Material Design icons.
Expand Down Expand Up @@ -40,7 +38,7 @@ Material Design is a design system created by Google and backed by open-source c

## Changelog ##

For the theme’s changelog, please see [the Releases page on GitHub](https://github.com/xwp/material-design-wp-theme/releases).
For the theme’s changelog, please see [the Releases page on GitHub](https://github.com/material-components/material-design-for-wordpress/releases).

## Copyright ##

Expand Down
4 changes: 2 additions & 2 deletions theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/
/*!
Theme Name: Material Design Google
Theme URI: https://github.com/xwp/material-design-wp-theme
Theme URI: https://github.com/material-components/material-design-for-wordpress
Author: Material Design
Author URI: https://material.io/
Description: The official Material Design theme for WordPress – from the team behind Google’s open-source design system. Apply Material Design principles and Material Theming to your site, and customize its style. Pair this with the official Material Design for WordPress plugin to customize your site’s navigation, colors, typography, and shapes, use Material Components, and choose from over 1,000 Google Fonts and Material Design icons.
Version: 0.1.4
License: Apache License, Version 2.0
License URI: https://www.apache.org/licenses/LICENSE-2.0
Text Domain: material-design-google
Tested up to: 5.6
Tested up to: 5.7
Requires PHP: 5.6
Tags: blog, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, one-column, threaded-comments, accessibility-ready, footer-widgets, editor-style, sticky-post, translation-ready, rtl-language-support, block-styles, wide-blocks
Expand Down

0 comments on commit e0af1e4

Please sign in to comment.