Skip to content

Commit

Permalink
Branch 2.10.0 (#534)
Browse files Browse the repository at this point in the history
* add hover link color control (#522)

* fix #475 (#521)

* fix button styling in menus (#520)

* fix hyphenation on headings (#518)

* fix show / hide title (#519)

* Issue 347 (#517)

* margin fixes

* continued margin fixers

* fix nested margins

* fix escaping

* revert package.json

* change wps version

* changed bin to scripts for phpcs

* phpcs fixes

* update readme

* revert escaping

* fixes for rc2

* fix hover colors

* fix button colors in preview

* fix edit button colors

* fix color classes for tagline

* correct sticky header jump

* fix horizontal margin w/ side header

* update version numbers

* fix hvr-none in preview

* fix php warning

* fix button hover

* fix page title metabox

* changed settings to setting

* update versions & readme

* fix link / button color conflict

* fix full-width button margins

* Update class-boldgrid-framework-comments.php
  • Loading branch information
jamesros161 authored Nov 9, 2021
1 parent 8f571e9 commit 1228fc4
Show file tree
Hide file tree
Showing 29 changed files with 353 additions and 66 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* **Contributors:** rramo012, timph, jamesros161
* **Tags:** inspiration,customization,build,create,design
* **Requires at least:** 4.9
* **Tested up to:** 5.6
* **Tested up to:** 5.8
* **License:** GPL-3.0-or-later
* **License URI:** https://www.gnu.org/licenses/gpl-3.0-standalone.html

Expand Down Expand Up @@ -36,6 +36,17 @@ user guide for more information.

## Changelog ##

### 2.10.0 ###
* Bug Fix: Add Menu Link Hover Color Control in Crio [#328](https://github.com/BoldGrid/boldgrid-theme-framework/issues/328)
* Bug Fix: Explicit button height and nowrap makes buttons on mobile look bad [#475](https://github.com/BoldGrid/boldgrid-theme-framework/issues/475)
* Bug Fix: Improve button display in menus [#509](https://github.com/BoldGrid/boldgrid-theme-framework/issues/509)
* Bug Fix: Remove Text-Wrap from Headings [#508](https://github.com/BoldGrid/boldgrid-theme-framework/issues/508)
* Bug Fix: Cannot work with page title control from page unless Pro is active [#501](https://github.com/BoldGrid/boldgrid-theme-framework/issues/501)
* Bug Fix: Pagination padding and full-width margins creating horizontal scroll on mobile [#357](https://github.com/BoldGrid/boldgrid-theme-framework/issues/357)
* Bug Fix: Continued padding / margin fixes in Crio [#347](https://github.com/BoldGrid/boldgrid-theme-framework/issues/347)
* Bug Fix: Search result excerpt incldues the word Read... unlinked without space [#448](https://github.com/BoldGrid/boldgrid-theme-framework/issues/448)
* Bug Fix: Fix escaping in template file [105677](https://themes.trac.wordpress.org/ticket/105677)

### 2.9.4 ###
* Bug Fix: Fix fatal error with Font Awesome Plugin.

Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ gulp.task('hovers', function() {
digestType: 'base32',
maxLength: 0,
outputName: 'hover1',
classnameFormat: '[classname] a',
classnameFormat: '[classname]:not( .button-primary):not( .button-secondary ) a',
type: '.json'
})
];
Expand All @@ -499,7 +499,7 @@ gulp.task('hoverColors', function() {
digestType: 'base32',
maxLength: 0,
outputName: 'hover2',
classnameFormat: '[classname] a',
classnameFormat: '[classname]:not( .button-primary):not( .button-secondary ) a',
type: '.json'
}),
require('postcss-prefix-selector')({ prefix: '%1$s' })
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boldgrid-theme-framework",
"version": "2.9.4",
"version": "2.10.0",
"description": "BoldGrid Theme Framework",
"main": "index.js",
"engines": {
Expand All @@ -27,7 +27,7 @@
"preversion": "bash build/cwd-dirty && yarn run build",
"postversion": "git tag -d $npm_package_version && node build/update-version.js src/boldgrid-theme-framework.php $npm_package_version && git commit -am \"Updating Version $npm_package_version\" && git tag -a $npm_package_version -m \"Version $npm_package_version Release\" master && git push origin $npm_package_version",
"test": "echo \"Error: no test specified\" && exit 1",
"phpcs-installStandards": "php node_modules/PHP_CodeSniffer/bin/phpcs --config-set installed_paths node_modules/WordPress-Coding-Standards/",
"phpcs-installStandards": "php node_modules/PHP_CodeSniffer/scripts/phpcs --config-set installed_paths node_modules/WordPress-Coding-Standards/",
"php-codesniffer": "npm run phpcs-installStandards && php ./node_modules/PHP_CodeSniffer/scripts/phpcs -p -s -v -n ./src --standard=./phpcs.ruleset.xml --ignore=*/wp_bootstrap_navwalker.php,*/woocommerce/* --extensions=php",
"build": "gulp build",
"webpack-server": "cross-env NODE_ENV=development webpack-dev-server",
Expand Down Expand Up @@ -63,8 +63,8 @@
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.0.0-beta.47",
"@boldgrid/controls": "https://github.com/BoldGrid/controls#dev",
"PHP_CodeSniffer": "https://github.com/squizlabs/PHP_CodeSniffer/#3.6.0",
"WordPress-Coding-Standards": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards#2.3.0",
"PHP_CodeSniffer": "https://github.com/squizlabs/PHP_CodeSniffer/#2.9",
"WordPress-Coding-Standards": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards#0.10.0",
"archiver": "^3.0.0",
"autoprefixer": "^8.6.2",
"babel-eslint": "^8.2.3",
Expand Down
6 changes: 4 additions & 2 deletions phpcs.ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
<rule ref="WordPress-Core">
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found" />
<exclude name="WordPress.Files.FileName.UnderscoresNotAllowed" />
<exclude name="WordPress.NamingConventions.ValidHookName.NotLowercase" />
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="Generic.Commenting.DocComment.InvalidEndChar" />
<exclude name="WordPress.XSS.EscapeOutput.OutputNotEscaped" />
<exclude name="Generic.Commenting.DocComment.InvalidEndChar" />

<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />

Expand All @@ -28,7 +31,6 @@

</rule>

<rule ref="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing">
<severity>0</severity>
<rule ref="WordPress-Extra">
</rule>
</ruleset>
55 changes: 52 additions & 3 deletions src/assets/js/customizer/color/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,29 @@ export class Preview {
getActiveLinkColor( to, menuId ) {
const color = new PaletteSelector().getColor( to );
let css = `
#${menuId} .current-menu-item > a,
#${menuId} .current-menu-ancestor > a,
#${menuId} .current-menu-parent > a {
#${menuId} .current-menu-item:not( .btn ) > a,
#${menuId} .current-menu-ancestor:not( .btn ) > a,
#${menuId} .current-menu-parent:not( .btn ) > a {
color: ${color};
}`;

return css;
}

/**
* Get hover link color CSS.
*
* @param {String} to Thememod's color value.
* @param {String} menuId Menu ID for nav menu instance.
*
* @return {String} css The CSS to add.
*/
getHoverLinkColor( to, menuId ) {
const color = new PaletteSelector().getColor( to );
let css = `
#${menuId} .hvr-none:not( .current-menu-item ):not( .button ) > a:hover,
#${menuId} .hvr-none:not( .current-menu-ancestor ):not( .button ) > a:hover,
#${menuId} .hvr-none:not( .current-menu-parent ):not( .button ) > a:hover {
color: ${color};
}`;

Expand Down Expand Up @@ -341,6 +361,21 @@ export class Preview {
this.previewUtility.updateDynamicStyles( `active-link-color-${location}-inline-css`, css );
}

/**
* Set active menu item link colors.
*
* @since 2.0.0
*
* @param {String} location Location of nav menu instance.
* @param {String} menuId Unique ID for nav menu instance.
*/
setHoverLinkColor( location, menuId ) {
let mod = `bgtfw_menu_items_hover_link_color_${location}`;
let to = wp.customize( mod )();
let css = this.getHoverLinkColor( to, menuId );
this.previewUtility.updateDynamicStyles( `hover-link-color-${location}-inline-css`, css );
}

/**
* Set dynamic menu color configs.
*
Expand Down Expand Up @@ -519,6 +554,9 @@ export class Preview {
// Setup active link color even handlers.
this._bindActiveLinkColors( props.theme_location, props.menu_id );

// Setup hover link color even handlers.
this._bindHoverLinkColors( props.theme_location, props.menu_id );

// Setup event handlers.
this._bindHamburgerColors( props.theme_location, props.menu_id );
}
Expand Down Expand Up @@ -647,6 +685,17 @@ export class Preview {
value.bind( () => this.setActiveLinkColor( location, menuId ) );
} );
}

/**
* Bind hover link color settings
*
* @since 2.0.0
*/
_bindHoverLinkColors( location, menuId ) {
wp.customize( `bgtfw_menu_items_hover_link_color_${location}`, ( value ) => {
value.bind( () => this.setHoverLinkColor( location, menuId ) );
} );
}
}

export default Preview;
5 changes: 5 additions & 0 deletions src/assets/js/customizer/toggle/value.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export class ToggleValue extends Base {
* @param {Mixed} to New value control is updating to.
*/
bound( to ) {

// if this is an items_hover_effect control, and set to none, we need to add the hvr-none class.
if ( this.id.includes( 'bgtfw_menu_items_hover_effect' ) && '' === to ) {
to = 'hvr-none';
}
$( this.element ).removeClass( this.remove ).addClass( to ) && this.cb();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/assets/scss/attributes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
.bgtfw-page-title .template-subtitle {
display: inline;
margin: 0;
text-transform: capitalize;
}

#bgtfw-attributes-meta-box div.inside {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/boldgrid/_bootstrap-additions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}
}

.row .row,
.row:not( .bg-editor-hr-wrap ) .row:not( .bg-editor-hr-wrap ),
.container .entry-content .boldgrid-section {
margin-left: -15px;
margin-right: -15px;
Expand Down
10 changes: 8 additions & 2 deletions src/assets/scss/boldgrid/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
@if variable-exists( button-primary-classes ) {
input[type=submit],
.button-primary,
.button-primary:not( .menu-item ),
.woocommerce .button,
div.wpforms-container-full .wpforms-form button[type=submit] {
.palette-primary & {
@extend #{$button-primary-classes};
}
}
.btn.menu-item {
height: unset;
}
}

@if variable-exists( button-secondary-classes ) {
.button-secondary,
.button-secondary:not( .menu-item ),
.woocommerce .alt.button {
.palette-primary & {
@extend #{$button-secondary-classes};
}
}
.btn.menu-item {
height: unset;
}
}
7 changes: 5 additions & 2 deletions src/assets/scss/boldgrid/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body.custom-background {
.palette-primary {
@include headings() {
word-wrap: break-word;
hyphens: auto;
hyphens: manual;
}
}

Expand Down Expand Up @@ -75,6 +75,9 @@ blockquote {
.btn,
.button-primary,
.button-secondary {
white-space: normal;
height: unset !important;
min-height: 40px;
&:hover,
&:focus {
text-decoration: none;
Expand All @@ -87,7 +90,7 @@ div {
&.button-primary,
&.button-secondary {
position: relative;

white-space: wrap;
a {
color: currentColor !important;
}
Expand Down
Loading

0 comments on commit 1228fc4

Please sign in to comment.