From 0fda84d71ed6696e47fe8693478b6fae1fb6d0cb Mon Sep 17 00:00:00 2001 From: James Morris Date: Thu, 5 May 2022 15:15:58 +0100 Subject: [PATCH] Added in a more responsive new Dashboard refs: https://github.com/TryGhost/Team/issues/1531 - any triple column collapses down to one and sits underneath each other - the mini charts' legends disappear and they also then go full width underneath each other - the resources module loses it's thumbnail at smaller widths - the 2/3 resources column goes to 1/2 - everything worth having has truncation that is only seen at very small sizes --- .../dashboard/v5/charts/recent-activity.hbs | 52 --- .../dashboard/v5/charts/recent-activity.js | 23 -- .../dashboard/v5/charts/recent-posts.hbs | 33 -- .../dashboard/v5/charts/recent-posts.js | 15 - .../dashboard/v5/resources/newsletter.hbs | 3 +- .../dashboard/v5/resources/resources.hbs | 14 +- .../dashboard/v5/resources/staff-picks.hbs | 4 +- .../dashboard/v5/resources/whats-new.hbs | 21 +- .../admin/app/styles/layouts/dashboard-v5.css | 334 ++++++++++-------- 9 files changed, 204 insertions(+), 295 deletions(-) delete mode 100644 ghost/admin/app/components/dashboard/v5/charts/recent-activity.hbs delete mode 100644 ghost/admin/app/components/dashboard/v5/charts/recent-activity.js delete mode 100644 ghost/admin/app/components/dashboard/v5/charts/recent-posts.hbs delete mode 100644 ghost/admin/app/components/dashboard/v5/charts/recent-posts.js diff --git a/ghost/admin/app/components/dashboard/v5/charts/recent-activity.hbs b/ghost/admin/app/components/dashboard/v5/charts/recent-activity.hbs deleted file mode 100644 index 4a441974c4..0000000000 --- a/ghost/admin/app/components/dashboard/v5/charts/recent-activity.hbs +++ /dev/null @@ -1,52 +0,0 @@ -
-
-
-
- -
-
- {{#let (members-event-fetcher filter=(members-event-filter excludeEmailEvents=true) pageSize=5) as |eventsFetcher|}} - {{#if eventsFetcher.isError}} -
-

There was an error loading events

- {{#if eventsFetcher.errorMessage}} - {{eventsFetcher.errorMessage}} - {{/if}} -
- {{/if}} - {{#if eventsFetcher.isLoading}} -
-

Loading...

-
- {{else}} - {{#if eventsFetcher.data}} - {{#each eventsFetcher.data as |event|}} - {{#let (parse-member-event event eventsFetcher.hasMultipleNewsletters) as |parsedEvent|}} -
- - - {{parsedEvent.subject}} - - {{capitalize-first-letter parsedEvent.action}} - {{parsedEvent.object}} - {{parsedEvent.info}} - - - {{moment-from-now parsedEvent.timestamp}} -
- {{/let}} - {{/each}} - {{else}} -
-

No activity yet.

-
- {{/if}} - {{/if}} - {{/let}} -
- -
-
-
diff --git a/ghost/admin/app/components/dashboard/v5/charts/recent-activity.js b/ghost/admin/app/components/dashboard/v5/charts/recent-activity.js deleted file mode 100644 index 7288e0d8c8..0000000000 --- a/ghost/admin/app/components/dashboard/v5/charts/recent-activity.js +++ /dev/null @@ -1,23 +0,0 @@ -import Component from '@glimmer/component'; -import {inject as service} from '@ember/service'; - -export default class RecentActivity extends Component { - @service feature; - @service session; - @service settings; - - get shouldDisplay() { - if (this.feature.improvedOnboarding) { - return true; - } - - const isOwner = this.session.user?.isOwnerOnly; - const hasCompletedLaunchWizard = this.settings.get('editorIsLaunchComplete'); - - if (isOwner && !hasCompletedLaunchWizard) { - return false; - } - - return true; - } -} diff --git a/ghost/admin/app/components/dashboard/v5/charts/recent-posts.hbs b/ghost/admin/app/components/dashboard/v5/charts/recent-posts.hbs deleted file mode 100644 index 104d35fe0a..0000000000 --- a/ghost/admin/app/components/dashboard/v5/charts/recent-posts.hbs +++ /dev/null @@ -1,33 +0,0 @@ -
-
- -
-
-
Title
-
Sends
-
Open rate
-
-
- {{#each this.posts as |post|}} -
- - {{post.title}} - - {{format-number post.email.emailCount}} - - {{post.email.openRate}}% - - -
- {{else}} -
-

No published posts yet.

-
- {{/each}} -
- -
-
-
diff --git a/ghost/admin/app/components/dashboard/v5/charts/recent-posts.js b/ghost/admin/app/components/dashboard/v5/charts/recent-posts.js deleted file mode 100644 index a996e1bfb8..0000000000 --- a/ghost/admin/app/components/dashboard/v5/charts/recent-posts.js +++ /dev/null @@ -1,15 +0,0 @@ -import Component from '@glimmer/component'; -import {action} from '@ember/object'; -import {inject as service} from '@ember/service'; -import {tracked} from '@glimmer/tracking'; - -export default class RecentPosts extends Component { - @service store; - - @tracked posts = []; - - @action - async loadPosts() { - this.posts = await this.store.query('post', {limit: 3, filter: 'status:published', order: 'published_at desc'}); - } -} diff --git a/ghost/admin/app/components/dashboard/v5/resources/newsletter.hbs b/ghost/admin/app/components/dashboard/v5/resources/newsletter.hbs index fd9f64eb49..746e441ced 100644 --- a/ghost/admin/app/components/dashboard/v5/resources/newsletter.hbs +++ b/ghost/admin/app/components/dashboard/v5/resources/newsletter.hbs @@ -11,7 +11,6 @@

{{entry.title}}

{{entry.excerpt}}

- {{!--
{{moment-format entry.published_at "D MMM YYYY"}}
--}}
{{/each}} @@ -19,7 +18,7 @@ {{/if}} diff --git a/ghost/admin/app/components/dashboard/v5/resources/resources.hbs b/ghost/admin/app/components/dashboard/v5/resources/resources.hbs index 1c78fa87c2..502dd909dd 100644 --- a/ghost/admin/app/components/dashboard/v5/resources/resources.hbs +++ b/ghost/admin/app/components/dashboard/v5/resources/resources.hbs @@ -1,13 +1,12 @@
diff --git a/ghost/admin/app/components/dashboard/v5/resources/staff-picks.hbs b/ghost/admin/app/components/dashboard/v5/resources/staff-picks.hbs index a4a9a92a34..54da0b52b5 100644 --- a/ghost/admin/app/components/dashboard/v5/resources/staff-picks.hbs +++ b/ghost/admin/app/components/dashboard/v5/resources/staff-picks.hbs @@ -1,11 +1,11 @@
-
+

Staff picks

Hand picked stories from around the web, published with Ghost.

-
+
{{#if (not (or this.loading this.error))}}
{{#each this.staffPicks as |entry|}} diff --git a/ghost/admin/app/components/dashboard/v5/resources/whats-new.hbs b/ghost/admin/app/components/dashboard/v5/resources/whats-new.hbs index c308820c6a..b6b575bd4d 100644 --- a/ghost/admin/app/components/dashboard/v5/resources/whats-new.hbs +++ b/ghost/admin/app/components/dashboard/v5/resources/whats-new.hbs @@ -1,24 +1,31 @@
-
+

What's new

All the latest changes and improvements.

- {{#if (not (or this.loading this.error))}} -
+
+ {{#if (not (or this.loading this.error))}}
{{#each this.entries as |entry|}}
- - {{entry.title}} + + + {{entry.title}} +
{{moment-format entry.published_at "D MMM YYYY"}}
+ {{else}} +
+ {{svg-jar "no-data-list"}} +

No new features yet.

+
{{/each}}
-
- {{/if}} + {{/if}} +