From 836bdd8564d81019bbe125f3c55e710ad61febeb Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev Date: Mon, 3 Aug 2026 18:00:42 +0300 Subject: [PATCH 1/2] feat: add missing import link to the toolbar upper links --- src/js/components/common/Toolbar.tsx | 6 ++++++ src/js/types/Window.ts | 1 + src/php/Plugin.php | 1 + 3 files changed, 8 insertions(+) diff --git a/src/js/components/common/Toolbar.tsx b/src/js/components/common/Toolbar.tsx index 79be31346..d7ed9d47c 100644 --- a/src/js/components/common/Toolbar.tsx +++ b/src/js/components/common/Toolbar.tsx @@ -39,6 +39,12 @@ const UPPER_NAV_LINKS: readonly NavLink[] = [ url: window.CODE_SNIPPETS?.urls.welcome, label: __("What's New", 'code-snippets'), pageSlug: 'code-snippets-welcome' + }, + { + name: 'import-snippets', + url: window.CODE_SNIPPETS?.urls.import, + label: __('Import', 'code-snippets'), + pageSlug: 'import-code-snippets' } ] diff --git a/src/js/types/Window.ts b/src/js/types/Window.ts index 2c0eb5986..2d8b084a4 100644 --- a/src/js/types/Window.ts +++ b/src/js/types/Window.ts @@ -45,6 +45,7 @@ declare global { addNew: string edit: string welcome: string + import: string settings: string cloud: string } diff --git a/src/php/Plugin.php b/src/php/Plugin.php index 923dc28fb..870d968ba 100644 --- a/src/php/Plugin.php +++ b/src/php/Plugin.php @@ -368,6 +368,7 @@ public function localize_script( string $handle ) { 'edit' => esc_url_raw( $this->get_menu_url( 'edit' ) ), 'addNew' => esc_url_raw( $this->get_menu_url( 'add' ) ), 'welcome' => esc_url_raw( $this->get_menu_url( 'welcome' ) ), + 'import' => esc_url_raw( $this->get_menu_url( 'import' ) ), 'settings' => esc_url_raw( $this->get_menu_url( 'settings' ) ), 'cloud' => esc_url_raw( $this->cloud_connection->get_base_url() ), ], From a6a3f9c369e660bc38792c65f692e831bc1edaf9 Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev Date: Mon, 3 Aug 2026 22:56:14 +0300 Subject: [PATCH 2/2] feat: add missing import link to the toolbar upper links --- src/js/components/common/Toolbar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/components/common/Toolbar.tsx b/src/js/components/common/Toolbar.tsx index d7ed9d47c..8e4c8fddf 100644 --- a/src/js/components/common/Toolbar.tsx +++ b/src/js/components/common/Toolbar.tsx @@ -1,4 +1,4 @@ -import { __ } from '@wordpress/i18n' +import { __, _x } from '@wordpress/i18n' import classnames from 'classnames' import React, { useState } from 'react' import { isLicensed, shouldShowUpsell } from '../../utils/screen' @@ -43,7 +43,7 @@ const UPPER_NAV_LINKS: readonly NavLink[] = [ { name: 'import-snippets', url: window.CODE_SNIPPETS?.urls.import, - label: __('Import', 'code-snippets'), + label: _x('Import', 'snippets', 'code-snippets'), pageSlug: 'import-code-snippets' } ]