From 5fd8126fc35aa0fc90116c04cc94074f0328a802 Mon Sep 17 00:00:00 2001 From: Sodbileg Gansukh Date: Thu, 10 Oct 2024 10:25:20 +0100 Subject: [PATCH 1/7] Added a global style for form controls with AdminX style --- ghost/admin/app/styles/patterns/forms.css | 14 ++++++++++++++ ghost/admin/app/styles/patterns/global.css | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/ghost/admin/app/styles/patterns/forms.css b/ghost/admin/app/styles/patterns/forms.css index cb3eba844d9..c44209cf2b2 100644 --- a/ghost/admin/app/styles/patterns/forms.css +++ b/ghost/admin/app/styles/patterns/forms.css @@ -213,6 +213,20 @@ select { -webkit-appearance: none; } +.gh-input-admin-x { + height: 38px; + padding: 4px 12px; + font-size: 1.4rem; + color: var(--black); + background-color: var(--grey-150); + border: 0; + border-radius: 8px; +} + +textarea.gh-input-admin-x { + padding-block: 8px; +} + .gh-select, select { cursor: pointer; diff --git a/ghost/admin/app/styles/patterns/global.css b/ghost/admin/app/styles/patterns/global.css index bee100121d8..f7605a07c4b 100644 --- a/ghost/admin/app/styles/patterns/global.css +++ b/ghost/admin/app/styles/patterns/global.css @@ -52,6 +52,24 @@ --lightgrey: #CED4D9; --whitegrey: #EBEEF0; + /* AdminX Greys */ + --grey-50: #FAFAFB; + --grey-75: #F9FAFB; + --grey-100: #F4F5F6; + --grey-150: #F1F3F4; + --grey-200: #EBEEF0; + --grey-250: #E5E9ED; + --grey-300: #DDE1E5; + --grey-400: #CED4D9; + --grey-500: #AEB7C1; + --grey-600: #95A1AD; + --grey-700: #7C8B9A; + --grey-800: #626D79; + --grey-900: #394047; + --grey-925: #2E3338; + --grey-950: #222427; + --grey-975: #191B1E; + /* Tones */ --white-10: rgba(255, 255, 255, 0.1); --white-20: rgba(255, 255, 255, 0.2); From 58f175761ab7c4605fe84dc9f29fb36e9beb957f Mon Sep 17 00:00:00 2001 From: Sanne de Vries Date: Thu, 10 Oct 2024 11:21:18 +0100 Subject: [PATCH 2/7] Updated tag page styles REF DES-800 --- ghost/admin/app/components/tags/tag-form.hbs | 209 +++++++++---------- ghost/admin/app/controllers/tag.js | 15 ++ ghost/admin/app/styles/layouts/main.css | 23 +- ghost/admin/app/styles/layouts/tags.css | 34 +-- ghost/admin/app/styles/patterns/buttons.css | 15 +- ghost/admin/app/styles/patterns/forms.css | 11 +- ghost/admin/app/templates/tag.hbs | 17 +- 7 files changed, 161 insertions(+), 163 deletions(-) diff --git a/ghost/admin/app/components/tags/tag-form.hbs b/ghost/admin/app/components/tags/tag-form.hbs index 15c7be8a86d..f82a76c5e7a 100644 --- a/ghost/admin/app/components/tags/tag-form.hbs +++ b/ghost/admin/app/components/tags/tag-form.hbs @@ -1,111 +1,102 @@ -
-
-

Basic settings

- View tag {{svg-jar "external"}} -
-
-
-
-
- - - - - - - -

- Start with # to create internal tags - Learn more -

-
- - - -
- -
-
- -
-
-
-
+
+
+
+ + + + + + + +

+ Start with # to create internal tags. + Learn more +

+
- - + + +
- - - - - - - - - -

Maximum: 500 characters. You’ve used {{gh-count-down-characters @tag.description 500}}

-
-
- - - +
+ +
+
-
+ + + + + + + + + + + + + +

Maximum: 500 characters. You’ve used {{gh-count-down-characters @tag.description 500}}

+
+
+ + + +
@@ -128,7 +119,7 @@
- +
From 6ac01d96c7db97e8643c6349e1250586228621e7 Mon Sep 17 00:00:00 2001 From: Sodbileg Gansukh Date: Thu, 10 Oct 2024 13:59:27 +0100 Subject: [PATCH 3/7] Made post settings form controls consistent --- .../components/gh-psm-visibility-input.hbs | 2 +- .../app/styles/components/settings-menu.css | 99 ++++++++++++++++--- 2 files changed, 86 insertions(+), 15 deletions(-) diff --git a/ghost/admin/app/components/gh-psm-visibility-input.hbs b/ghost/admin/app/components/gh-psm-visibility-input.hbs index 5696e967743..1c68f05e6f6 100644 --- a/ghost/admin/app/components/gh-psm-visibility-input.hbs +++ b/ghost/admin/app/components/gh-psm-visibility-input.hbs @@ -7,5 +7,5 @@ @update={{action "updateVisibility"}} @data-test-select="post-visibility" /> - {{svg-jar "arrow-down-small"}} + \ No newline at end of file diff --git a/ghost/admin/app/styles/components/settings-menu.css b/ghost/admin/app/styles/components/settings-menu.css index 9680961464f..30a316139a1 100644 --- a/ghost/admin/app/styles/components/settings-menu.css +++ b/ghost/admin/app/styles/components/settings-menu.css @@ -179,14 +179,6 @@ /* Content /* ---------------------------------------------------------- */ -.settings-menu-container:not(.ember-power-select-multiple-trigger):not(.tag-settings) input:not([disabled]), -.settings-menu-container:not(.tag-settings) .gh-input:not([disabled]), -.settings-menu-pane .gh-date-time-picker-date, -.settings-menu-pane .gh-date-time-picker-time { - background: var(--white); - border: var(--input-border); -} - .settings-menu-container .ember-power-select-multiple-trigger input, .settings-menu-pane .gh-date-time-picker-date input, .settings-menu-pane .gh-date-time-picker-time input { @@ -256,12 +248,6 @@ height: 108px; } -.settings-menu-content textarea.gh-input { - font-size: 1.5rem; - line-height: 1.4em; - letter-spacing: 0; -} - .settings-menu-content .gh-cm-editor-textarea { min-height: 170px; } @@ -535,3 +521,88 @@ li.nav-list-item .for-switch.xs label { .settings-menu-email .disabled input { opacity: 0.5; } + +/* Form controls +/* ---------------------------------------------------------- */ +.settings-menu-container .gh-input, +.settings-menu-container select, +.settings-menu-container .gh-date-time-picker-date, +.settings-menu-container .gh-date-time-picker-time, +.settings-menu-container .ember-power-select-multiple-trigger { + min-height: 38px; + padding: 4px 12px; + font-size: 1.4rem; + color: var(--black); + background-color: var(--grey-150); + border: 1px solid transparent; + border-radius: 8px; + transition-property: color, background-color,border-color, text-decoration-color, fill, stroke; + transition-timing-function: cubic-bezier(.4,0,.2,1); + transition-duration: .15s; +} + +.settings-menu-container .gh-input:hover, +.settings-menu-container select:hover, +.settings-menu-container .gh-date-time-picker-date:hover, +.settings-menu-container .gh-date-time-picker-time:hover, +.settings-menu-container .ember-power-select-multiple-trigger:hover { + background-color: var(--grey-100); +} + +.settings-menu-container .gh-input:focus, +.settings-menu-container .gh-input:focus-visible, +.settings-menu-container .ember-basic-dropdown-trigger[aria-expanded=true] .gh-date-time-picker-date, +.settings-menu-container .gh-date-time-picker-time:focus-within { + background-color: var(--white); + border: 1px solid var(--green); + box-shadow: 0 0 0 2px rgba(48,207,67,.25); + outline: none; +} + +.settings-menu-container textarea.gh-input { + padding-block: 8px; +} + +.settings-menu-container .gh-date-time-picker input { + font-size: 1.4rem; + color: var(--black); +} + +.settings-menu-container .gh-input-icon .gh-input { + padding-left: 32px; +} + +.settings-menu-container .ember-power-select-trigger[aria-expanded=true] { + border-color: transparent; +} + +.settings-menu-container .ember-power-select-multiple-trigger { + padding: 5px 8px; + border-radius: 8px !important; +} + +.settings-menu-container .ember-power-select-multiple-trigger:has(.ember-power-select-multiple-option) { + padding-left: 6px !important; +} + +.settings-menu-container .ember-power-select-multiple-option { + height: 24px; +} + +.settings-menu-container .ember-power-select-status-icon { + border-color: var(--black); +} + +.settings-menu-container .gh-date-time-picker-timezone { + font-size: 1.2rem; + margin-left: 0; +} + +.settings-menu-container .ember-power-select-dropdown { + padding: 0 !important; + border: 0 !important; + border-radius: 8px; + --tw-shadow: 0 0 7px rgba(0, 0, 0, .08), 0 2.1px 2.2px -5px rgba(0, 0, 0, .011), 0 5.1px 5.3px -5px rgba(0, 0, 0, .016), 0 9.5px 10px -5px rgba(0, 0, 0, .02), 0 17px 17.9px -5px rgba(0, 0, 0, .024), 0 31.8px 33.4px -5px rgba(0, 0, 0, .029), 0 76px 80px -5px rgba(0, 0, 0, .04); + --tw-shadow-colored: 0 0 7px var(--tw-shadow-color), 0 2.1px 2.2px -5px var(--tw-shadow-color), 0 5.1px 5.3px -5px var(--tw-shadow-color), 0 9.5px 10px -5px var(--tw-shadow-color), 0 17px 17.9px -5px var(--tw-shadow-color), 0 31.8px 33.4px -5px var(--tw-shadow-color), 0 76px 80px -5px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow); +} From 97e3ad4674e0f8114f11e3f3c21780bd81098729 Mon Sep 17 00:00:00 2001 From: Sanne de Vries Date: Tue, 7 Jan 2025 16:08:15 +0100 Subject: [PATCH 4/7] Refreshed tag and member pages Ref https://linear.app/ghost/issue/DES-800/toplevelcomponent - Updated all form components to use admin-x styles - Changed box styles from grey to bordered - Changed temporary class name for input components from gh-input-admin-x to gh-input-x --- .../app/components/gh-member-label-input.hbs | 1 + .../components/gh-member-settings-form.hbs | 271 +++++++++--------- .../app/components/member/activity-feed.hbs | 6 +- .../member/newsletter-preference.hbs | 42 ++- ghost/admin/app/components/tags/tag-form.hbs | 188 ++++++------ .../app/styles/components/power-select.css | 10 +- ghost/admin/app/styles/layouts/main.css | 6 +- ghost/admin/app/styles/layouts/members.css | 48 ++-- ghost/admin/app/styles/patterns/forms.css | 46 +-- ghost/admin/app/templates/members.hbs | 2 +- 10 files changed, 304 insertions(+), 316 deletions(-) diff --git a/ghost/admin/app/components/gh-member-label-input.hbs b/ghost/admin/app/components/gh-member-label-input.hbs index b75832dff41..282eae5a058 100644 --- a/ghost/admin/app/components/gh-member-label-input.hbs +++ b/ghost/admin/app/components/gh-member-label-input.hbs @@ -3,6 +3,7 @@ tokenComponent=(component "gh-token-input/label-token") }} @class="gh-member-label-input" + @triggerClass={{@triggerClass}} @onChange={{this.updateLabels}} @onCreate={{this.createLabel}} @options={{this.availableLabels}} diff --git a/ghost/admin/app/components/gh-member-settings-form.hbs b/ghost/admin/app/components/gh-member-settings-form.hbs index c6a3234c0a0..7a56dbf3e00 100644 --- a/ghost/admin/app/components/gh-member-settings-form.hbs +++ b/ghost/admin/app/components/gh-member-settings-form.hbs @@ -3,12 +3,13 @@
-
+
Subscriptions {{#unless this.tiers}} -
+
{{#unless this.isCreatingComplimentary}}
@@ -107,148 +110,150 @@
{{/unless}} - {{#each this.tiers as |tier|}} -
-
- {{#each tier.subscriptions as |sub index|}} -
-
-
- {{sub.price.currencySymbol}} - {{format-number sub.price.nonDecimalAmount}} + {{#if this.tiers}} +
+
+ {{#each this.tiers as |tier|}} + {{#each tier.subscriptions as |sub index|}} +
+
+
+ {{sub.price.currencySymbol}} + {{format-number sub.price.nonDecimalAmount}} +
+
{{if (eq sub.price.interval "year") "yearly" "monthly"}}
-
{{if (eq sub.price.interval "year") "yearly" "monthly"}}
-
-
-

- {{tier.name}} - {{#if (eq sub.status "canceled")}} - Canceled - {{else if sub.cancel_at_period_end}} - Canceled - {{else if sub.compExpiry}} - Active - {{else if sub.trialUntil}} - Active - {{else}} - Active - {{/if}} - {{#if (gt tier.subscriptions.length 1)}} - {{tier.subscriptions.length}} subscriptions - {{/if}} -

-
- {{sub.priceLabel}} - {{sub.validityDetails}} +
+

+ {{tier.name}} + {{#if (eq sub.status "canceled")}} + Canceled + {{else if sub.cancel_at_period_end}} + Canceled + {{else if sub.compExpiry}} + Active + {{else if sub.trialUntil}} + Active + {{else}} + Active + {{/if}} + {{#if (gt tier.subscriptions.length 1)}} + {{tier.subscriptions.length}} subscriptions + {{/if}} +

+
+ {{sub.priceLabel}} + {{sub.validityDetails}} +
+
- -
- {{#if sub.isComplimentary}} - - - - {{svg-jar "dotdotdot"}} - - - - -
  • - -
  • -
    -
    - {{else}} - - - - {{svg-jar "dotdotdot"}} - - - - -
  • - - View Stripe customer - -
  • -
  • -
  • - - View Stripe subscription - -
  • -
  • - {{#if (not-eq sub.status "canceled")}} - {{#if sub.cancel_at_period_end}} - - {{else}} - +
  • +
    +
    + {{else}} + + + + {{svg-jar "dotdotdot"}} + + + + +
  • + + View Stripe customer + +
  • +
  • +
  • + + View Stripe subscription + +
  • +
  • + {{#if (not-eq sub.status "canceled")}} + {{#if sub.cancel_at_period_end}} + + {{else}} + + {{/if}} {{/if}} - {{/if}} -
  • -
    -
    - {{/if}} -
    - {{/each}} + + + + {{/if}} +
    + {{/each}} - {{#if (eq tier.subscriptions.length 0)}} -
    -
    + {{#if (eq tier.subscriptions.length 0)}} +
    - Complimentary - Active +
    + Complimentary + Active +
    +
    Created on
    -
    Created on
    -
    -
    -
    -
    - $ - 0 +
    +
    +
    + $ + 0 +
    +
    yearly
    -
    yearly
    + + + + {{svg-jar "dotdotdot"}} + + + + +
  • + +
  • +
    +
    - - - - {{svg-jar "dotdotdot"}} - - - - -
  • - -
  • -
    -
    -
    - {{/if}} + {{/if}} + {{/each}}
    - {{/each}} + {{/if}} {{#if (and this.tiers this.isAddComplimentaryAllowed)}}