Skip to content

Commit

Permalink
release: small fixes
Browse files Browse the repository at this point in the history
### Bug Fixes
- **Secondary menu** alignment on mobile
- **WooCommerce 8.3** compatibility improvements
- **WooCommerce** breadcrumbs on mobile

### Improvements
- **Update Google Fonts:** Get the newest Google fonts from the public font library.
- **Updated dependencies** using the latest dependencies.
  • Loading branch information
preda-bogdan authored Dec 22, 2023
2 parents 4caea78 + 2b2a592 commit 22fab36
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.1'
php-version: '7.4'
extensions: simplexml
tools: composer:v2.1
- name: Checkout source code
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.1'
php-version: '7.4'
extensions: simplexml, mysql
tools: phpunit-polyfills
- name: Checkout source code
Expand Down
7 changes: 7 additions & 0 deletions assets/scss/components/compat/woocommerce/_breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
color: var(--nv-text-color);
font-size: 14px;
white-space: nowrap;
scrollbar-width: none; /* Firefox */
overflow-x: scroll;

&::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera*/
}


a {
color: var(--nv-secondary-accent);
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/components/compat/woocommerce/_checkout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
border: 0 !important;
}

main button {
main button:not(.wc-block-components-button) {
width: 100%;
}
}
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions globals/google-fonts.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Updated on 27/11/23
* Updated on 18/12/23
*
* @package neve
*/
Expand Down Expand Up @@ -565,6 +565,8 @@
'Happy Monkey' => array( '400',),
'Harmattan' => array( '400', '500', '600', '700',),
'Headland One' => array( '400',),
'Hedvig Letters Sans' => array( '400',),
'Hedvig Letters Serif' => array( '400',),
'Heebo' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900',),
'Henny Penny' => array( '400',),
'Hepta Slab' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900',),
Expand Down Expand Up @@ -899,7 +901,7 @@
'Nanum Gothic Coding' => array( '400', '700',),
'Nanum Myeongjo' => array( '400', '700', '800',),
'Nanum Pen Script' => array( '400',),
'Narnoor' => array( '400',),
'Narnoor' => array( '400', '500', '600', '700', '800',),
'Neonderthaw' => array( '400',),
'Nerko One' => array( '400',),
'Neucha' => array( '400',),
Expand Down Expand Up @@ -1316,20 +1318,26 @@
'Rubik' => array( '300', '400', '500', '600', '700', '800', '900', '300italic', '400italic', '500italic', '600italic', '700italic', '800italic', '900italic',),
'Rubik 80s Fade' => array( '400',),
'Rubik Beastly' => array( '400',),
'Rubik Broken Fax' => array( '400',),
'Rubik Bubbles' => array( '400',),
'Rubik Burned' => array( '400',),
'Rubik Dirt' => array( '400',),
'Rubik Distressed' => array( '400',),
'Rubik Doodle Shadow' => array( '400',),
'Rubik Doodle Triangles' => array( '400',),
'Rubik Gemstones' => array( '400',),
'Rubik Glitch' => array( '400',),
'Rubik Iso' => array( '400',),
'Rubik Lines' => array( '400',),
'Rubik Maps' => array( '400',),
'Rubik Marker Hatch' => array( '400',),
'Rubik Maze' => array( '400',),
'Rubik Microbe' => array( '400',),
'Rubik Mono One' => array( '400',),
'Rubik Moonrocks' => array( '400',),
'Rubik Pixels' => array( '400',),
'Rubik Puddles' => array( '400',),
'Rubik Scribble' => array( '400',),
'Rubik Spray Paint' => array( '400',),
'Rubik Storm' => array( '400',),
'Rubik Vinyl' => array( '400',),
Expand Down
2 changes: 1 addition & 1 deletion inc/views/nav_walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function get_mobile_caret_style() {
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li .wrap a { flex-grow: 1; display: flex; }';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li .wrap a .dd-title { width: var(--wrapdropdownwidth); }';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li .wrap button { border: 0; z-index: 1; background: 0; }';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li:not([class*=block]):not(.menu-item-has-children) > .wrap > a { padding-right: calc(1em + (18px*2));}';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li.menu-item-has-children:not([class*=block]) > .wrap > a { margin-right: calc(-1em - (18px*2));}';

return Dynamic_Css::minify_css( $mobile_button_caret_css );
}
Expand Down
55 changes: 28 additions & 27 deletions tests/test-neve-dynamic-selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function test_css_generation_with_color() {
$css = '';
$css .= $subscriber;
$this->assertNotEmpty( $css );
$this->assertContains( "#ccc", $css );
$this->assertStringContainsString( "#ccc", $css );
}

public function test_css_generation_with_generic_rule() {
Expand All @@ -45,7 +45,7 @@ public function test_css_generation_with_generic_rule() {
] );
$css = '';
$css .= $subscriber;
$this->assertContains('--css-var-example', $css);
$this->assertStringContainsString('--css-var-example', $css);
$this->assertNotEmpty( $css );
}

Expand All @@ -64,8 +64,8 @@ public function test_css_generation_with_value_override() {
$css .= $subscriber;

$this->assertNotEmpty( $css );
$this->assertNotContains( "#bada55", $css );
$this->assertContains( "var(--nv-text-color)", $css );
$this->assertStringNotContainsString( "#bada55", $css );
$this->assertStringContainsString( "var(--nv-text-color)", $css );
}

public function test_css_generation_with_key() {
Expand All @@ -81,7 +81,7 @@ public function test_css_generation_with_key() {
$css .= $subscriber;

$this->assertNotEmpty( $css );
$this->assertContains( "#eee", $css );
$this->assertStringContainsString( "#eee", $css );
}

public function test_css_generation_with_suffix() {
Expand All @@ -98,7 +98,7 @@ public function test_css_generation_with_suffix() {
$css .= $subscriber;

$this->assertNotEmpty( $css );
$this->assertContains( "333em", $css );
$this->assertStringContainsString( "333em", $css );
}

public function test_css_generation_with_default() {
Expand All @@ -113,7 +113,7 @@ public function test_css_generation_with_default() {
$css = '';
$css .= $subscriber;
$this->assertNotEmpty( $css );
$this->assertContains( "929", $css );
$this->assertStringContainsString( "929", $css );
}

public function test_css_generation_with_filter() {
Expand All @@ -132,7 +132,7 @@ public function test_css_generation_with_filter() {
$css = '';
$css .= $subscriber;
$this->assertNotEmpty( $css );
$this->assertContains( "box-shadow: 333px;", $css );
$this->assertStringContainsString( "box-shadow: 333px;", $css );
}

public function test_css_generation_on_breakpoints() {
Expand All @@ -149,7 +149,7 @@ public function test_css_generation_on_breakpoints() {
$tablet_css = '' . $subscriber->for_tablet();

$this->assertNotEmpty( $mobile_css );
$this->assertContains( "929", $mobile_css );
$this->assertStringContainsString( "929", $mobile_css );
$this->assertEmpty( $desktop_css );
$this->assertEmpty( $tablet_css );
}
Expand All @@ -172,9 +172,9 @@ public function test_css_generation_with_responsive() {
$mobile_css = '' . $subscriber;
$desktop_css = '' . $subscriber->for_desktop();
$tablet_css = '' . $subscriber->for_tablet();
$this->assertContains( "10px;", $mobile_css );
$this->assertContains( "50px;", $desktop_css );
$this->assertContains( "300px;", $tablet_css );
$this->assertStringContainsString( "10px;", $mobile_css );
$this->assertStringContainsString( "50px;", $desktop_css );
$this->assertStringContainsString( "300px;", $tablet_css );
}

public function test_css_generation_with_responsiveness_encoded() {
Expand All @@ -194,9 +194,9 @@ public function test_css_generation_with_responsiveness_encoded() {
$mobile_css = '' . $subscriber;
$desktop_css = '' . $subscriber->for_desktop();
$tablet_css = '' . $subscriber->for_tablet();
$this->assertContains( "10px;", $mobile_css );
$this->assertContains( "50px;", $desktop_css );
$this->assertContains( "300px;", $tablet_css );
$this->assertStringContainsString( "10px;", $mobile_css );
$this->assertStringContainsString( "50px;", $desktop_css );
$this->assertStringContainsString( "300px;", $tablet_css );
}

public function test_css_generation_with_responsiveness_no_devices() {
Expand All @@ -212,9 +212,9 @@ public function test_css_generation_with_responsiveness_no_devices() {
$mobile_css = '' . $subscriber;
$desktop_css = '' . $subscriber->for_desktop();
$tablet_css = '' . $subscriber->for_tablet();
$this->assertContains( "200px;", $mobile_css );
$this->assertContains( "200px;", $desktop_css );
$this->assertContains( "200px;", $tablet_css );
$this->assertStringContainsString( "200px;", $mobile_css );
$this->assertStringContainsString( "200px;", $desktop_css );
$this->assertStringContainsString( "200px;", $tablet_css );
}

public function test_css_generation_responsiveness_with_subkey() {
Expand All @@ -236,9 +236,9 @@ public function test_css_generation_responsiveness_with_subkey() {
$mobile_css = '' . $subscriber;
$desktop_css = '' . $subscriber->for_desktop();
$tablet_css = '' . $subscriber->for_tablet();
$this->assertContains( "555px;", $mobile_css );
$this->assertContains( "666px;", $desktop_css );
$this->assertContains( "777px;", $tablet_css );
$this->assertStringContainsString( "555px;", $mobile_css );
$this->assertStringContainsString( "666px;", $desktop_css );
$this->assertStringContainsString( "777px;", $tablet_css );
}

public function test_css_generation_responsiveness_with_subkey_with_suffix() {
Expand All @@ -265,9 +265,9 @@ public function test_css_generation_responsiveness_with_subkey_with_suffix() {
$mobile_css = '' . $subscriber;
$desktop_css = '' . $subscriber->for_desktop();
$tablet_css = '' . $subscriber->for_tablet();
$this->assertContains( "555em;", $mobile_css );
$this->assertContains( "666%;", $desktop_css );
$this->assertContains( "777px;", $tablet_css );
$this->assertStringContainsString( "555em;", $mobile_css );
$this->assertStringContainsString( "666%;", $desktop_css );
$this->assertStringContainsString( "777px;", $tablet_css );
}

public function test_css_generation_with_extra_selectors() {
Expand All @@ -285,8 +285,9 @@ public function test_css_generation_with_extra_selectors() {
] );
$css = '' . $subscriber;

$this->assertContains( ",.one-test-selector", $css );
$this->assertNotContains( \Neve\Core\Settings\Config::CSS_SELECTOR_BTN_PRIMARY_HOVER, $css );
$this->assertContains( "color: #fff", $css );
$this->assertStringContainsString( ",.one-test-selector", $css );
$this->assertStringNotContainsString( \Neve\Core\Settings\Config::CSS_SELECTOR_BTN_PRIMARY_HOVER, $css );
$this->assertStringContainsString( \Neve\Core\Settings\Config::$css_selectors_map[\Neve\Core\Settings\Config::CSS_SELECTOR_BTN_PRIMARY_HOVER], $css );
$this->assertStringContainsString( "color: #fff", $css );
}
}

0 comments on commit 22fab36

Please sign in to comment.