From 62d904a224acd6497a4f113f4e66491d44e283dc Mon Sep 17 00:00:00 2001 From: Imants Date: Tue, 14 Jul 2026 18:29:44 +0300 Subject: [PATCH 01/91] feat: restructure admin toolbar into header and primary nav bands --- src/css/common/_toolbar.scss | 37 +++++++++++++------ src/js/components/common/Toolbar.tsx | 26 +++++++++---- .../components/common/icons/ToolbarIcons.tsx | 11 ++++++ src/js/types/Window.ts | 1 + src/php/Plugin.php | 1 + 5 files changed, 56 insertions(+), 20 deletions(-) diff --git a/src/css/common/_toolbar.scss b/src/css/common/_toolbar.scss index b05cd0699..d0198db0f 100644 --- a/src/css/common/_toolbar.scss +++ b/src/css/common/_toolbar.scss @@ -1,6 +1,6 @@ @use 'upsell'; -$toolbar-block-size: 150px; +$toolbar-block-size: 136px; $wpcontent-inline-start-indent: 20px; #wpbody { @@ -28,8 +28,11 @@ $wpcontent-inline-start-indent: 20px; .code-snippets-toolbar-upper { justify-content: space-between; - block-size: 77px; + block-size: 76px; + box-sizing: border-box; + padding-block: 16px; padding-inline: 24px; + border-block-end: 1px solid rgb(195 196 199 / 50%); display: flex; align-items: center; @@ -62,35 +65,45 @@ $wpcontent-inline-start-indent: 20px; } .code-snippets-toolbar-lower { - border-block: 1px solid #c3c4c7; + border-block-end: 1px solid #c3c4c7; + block-size: 60px; + box-sizing: border-box; ul { display: flex; - align-items: end; + align-items: stretch; + block-size: 100%; } + // 15px + 26px icon + 11px + 4px underline fills the 60px band exactly. li a { display: flex; margin: 0; - padding: 24px 24px 20px; - color: inherit; + padding: 15px 24px 11px; + color: #2c3337; gap: 12px; align-items: center; font-size: 16px; + font-weight: 590; + letter-spacing: -0.16px; text-decoration: none; - font-weight: bold; box-sizing: border-box; transition: border unset; border-block-end: 4px solid transparent; cursor: pointer; + svg { + inline-size: 26px; + block-size: 26px; + } + &.active-link, &:hover, &:focus, &:active { color: #2271b1; border-block-end-color: currentcolor; } } - li:last-of-type { + li:not(.toolbar-end-item) + li.toolbar-end-item { margin-inline-start: auto; } } @@ -105,16 +118,16 @@ $wpcontent-inline-start-indent: 20px; .code-snippets-toolbar-lower .pro-chip, .nav-tab .pro-chip, .snippet-type-link .pro-chip { - color: #d46f4d; + color: #2271b1; + background: #d4e7f7; text-transform: uppercase; - border: 2px solid currentcolor; border-radius: 999px; display: flex; justify-content: center; align-items: center; box-sizing: border-box; padding: 3px 9px; - font-weight: 600; + font-weight: 700; } @@ -125,7 +138,7 @@ $wpcontent-inline-start-indent: 20px; .nav-tab .pro-chip, .snippet-type-link .pro-chip { font-size: 10px; - padding: 0 6px; + padding: 2px 8px; } .code-snippets-return-link { diff --git a/src/js/components/common/Toolbar.tsx b/src/js/components/common/Toolbar.tsx index 07ffd688d..f6580231f 100644 --- a/src/js/components/common/Toolbar.tsx +++ b/src/js/components/common/Toolbar.tsx @@ -3,7 +3,7 @@ import classnames from 'classnames' import React, { useState } from 'react' import { isLicensed, shouldShowUpsell } from '../../utils/screen' import { buildUrl, fetchQueryParam } from '../../utils/urls' -import { BlueprintIcon, CommunityIcon, LibraryIcon, SettingsIcon, SnippetsIcon } from './icons/ToolbarIcons' +import { BlueprintIcon, CommunityIcon, ImportIcon, LibraryIcon, SettingsIcon, SnippetsIcon } from './icons/ToolbarIcons' import { UpsellDialog } from './UpsellDialog' import type { ReactNode } from 'react' @@ -18,6 +18,7 @@ interface NavLink { pro?: boolean pageSlug?: string subpage?: typeof SUBPAGES[number] + end?: boolean } const UPPER_NAV_LINKS: readonly NavLink[] = [ @@ -49,6 +50,13 @@ const LOWER_NAV_LINKS: readonly NavLink[] = [ icon: