diff --git a/assets/apps/customizer-controls/src/scss/_documentation.scss b/assets/apps/customizer-controls/src/scss/_documentation.scss index 0127d74c85..305dda1ece 100644 --- a/assets/apps/customizer-controls/src/scss/_documentation.scss +++ b/assets/apps/customizer-controls/src/scss/_documentation.scss @@ -1,25 +1,32 @@ .control-section.neve-documentation { - display: block !important; - margin-bottom: 0; - margin-top: -1px; - .documentation-inner { - display: flex; - } - .neve-customizer-heading { - padding: 7px 10px 7px 14px; - display: flex; - flex-grow: 1; - margin: auto; - letter-spacing: initial; - font-size: 14px; - font-weight: 600; + display: block !important; + margin-bottom: 0; + margin-top: -1px; - &:hover, &:focus-within { - cursor: default; + .documentation-inner { + display: flex; + } + .neve-customizer-heading { + padding: 5px 15px 5px 18px; + display: flex; + flex-grow: 1; + margin: auto; + align-items: center; + justify-content: space-between; + letter-spacing: initial; + font-size: 14px; + font-weight: 600; + gap: 10px; + height: unset; + + &:hover, + &:focus-within { + cursor: default; + } } .components-button { - margin-left: auto; + height: auto; + padding: 9px 15px; } - } } diff --git a/assets/apps/customizer-controls/src/scss/_upsell.scss b/assets/apps/customizer-controls/src/scss/_upsell.scss index 8ef480a567..6aa6289638 100644 --- a/assets/apps/customizer-controls/src/scss/_upsell.scss +++ b/assets/apps/customizer-controls/src/scss/_upsell.scss @@ -1,36 +1,47 @@ -$upsell_blue: #0065A6 !default; +$upsell_blue: #0065a6 !default; .control-section.neve-upsell { - margin-bottom: 0; - .upsell-inner { - display: flex; + border-top: none !important; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + &:hover { + border-left-color: $upsell_blue; + } + + margin-bottom: 0; + .upsell-inner { + display: flex; } .neve-customizer-heading { - color: $upsell_blue; - padding: 7px 10px 7px 14px; - display: flex; - flex-grow: 1; - margin: auto; - letter-spacing: initial; - font-size: 14px; - font-weight: 600; + color: $upsell_blue; + padding: 5px 15px 5px 18px; + display: flex; + flex-grow: 1; + margin: auto; + letter-spacing: initial; + font-size: 14px; + align-items: center; + gap: 10px; + justify-content: space-between; + height: auto; - &:hover, &:focus-within { - background-color: $upsell_blue; - color: #fff; - cursor: default; + &:hover, + &:focus-within { + background-color: $upsell_blue; + color: #fff; + cursor: default; - .components-button { - background: #fff; - color: $upsell_blue; + .components-button { + background: #fff; + color: $upsell_blue; + } } - } - .components-button { - margin-left: auto; - font-weight: 600; - font-size: 14px; - background: $upsell_blue; - } + .components-button { + background: $upsell_blue; + height: auto; + padding: 9px 15px; + } } } diff --git a/assets/apps/dashboard/src/Components/Content/Welcome.js b/assets/apps/dashboard/src/Components/Content/Welcome.js index 15058a2ee9..8a57f78b85 100644 --- a/assets/apps/dashboard/src/Components/Content/Welcome.js +++ b/assets/apps/dashboard/src/Components/Content/Welcome.js @@ -4,10 +4,11 @@ import { LucidePanelsTopLeft } from 'lucide-react'; import Card from '../../Layout/Card'; import { NEVE_HAS_PRO } from '../../utils/constants'; -import Link from '../Common/Link'; + import TransitionWrapper from '../Common/TransitionWrapper'; import ModuleGrid from './ModuleGrid'; import PluginsCard from './Sidebar/PluginsCard'; +import Button from '../Common/Button'; export default () => ( @@ -19,19 +20,35 @@ export default () => ( const CustomizerShortcutsCard = () => ( } + className="border border-blue-300" + afterTitle={ + + } > -
+
{neveDash.customizerShortcuts.map(({ text, link, description }) => ( -
- + + + {text} + {description && ( {description} )} -
+ ))}
diff --git a/assets/apps/dashboard/src/Components/SkeletonLoader.js b/assets/apps/dashboard/src/Components/SkeletonLoader.js index 59bed50123..58393e1f51 100644 --- a/assets/apps/dashboard/src/Components/SkeletonLoader.js +++ b/assets/apps/dashboard/src/Components/SkeletonLoader.js @@ -1,131 +1,103 @@ -const SkeletonLoader = () => ( -
-
-
+const SkeletonLoader = () => { + return ( +
+ {/* Header Skeleton */} +
-
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
-
-
-
-
+ {/* Main Content Skeleton */} +
+
+ {/* Get Started Section */} +
-
-
+
+
+
+
+
-
- {[...Array(8)].map((_, i) => ( +
+ {[1, 2, 3, 4, 5, 6, 7, 8].map((i) => (
))}
-
-
-
-
+ {/* Plugins Section */} +
+
+
- {[...Array(8)].map((_, i) => ( -
-
-
-
-
-
+
+ {[1, 2, 3, 4, 5, 6].map((i) => ( +
+
+
+
+
+
+
+
-
-
- ))} + ))} +
-
-
-
- {[...Array(2)].map((_, i) => ( -
-
-
-
-
-
-
- ))} -
-
-
-
- {[...Array(6)].map((_, i) => ( + {/* Sidebar Skeleton */} +
+
+ {[1, 2, 3, 4].map((i) => (
-
-
-
-
-
-
-
+
+
+
))}
-
-); + ); +}; export default SkeletonLoader; diff --git a/assets/customizer/css/_generic.css b/assets/customizer/css/_generic.css index 3d201c37c5..988346d64f 100644 --- a/assets/customizer/css/_generic.css +++ b/assets/customizer/css/_generic.css @@ -94,4 +94,9 @@ #nv-starter-content-notice .nv-notice-error { text-align: center; color: red; +} + +.neve-separator-section { + margin: 20px auto; + max-width: 90%; } \ No newline at end of file diff --git a/assets/customizer/js/separator-section.js b/assets/customizer/js/separator-section.js new file mode 100644 index 0000000000..b3e47ea648 --- /dev/null +++ b/assets/customizer/js/separator-section.js @@ -0,0 +1,9 @@ +wp.customize.sectionConstructor.neve_separator = wp.customize.Section.extend({ + // No events for this type of section. + attachEvents() {}, + + // Always make the section active. + isContextuallyActive() { + return true; + }, +}); diff --git a/e2e-tests/fixtures/customizer/form-fields/form-fields-setup.json b/e2e-tests/fixtures/customizer/form-fields/form-fields-setup.json index 203c8a65e3..878bbb39f3 100644 --- a/e2e-tests/fixtures/customizer/form-fields/form-fields-setup.json +++ b/e2e-tests/fixtures/customizer/form-fields/form-fields-setup.json @@ -1,4 +1,5 @@ { + "neve_single_post_sidebar_layout": "right", "neve_migrated_hfg_colors": true, "nav_menu_locations": [], "ti_prev_theme": "twentytwentyone", diff --git a/e2e-tests/specs/admin/tpc-notice-install.spec.ts b/e2e-tests/specs/admin/tpc-notice-install.spec.ts index 276c8dc770..74280c9545 100644 --- a/e2e-tests/specs/admin/tpc-notice-install.spec.ts +++ b/e2e-tests/specs/admin/tpc-notice-install.spec.ts @@ -32,10 +32,11 @@ test.describe('Dashboard Notice', () => { const categories = await page.locator('.ob-cat-wrap .cat'); await expect(categories).toContainText([ 'Business', - 'Personal', - 'Blogging', - 'Portfolio', - 'E-Shop', + 'Education', + 'eCommerce', + 'News', + 'Non-Profit', + 'Health', ]); await page.goto('/wp-admin/index.php'); diff --git a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts index 7ab8ab8caa..ca1745c7e3 100644 --- a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts +++ b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts @@ -32,7 +32,10 @@ test.describe('Custom Global Color Control', () => { '/wp-admin/post.php?post=1&action=edit&test_name=custom-global-colors' ); await clearWelcome(page); - await page.frameLocator('[name="editor-canvas"]').locator('.block-editor-rich-text__editable').first().click(); + await page + .locator('.block-editor-rich-text__editable') + .first() + .click({ force: true }); await page.getByRole('button', { name: 'Background' }).click(); await page.getByRole('option', { name: 'Color: Custom 1' }).click(); await page diff --git a/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts b/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts index d5c7552b37..f1547ffaf7 100644 --- a/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts +++ b/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts @@ -28,7 +28,10 @@ test.describe('Menu item description', function () { await page.getByRole('button', { name: 'Add New Category' }).click(); await page.goto('wp-admin/nav-menus.php'); - await page.getByRole('button', { name: 'Categories' }).click(); + await page + .locator('.accordion-section-title') + .getByText('Categories') + .click(); await page .locator('#taxonomy-category-tabs') .getByRole('link', { name: 'View All' }) diff --git a/e2e-tests/specs/customizer/layout/blog-archive-settings.spec.ts b/e2e-tests/specs/customizer/layout/blog-archive-settings.spec.ts index 207c9526dc..a8fb3386a1 100755 --- a/e2e-tests/specs/customizer/layout/blog-archive-settings.spec.ts +++ b/e2e-tests/specs/customizer/layout/blog-archive-settings.spec.ts @@ -208,7 +208,7 @@ test.describe('Blog/Archive 3 / Covers Layout', () => { ).not.toEqual(0); await expect(coverPost).toHaveCSS( 'box-shadow', - 'rgba(0, 0, 0, 0.12) 0px 14px 28px 0px, rgba(0, 0, 0, 0.12) 0px 10px 10px 0px' + 'rgba(0, 0, 0, 0.15) 0px 0px 2px 0px' ); } }); diff --git a/inc/admin/dashboard/main.php b/inc/admin/dashboard/main.php index dde01a2a80..51245db289 100755 --- a/inc/admin/dashboard/main.php +++ b/inc/admin/dashboard/main.php @@ -354,6 +354,7 @@ private function get_localization() { 'tpcPath' => defined( 'TIOB_PATH' ) ? TIOB_PATH . 'template-patterns-collection.php' : 'template-patterns-collection/template-patterns-collection.php', 'tpcAdminURL' => admin_url( 'admin.php?page=tiob-starter-sites' ), 'tpcOnboardingURL' => admin_url( 'admin.php?page=neve-onboarding' ), + 'customizerURL' => admin_url( 'customize.php' ), 'pluginsURL' => esc_url( admin_url( 'plugins.php' ) ), 'getPluginStateBaseURL' => esc_url( rest_url( '/nv/v1/dashboard/plugin-state/' ) ), 'canInstallPlugins' => current_user_can( 'install_plugins' ), diff --git a/inc/compatibility/starter-content/theme-mods.php b/inc/compatibility/starter-content/theme-mods.php index dc4f7d631b..b6471ddcf5 100644 --- a/inc/compatibility/starter-content/theme-mods.php +++ b/inc/compatibility/starter-content/theme-mods.php @@ -218,42 +218,6 @@ 'neve_container_width' => '{"mobile":748,"tablet":992,"desktop":1170}', 'neve_default_container_style' => 'contained', 'neve_text_color' => '#2b2b2b', - 'neve_h2_typeface_general' => - array( - 'fontWeight' => '600', - 'textTransform' => 'none', - 'letterSpacing' => - array( - 'mobile' => 0, - 'tablet' => 0, - 'desktop' => 0, - ), - 'lineHeight' => - array( - 'mobile' => '1.3', - 'tablet' => '1.3', - 'desktop' => '1.3', - 'suffix' => - array( - 'mobile' => 'em', - 'tablet' => 'em', - 'desktop' => 'em', - ), - ), - 'fontSize' => - array( - 'mobile' => '28', - 'tablet' => '34', - 'desktop' => '46', - 'suffix' => - array( - 'mobile' => 'px', - 'tablet' => 'px', - 'desktop' => 'px', - ), - ), - 'flag' => false, - ), 'neve_h3_typeface_general' => array( 'fontWeight' => '600', diff --git a/inc/customizer/base_customizer.php b/inc/customizer/base_customizer.php index 90177aada7..a55d30ef74 100644 --- a/inc/customizer/base_customizer.php +++ b/inc/customizer/base_customizer.php @@ -85,6 +85,7 @@ abstract class Base_Customizer { */ public function init() { add_action( 'customize_register', array( $this, 'register_controls_callback' ) ); + add_action( 'customize_register', array( $this, 'after_controls_registered' ), PHP_INT_MAX ); } /** @@ -105,6 +106,11 @@ public function register_controls_callback( $wp_customize ) { $this->register_partials(); } + /** + * After all controls are registered. + */ + public function after_controls_registered() {} + /** * Function that should be extended to add customizer controls. * @@ -262,7 +268,6 @@ public function add_section( Section $section ) { */ public function add_panel( Panel $panel ) { array_push( $this->panels_to_register, $panel ); - } /** diff --git a/inc/customizer/controls/separator_section.php b/inc/customizer/controls/separator_section.php new file mode 100644 index 0000000000..b88d18494b --- /dev/null +++ b/inc/customizer/controls/separator_section.php @@ -0,0 +1,32 @@ +id . '" class="neve-separator-section">'; + $output .= '
'; + $output .= ''; + + echo wp_kses_post( $output ); + } +} diff --git a/inc/customizer/options/buttons.php b/inc/customizer/options/buttons.php index 6d2c4494e2..fbc40aaf09 100644 --- a/inc/customizer/options/buttons.php +++ b/inc/customizer/options/buttons.php @@ -42,6 +42,7 @@ public function add_controls() { array( 'priority' => 40, 'title' => esc_html__( 'Buttons', 'neve' ), + 'panel' => 'neve_layout', ) ) ); diff --git a/inc/customizer/options/colors_background.php b/inc/customizer/options/colors_background.php index 756998d18f..4d5f9f96d4 100644 --- a/inc/customizer/options/colors_background.php +++ b/inc/customizer/options/colors_background.php @@ -44,6 +44,7 @@ private function section_colors_background() { array( 'priority' => 27, 'title' => esc_html__( 'Colors & Background', 'neve' ), + 'panel' => 'neve_layout', ) ) ); diff --git a/inc/customizer/options/form_fields.php b/inc/customizer/options/form_fields.php index 362dec9f75..6070674bd2 100644 --- a/inc/customizer/options/form_fields.php +++ b/inc/customizer/options/form_fields.php @@ -54,6 +54,7 @@ private function add_form_section() { 'description_hidden' => true, 'description' => __( 'Customize the general design of the form elements across the site.', 'neve' ) . ' ' . neve_external_link( 'https://docs.themeisle.com/article/1341-neve-form-fields', 'Learn More' ), 'title' => esc_html__( 'Form Fields', 'neve' ), + 'panel' => 'neve_layout', ] ) ); diff --git a/inc/customizer/options/main.php b/inc/customizer/options/main.php index 12665d8487..43bf18d115 100644 --- a/inc/customizer/options/main.php +++ b/inc/customizer/options/main.php @@ -14,6 +14,7 @@ use Neve\Customizer\Controls\React\Documentation_Section; use Neve\Customizer\Controls\React\Instructions_Section; use Neve\Customizer\Base_Customizer; +use Neve\Customizer\Controls\Separator_Section; use Neve\Customizer\Controls\Simple_Upsell; use Neve\Customizer\Types\Control; use Neve\Customizer\Types\Panel; @@ -53,7 +54,7 @@ private function add_main_panels() { $panels = array( 'neve_layout' => array( 'priority' => 25, - 'title' => __( 'Layout', 'neve' ), + 'title' => __( 'Global', 'neve' ), ), 'neve_blog' => array( 'priority' => 25, @@ -81,7 +82,7 @@ private function add_main_panels() { $this->wpc, 'neve_typography_quick_links', array( - 'priority' => - 100, + 'priority' => -100, 'panel' => 'neve_typography', 'type' => 'hfg_instructions', 'options' => array( @@ -113,20 +114,52 @@ private function add_main_panels() { $this->wpc, 'neve_documentation', [ - 'priority' => PHP_INT_MAX, + 'priority' => 10000, 'title' => esc_html__( 'Neve', 'neve' ), 'url' => tsdk_utmify( 'https://docs.themeisle.com/article/946-neve-doc', 'docsbtn' ), ] ) ); + + $this->wpc->add_section( + new Separator_Section( + $this->wpc, + 'neve_separator_main_panel', + [ + 'priority' => 10010, + ] + ) + ); } /** * Change controls */ protected function change_controls() { - $this->change_customizer_object( 'section', 'static_front_page', 'panel', 'neve_layout' ); - // Change default for shop columns WooCommerce option. $this->change_customizer_object( 'setting', 'woocommerce_catalog_columns', 'default', 3 ); } + + /** + * After all controls are registered, move core root panels and sections to the end of the list. + */ + public function after_controls_registered() { + + $sections = [ + 'static_front_page' => 10600, + 'custom_css' => 10610, + ]; + + $panels = [ + 'nav_menus' => 10500, + 'widgets' => 10510, + ]; + + foreach ( $sections as $section_id => $section_priority ) { + $this->change_customizer_object( 'section', $section_id, 'priority', $section_priority ); + } + + foreach ( $panels as $panel_id => $panel_priority ) { + $this->change_customizer_object( 'panel', $panel_id, 'priority', $panel_priority ); + } + } } diff --git a/inc/customizer/options/typography.php b/inc/customizer/options/typography.php index 14a95c240e..2e5b7218d3 100644 --- a/inc/customizer/options/typography.php +++ b/inc/customizer/options/typography.php @@ -89,6 +89,10 @@ private function controls_font_pairs() { */ private function sections_typography() { $typography_sections = array( + 'typography_globals_section' => array( + 'title' => __( 'Global', 'neve' ), + 'priority' => 10, + ), 'typography_font_pair_section' => array( 'title' => __( 'Font presets', 'neve' ), 'priority' => 15, diff --git a/inc/customizer/options/upsells.php b/inc/customizer/options/upsells.php index 87f75b4648..adf8d1d5a8 100644 --- a/inc/customizer/options/upsells.php +++ b/inc/customizer/options/upsells.php @@ -387,17 +387,19 @@ public function sanitize_checkout_layout() { */ private function section_upsells() { - $this->add_section( - new Section( - 'neve_free_pro_upsell', - array( - 'priority' => -100, - 'title' => esc_html__( 'Neve PRO Features', 'neve' ), - 'url' => $this->upsell_url, - ), - 'Neve\Customizer\Controls\React\Upsell_Section' - ) - ); + if ( ! (bool) get_option( 'fresh_site' ) ) { + $this->add_section( + new Section( + 'neve_free_pro_upsell', + array( + 'priority' => -100, + 'title' => esc_html__( 'Neve PRO Features', 'neve' ), + 'url' => $this->upsell_url, + ), + 'Neve\Customizer\Controls\React\Upsell_Section' + ) + ); + } $this->add_section( new Section(