Skip to content

Commit

Permalink
Merge branch 'development' into feat/increase-TC-visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
selul authored Apr 23, 2021
2 parents 657b5a5 + ce84d14 commit 23b1226
Show file tree
Hide file tree
Showing 33 changed files with 482 additions and 272 deletions.
17 changes: 9 additions & 8 deletions assets/js/src/frontend/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,17 @@ function handleSearch() {
* Handle the mini cart position in nav.
*/
function handleMiniCartPosition() {
const elem = document.querySelectorAll('.header--row .nv-nav-cart');
if (elem.length === 0) {
const item = document.querySelector('.header--row .menu-item-nav-cart');
if (item === null) {
return;
}
neveEach(elem, (item) => {
const bounding = item.getBoundingClientRect();
if (bounding.left < 0) {
item.style.left = 0;
}
});

const miniCart = item.querySelector('.nv-nav-cart');

if (miniCart !== null) {
miniCart.style.left =
item.getBoundingClientRect().left < 350 ? 0 : null;
}
}

window.addEventListener('resize', handleMiniCartPosition);
Expand Down
10 changes: 9 additions & 1 deletion assets/scss/gutenberg-editor/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,19 @@ h6 {
font-size: 16px;
font-weight: normal;
font-family: $default-font-family;
color: var(--nv-text-color);
line-height: $line-height-base;
text-transform: none;
letter-spacing: normal;

&.wp-block-group.has-background {
padding: 0;
}
&:not(.wp-block-group.has-text-color){
.wp-block{
color: var(--nv-text-color);
}
}

&.components-placeholder {
color: initial;
}
Expand Down
5 changes: 2 additions & 3 deletions dashboard/inc/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,13 @@ private function get_localization() {
'upgradeURL' => esc_url( apply_filters( 'neve_upgrade_link_from_child_theme_filter', 'https://themeisle.com/themes/neve/upgrade/?utm_medium=aboutneve&utm_source=freevspro&utm_campaign=neve' ) ),
'supportURL' => esc_url( 'https://wordpress.org/support/theme/neve/' ),
'docsURL' => esc_url( 'https://docs.themeisle.com/article/946-neve-doc' ),
'codexURL' => esc_url( 'https://codex.nevewp.com/' ),
'strings' => [
'proTabTitle' => wp_kses_post( $plugin_name ),
/* translators: %s - Theme name */
'header' => sprintf( __( '%s Options', 'neve' ), wp_kses_post( $theme_name ) ),
/* translators: %s - Theme name */
'starterSitesCardDescription' => sprintf( __( '%s now comes with a sites library with various designs to pick from. Visit our collection of demos that are constantly being added.', 'neve' ), wp_kses_post( $theme_name ) ),
/* translators: %s - "Public roadmap" */
'sidebarCommunityDescription' => sprintf( __( 'Share opinions, ask questions and help each other on our Neve community! Keep up with what we’re working on and vote to help us prioritize on our %s.', 'neve' ), wp_kses_post( '<a href="https://neve.nolt.io">' . __( 'public roadmap', 'neve' ) . '</a>' ) ),
/* translators: %s - Theme name */
'starterSitesTabDescription' => sprintf( __( 'With %s, you can choose from multiple unique demos, specially designed for you, that can be installed with a single click. You just need to choose your favorite, and we will take care of everything else.', 'neve' ), wp_kses_post( $theme_name ) ),
/* translators: %s - Theme name */
Expand All @@ -222,7 +221,7 @@ private function get_localization() {
'licenseCardDescription' => sprintf(
// translators: store name (Themeisle)
__( 'Enter your license from %1$s purchase history in order to get plugin updates', 'neve' ),
'<a href="https://store.themeisle.com/">ThemeIsle</a>'
'<a target="_blank" rel="external noreferrer noopener" href="https://store.themeisle.com/">ThemeIsle<span class="components-visually-hidden">' . esc_html__( '(opens in new tab)', 'neve' ) . '</span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" class="components-external-link__icon css-6wogo1-StyledIcon etxm6pv0" role="img" aria-hidden="true" focusable="false"><path d="M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"></path></svg></a>'
),
],
'changelog' => $this->cl_handler->get_changelog( get_template_directory() . '/CHANGELOG.md' ),
Expand Down
10 changes: 9 additions & 1 deletion dashboard/src/Components/Content/FreePro.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ const Pro = () => {
'neve'
)}
</p>
<Button href={neveDash.upgradeURL} isPrimary>
<Button
target="_blank"
rel="external noreferrer noopener"
href={neveDash.upgradeURL}
isPrimary
>
{__('Get Neve Pro Now', 'neve')}
<span className="components-visually-hidden">
{__('(opens in a new tab)', 'neve')}
</span>
</Button>
</div>
</div>
Expand Down
55 changes: 33 additions & 22 deletions dashboard/src/Components/Content/Help.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import Card from '../Card';

import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { Button, Icon } from '@wordpress/components';
import { Button, Icon, ExternalLink } from '@wordpress/components';

const Help = (props) => {
const { setTab } = props;

let { docsURL, supportURL, whiteLabel, assets } = neveDash;
let { docsURL, codexURL, supportURL, whiteLabel, assets } = neveDash;
const { supportCardDescription, docsCardDescription } = neveDash.strings;

if (whiteLabel && whiteLabel.agencyURL) {
Expand All @@ -30,30 +30,38 @@ const Help = (props) => {
'neve'
)}
>
<Button
isLink
href="http://docs.themeisle.com/article/219-how-to-build-a-landing-page-with-a-drag-and-drop-content-builder"
>
<ExternalLink href="http://docs.themeisle.com/article/219-how-to-build-a-landing-page-with-a-drag-and-drop-content-builder">
{__('Learn More', 'neve')}
</Button>
</ExternalLink>
</Card>
)}
<Card
icon={assets + 'page.svg'}
title={__('Documentation', 'neve')}
description={docsCardDescription}
>
<Button isLink href={docsURL}>
{!whiteLabel && (
<ExternalLink href={codexURL}>
{__('Go to Neve Codex', 'neve')}
</ExternalLink>
)}
<ExternalLink href={docsURL}>
{__('Go to docs', 'neve')}
</Button>
</ExternalLink>
{!whiteLabel && (
<a
<Button
isLink
className="facebook-badge"
href="https://www.facebook.com/groups/648646435537266/"
target="_blank"
rel="external noreferrer noopener"
>
<span className="components-visually-hidden">
{__('(opens in a new tab)', 'neve')}
</span>
<Icon icon="facebook-alt" />
<span>{__('Join our Facebook Group', 'neve')}</span>
</a>
</Button>
)}
</Card>

Expand All @@ -66,12 +74,9 @@ const Help = (props) => {
'neve'
)}
>
<Button
isLink
href="http://docs.themeisle.com/article/14-how-to-create-a-child-theme"
>
<ExternalLink href="http://docs.themeisle.com/article/14-how-to-create-a-child-theme">
{__('Learn More', 'neve')}
</Button>
</ExternalLink>
</Card>
)}

Expand All @@ -80,7 +85,15 @@ const Help = (props) => {
title={__('Contact Support', 'neve')}
description={supportCardDescription}
>
<Button isPrimary href={supportURL}>
<Button
isPrimary
href={supportURL}
target="_blank"
rel="external noreferrer noopener"
>
<span className="components-visually-hidden">
{__('(opens in a new tab)', 'neve')}
</span>
{__('Contact Support', 'neve')}
</Button>
</Card>
Expand All @@ -94,12 +107,9 @@ const Help = (props) => {
'neve'
)}
>
<Button
isLink
href="http://docs.themeisle.com/article/63-speed-up-your-wordpress-site"
>
<ExternalLink href="http://docs.themeisle.com/article/63-speed-up-your-wordpress-site">
{__('Learn More', 'neve')}
</Button>
</ExternalLink>
</Card>
)}
{!whiteLabel && (
Expand All @@ -110,6 +120,7 @@ const Help = (props) => {
'Want to get the gist on the latest theme changes? Just consult our changelog below to get a taste of the recent fixes and features implemented.',
'neve'
)}
ßßßßß
>
<Button isLink onClick={() => setTab('changelog')}>
{__('View Changelog', 'neve')}
Expand Down
12 changes: 7 additions & 5 deletions dashboard/src/Components/FeatureRow.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Dashicon } from '@wordpress/components';
import { Dashicon, ExternalLink } from '@wordpress/components';
import { useState, createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
Expand Down Expand Up @@ -42,14 +42,16 @@ const FeatureRow = ({ item }) => {
{docsLink &&
createInterpolateElement(
__(
'More details <a>here</a>.',
'More details <external_link>here</external_link>.',
'neve'
),
{
a: (
<a href={docsLink}>
external_link: (
<ExternalLink
href={docsLink}
>
#dumptext
</a>
</ExternalLink>
),
}
)}
Expand Down
11 changes: 8 additions & 3 deletions dashboard/src/Components/ModuleCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import Toggle from './Options/Toggle';
import { changeOption } from '../utils/rest';
import classnames from 'classnames';

import { Button, ToggleControl, Dashicon } from '@wordpress/components';
import {
Button,
ToggleControl,
Dashicon,
ExternalLink,
} from '@wordpress/components';
import { withSelect, withDispatch } from '@wordpress/data';
import { Fragment, useState } from '@wordpress/element';
import { compose } from '@wordpress/compose';
Expand Down Expand Up @@ -155,9 +160,9 @@ const ModuleCard = ({
<p className="card-description">
{description + ' '}
{documentation.url && (
<a href={documentation.url}>
<ExternalLink href={documentation.url}>
{__('Learn More', 'neve')}
</a>
</ExternalLink>
)}
</p>
{links && getModuleStatus(slug) && (
Expand Down
39 changes: 23 additions & 16 deletions dashboard/src/Components/Sidebar.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* global neveDash */
import { changeOption } from '../utils/rest';
import LicenseCard from './LicenseCard';

import { __ } from '@wordpress/i18n';
import { ToggleControl } from '@wordpress/components';
import { useState } from '@wordpress/element';
import { ToggleControl, ExternalLink } from '@wordpress/components';
import { createInterpolateElement, useState } from '@wordpress/element';
import { withDispatch, withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';

Expand All @@ -18,16 +17,24 @@ const Sidebar = ({ currentTab, setToast, loggerValue, setLogger }) => {
<aside className="sidebar card">
<div className="sidebar-section">
<h4>{__('Neve Community', 'neve')}</h4>
<p
dangerouslySetInnerHTML={{
__html:
neveDash.strings
.sidebarCommunityDescription,
}}
/>
<a href="https://www.facebook.com/groups/648646435537266/">
<p>
{createInterpolateElement(
__(
'Share opinions, ask questions and help each other on our Neve community! Keep up with what we’re working on and vote to help us prioritize on our <external_link>public roadmap</external_link>.',
'neve'
),
{
external_link: (
<ExternalLink href="https://neve.nolt.io">
#dumptext
</ExternalLink>
),
}
)}
</p>
<ExternalLink href="https://www.facebook.com/groups/648646435537266/">
{__('Join our Facebook Group', 'neve')}
</a>
</ExternalLink>
</div>
<hr />
<div className="sidebar-section">
Expand All @@ -38,9 +45,9 @@ const Sidebar = ({ currentTab, setToast, loggerValue, setLogger }) => {
'neve'
)}
</p>
<a href="https://wordpress.org/support/theme/neve/reviews/#new-post">
<ExternalLink href="https://wordpress.org/support/theme/neve/reviews/#new-post">
{__('Submit a review', 'neve')}
</a>
</ExternalLink>
</div>
<hr />
<div className="sidebar-section">
Expand All @@ -51,9 +58,9 @@ const Sidebar = ({ currentTab, setToast, loggerValue, setLogger }) => {
'neve'
)}
&nbsp;
<a href="https://docs.themeisle.com/article/1122-neve-usage-tracking">
<ExternalLink href="https://docs.themeisle.com/article/1122-neve-usage-tracking">
{__('What do we track?', 'neve')}
</a>
</ExternalLink>
</p>
<ToggleControl
checked={tracking}
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/scss/components/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

a {
color: $blue;
display: inline-block;
}
}

Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/scss/content/_free-pro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
margin: 0;
}

span {
span:not(.components-visually-hidden) {
display: flex;
align-items: center;
line-height: 1;
Expand Down Expand Up @@ -150,7 +150,7 @@
.large {
font-size: 15px;

span {
span:not(.components-visually-hidden) {
padding: 0 20px;
position: relative;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('Blog/Archive 2 / Grid Layout', function () {

it('Pagination Infinite', function () {
cy.visit('/');
cy.get('.page-numbers').should('not.exist');
cy.get('.page-numbers').should('not.be.visible');
cy.get('.nv-loader').should('exist');
});

Expand Down
3 changes: 2 additions & 1 deletion header-footer-grid/Core/Builder/Footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function init() {
$this->get_property( 'title' ),
/* translators: %s link text */
sprintf(
'<br/><a target="_blank" href="https://docs.themeisle.com/article/946-neve-doc#footer-builder">%s</a>',
'<br/><a target="_blank" rel="external noopener noreferrer" href="https://docs.themeisle.com/article/946-neve-doc#footer-builder"><span class="screen-reader-text">%s</span><svg xmlns="http://www.w3.org/2000/svg" focusable="false" role="img" viewBox="0 0 512 512" width="12" height="12" style="margin-right: 5px;"><path fill="currentColor" d="M432 320H400a16 16 0 0 0-16 16V448H64V128H208a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16H48A48 48 0 0 0 0 112V464a48 48 0 0 0 48 48H400a48 48 0 0 0 48-48V336A16 16 0 0 0 432 320ZM488 0h-128c-21.4 0-32 25.9-17 41l35.7 35.7L135 320.4a24 24 0 0 0 0 34L157.7 377a24 24 0 0 0 34 0L435.3 133.3 471 169c15 15 41 4.5 41-17V24A24 24 0 0 0 488 0Z"/></svg>%s</a>',
esc_html__( '(opens in a new tab)', 'neve' ),
esc_html__( 'Read full documentation', 'neve' )
)
)
Expand Down
3 changes: 2 additions & 1 deletion header-footer-grid/Core/Builder/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public function init() {
$this->get_property( 'title' ),
/* translators: %s link text */
sprintf(
'<br/><a target="_blank" href="https://docs.themeisle.com/article/946-neve-doc#header">%s</a>',
'<br/><a target="_blank" rel="external noopener noreferrer" href="https://docs.themeisle.com/article/946-neve-doc#header"><span class="screen-reader-text">%s</span><svg xmlns="http://www.w3.org/2000/svg" focusable="false" role="img" viewBox="0 0 512 512" width="12" height="12" style="margin-right: 5px;"><path fill="currentColor" d="M432 320H400a16 16 0 0 0-16 16V448H64V128H208a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16H48A48 48 0 0 0 0 112V464a48 48 0 0 0 48 48H400a48 48 0 0 0 48-48V336A16 16 0 0 0 432 320ZM488 0h-128c-21.4 0-32 25.9-17 41l35.7 35.7L135 320.4a24 24 0 0 0 0 34L157.7 377a24 24 0 0 0 34 0L435.3 133.3 471 169c15 15 41 4.5 41-17V24A24 24 0 0 0 488 0Z"/></svg>%s</a>',
esc_html__( '(opens in a new tab)', 'neve' ),
esc_html__( 'Read full documentation', 'neve' )
)
)
Expand Down
Loading

0 comments on commit 23b1226

Please sign in to comment.