Commit Graph

12378 Commits

Author SHA1 Message Date
Ghost CI
bf4e6600a9 v5.91.0 2024-08-30 15:05:40 +00:00
Hannah Wolfe
0720bc2bdb
Updated multi-tenant param name for stats charts
ref https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd

- We've settled on a name for the param of site_uuid
- Need to update the chart code that was added prior to this final decision
2024-08-30 11:23:27 +01:00
Sodbileg Gansukh
d30164df97
Improved publishing flow (#20878)
ref DES-706

* After a user publishes or schedules a post, they are directed to the post list
* If a post is sent as an email, they are directed to the Analytics page
* In both cases, a confirmation modal is shown
* If a post is published, they can share it directly from the confirmation modal
* Added a "Share" button and some additional functions (view, edit, and delete post) to
published posts in post analytics
* Added a manual "Refresh" button to post analytics so that there is
no need to reload the whole app to update the data

---------

Co-authored-by: Sag <guptazy@gmail.com>
2024-08-29 21:17:16 +02:00
Hannah Wolfe
9d121d8e9a
Added initial Stats page to Ghost Admin (#20877)
closes
https://linear.app/tryghost/issue/ANAL-10/stats-page-in-ghost-admin

- Adds all the structure, logic and permissions tests for the Stats page
to check we're loading the right thing at the right time
- Adds @tinybirdco/charts as a dependency, and has a single example of a
chart setup using the right config
2024-08-29 12:56:39 +01:00
Daniël van der Winden
42009eb9ed
Updated subtitle logic (#20876)
It was previously not displaying the correct text for when a post is
published + emailed. That's solved now.
2024-08-29 10:41:02 +00:00
Daniël van der Winden
d92f8bcf0a
Updated button colours and hover states (#20873) 2024-08-29 10:05:52 +00:00
Ronald Langeveld
8e1a730731
Fixed hanging dash when no attribution is present (#20869)
ref PLG-198

- Fixed trailing dash when no attribution is present
2024-08-29 15:22:31 +09:00
Sodbileg Gansukh
7be7112e68
Fixed non-email analytics error when refreshed (#20868)
ref DES-756, DES-757

- made the email property to make the refresh work properly for published-only posts
- included sentiment in the query to update the feedback percentage when refreshed
2024-08-29 04:49:06 +00:00
renovate[bot]
1871269e8f
Update Koenig packages (#20849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 13:10:57 +02:00
Sodbileg Gansukh
3b38ba3a29
Make split number helper handle empty value (#20848)
no issues
2024-08-28 10:47:03 +00:00
Daniël van der Winden
5cc3d943f2
Made the post preview card a link (#20846)
The modal in the new publish flow has a post preview card, which did not
link to the post itself. It does now (except when it's an email).
2024-08-28 10:08:25 +00:00
Sodbileg Gansukh
1afe96ae34
Added animation to the analytics numbers when refreshed (#20842)
ref DES-709

- when refresh button is clicked, the numbers in the analytics will be animated if changed
- for the animation to be performant, added a new dependency "animejs"
- to minimize the flash and layout shift, the analytics data is kept as it is while loading
- once finished loading, it will be replaced with the new data
2024-08-28 17:25:37 +08:00
Daniël van der Winden
1d17600f5d
Publishing flow: Social buttons update (#20841)
Updated the hover colour of the social buttons in the new publishing
flow's modal.
2024-08-28 08:42:56 +00:00
Ghost CI
291d48ecb7 Merged v5.90.2 into main 2024-08-27 21:29:17 +00:00
Ghost CI
eaf414a2de v5.90.2 2024-08-27 21:29:15 +00:00
Daniël van der Winden
af0338b504
Rewrote the publish modal logic and layout (#20832)
Removed unnecessary code, rewrote it in places where we were repeating
ourselves, and followed the new layout for posts + emails.
2024-08-27 15:22:11 +00:00
Daniël van der Winden
344f440de9
Updated the buttons in the publish flow modals (#20831)
Buttons were previously part of the bookmark card, but that's no longer
the case. This makes it easier to scale between different types of
posts/emails.
2024-08-27 13:06:19 +00:00
Ghost CI
8fc8dc72e6 Merged v5.90.1 into main 2024-08-26 23:37:15 +00:00
Ghost CI
46e9b20479 v5.90.1 2024-08-26 23:37:13 +00:00
Sodbileg Gansukh
2a212bfff4
Publish flow improvements and bug fixes (#20824)
ref DES-731

- improved mobile styles for the social buttons in the modal
- fixed the flow for publishing/scheduling pages
- redirect to post list only when a post doesn't involve any email
2024-08-26 17:02:00 +08:00
Ghost CI
ef031728cc v5.90.0 2024-08-23 15:05:10 +00:00
Steve Larson
827518c98b
🐛 Fixed shift selection in the posts list (#20818)
ref https://linear.app/tryghost/issue/ENG-1489/

The changes to improve posts loading in admin broke the shift selection
functionality. This restores that, as we need to be able to crawl across
the (now) three models when present.
2024-08-22 13:15:06 -05:00
Daniël van der Winden
7c992825ed
Publish modal updates (#20817)
The new modal for the updated publishing flow has an entirely new
layout, based on feedback previously received. In addition, this PR
includes a few tweaks to the underlying logic.
2024-08-22 14:49:29 +00:00
Steve Larson
cd7c27d3ad
🐛 Fixed fetching labels and offers in the editor (#20815)
ref https://linear.app/tryghost/issue/ONC-263/
- labels dropdown in sign up card was not successfully fetching labels
- offers dropdown suffered the same fate

When introducing the second editor instance, it appears we ran into some
race conditions with the Ember tasks used to fetch the resources. The
init instance was beating the other to the punch, and so the state was
never successfully updated, as it is only fetched once on mounting the
card.
2024-08-22 08:55:33 -05:00
Ronald Langeveld
f2206fb232
Added one-time payments under "payments" for filtering (#20807)
ref PLG-153

- Scoped one-time payments (`donation_event`) under the "payments"
category in the member activity feed filter.
- Updated `toggleEventType` logic to ensure that toggling "payments"
also toggles one-time payments when the `tipsAndDonations` feature is
enabled.
- Refactored event type handling into utility functions for easier
testing.
- Added unit tests for the new utility functions to ensure correct
behaviour.
- Added acceptance testing.
2024-08-22 10:26:46 +00:00
Princi Vershwal
309cb37cc6
Updated nql package (#20811)
Ref [ONC-216](https://linear.app/tryghost/issue/ONC-216/improve-the-performance-of-the-membersevents-aggregated-click-event)

Needed changes in nql package for this task.
2024-08-22 07:55:14 +00:00
Chris Raible
6d46dc26c7
🔒 Fixed admin forms defaulting to GET method (#20810)
ref
https://linear.app/tryghost/issue/ENG-1497/admin-signin-signup-and-setup-forms-default-to-get

- If method is not specified, the form will default to GET, which is
incorrect
- This commit sets the method to POST and action to javascript:void(0)
to prevent the form from submitting via GET if JavaScript is disabled or
not fully loaded yet
2024-08-21 15:49:52 -07:00
Kevin Ansfield
b01d4287ad Fixed Admin test failures when running in Safari
no issue

- Safari's `innerText` sometimes includes a trailing `\n` depending on the markup used so we need to use `.to.have.rendered.trimmed.text()`
- reproducible when running tests via http://localhost:4200/tests (we don't yet run in Safari via our testem config)
2024-08-21 12:58:11 +01:00
Kevin Ansfield
fc501add94 Fixed editor not loading in Admin acceptance tests
closes https://linear.app/tryghost/issue/PLG-176

The editor files were previously stubbed for testing because we didn't have a way to load the externally-hosted files. This made testing slow and difficult because the only way to test the Admin integration was via Ghost's e2e browser tests.

- unstubbed the editor globals so `fetchKoenigLexical()` actually tries to import the external assets
- updated `ember-cli-build` to copy the Koenig UMD file over to the assets directory in development/test builds
- updated `environment.js` to set the required filename for the default asset import to successfully hit the test environment hosted files
- updated lexical editor acceptance tests to demonstrate the editor loads successfully for new and existing posts
2024-08-21 11:49:05 +01:00
Ghost CI
2627dd6aa0 Merged v5.89.6 into main 2024-08-21 09:58:53 +00:00
Ghost CI
1456fc2b03 v5.89.6 2024-08-21 09:58:51 +00:00
Ronald Langeveld
27ff27ce76 🐛 Fixed editor performance issues in Safari for posts with HTML or Markdown cards (#20806)
ref https://linear.app/tryghost/issue/ONC-261

- Previous method of hiding the second Lexical instance using `width:
0`, `height: 0`, and `overflow: hidden` caused CPU usage to spike,
likely due to CodeMirror continuously processing the element.
2024-08-21 16:48:37 +07:00
Ronald Langeveld
3645fd8a5c
🐛 Fixed editor performance issues in Safari for posts with HTML or Markdown cards (#20806)
ref https://linear.app/tryghost/issue/ONC-261

- Previous method of hiding the second Lexical instance using `width:
0`, `height: 0`, and `overflow: hidden` caused CPU usage to spike,
likely due to CodeMirror continuously processing the element.
2024-08-21 09:42:22 +00:00
Ghost CI
5effca4c5e Merged v5.89.5 into main 2024-08-20 14:33:31 +00:00
Ghost CI
eecd79a875 v5.89.5 2024-08-20 14:33:30 +00:00
Sodbileg Gansukh
6413a30c35
Fixed missing stats on the analytics screen (#20797)
ref DES-716
2024-08-20 12:58:36 +00:00
Sodbileg Gansukh
9b41307a76
Replaced refresh button with a GhTaskButton (#20796)
ref DES-705
2024-08-20 20:06:12 +08:00
Sodbileg Gansukh
a8dc689823
Improved publish flow transition (#20794)
ref DES-697

- used client side navigation on the flow instead of hard refresh
- reduced layout shift on the analytics screen
- made the modal transition a bit smoother
2024-08-20 20:04:44 +08:00
Kevin Ansfield
0b3f7d7705 Updated tips & donations default suggested value
closes https://linear.app/tryghost/issue/PLG-156

- updated all default fixtures to use `500` ($5) as the default suggested donation value
- added migration to update existing settings using the old default of `0` to `500`
  - this is fine to apply because the feature hasn't been released so there's no explicit `0` values in the wild
- added an acceptance test for the adminx-settings tips & donations section
2024-08-20 12:07:51 +01:00
Sodbileg Gansukh
5cce46e851
Share button improvements on publish flow modal (#20791)
ref DES-684

- switched social links from buttons to regular links 
- added post title to share links
2024-08-20 17:33:40 +08:00
Ghost CI
0a2f2adefd Merged v5.89.4 into main 2024-08-20 07:55:48 +00:00
Ghost CI
beb70e9c11 v5.89.4 2024-08-20 07:55:46 +00:00
Kevin Ansfield
19b8674c3a
Fixed excerpt blur saving non-draft posts
ref https://linear.app/tryghost/issue/PLG-174

- forcing autosave on excerpt blur caused posts to revert to `draft` and save immediately even when they were published/scheduled
- updated the save-on-excerpt-blur to only autosave drafts
- added acceptance tests for title and excerpt change+blur on published posts
2024-08-20 08:38:06 +01:00
Kevin Ansfield
d6df261446
🐛 Fixed editor unsaved changes modal showing too often (#20787)
ref [ENG-661](https://linear.app/tryghost/issue/ENG-661/) 
ref [ONC-253](https://linear.app/tryghost/issue/ONC-253/)
ref [PLG-174](https://linear.app/tryghost/issue/PLG-174/)

- restored the original but reverted fix for unsaved changes modal from https://github.com/TryGhost/Ghost/pull/20687
- updated code to remove some incorrect early-falsy-return logic in `editorController.hasDirtyAttributes` that prevented save of unsaved changes on the underlying model (e.g. excerpt)
- updated unit tests so they are testing real post model instances and therefore are testing what we expect them to test
- added acceptance tests to ensure autosave is working for title and excerpt fields

---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2024-08-20 08:37:57 +01:00
Kevin Ansfield
b6582e6623
Updated Admin editor unit tests to use real model instances
ref https://linear.app/tryghost/issue/PLG-176

- we recently had to revert code because it caused unexpected problems despite the unit tests passing
- the setup for the editor unit tests was very basic and did not represent the real world because it tested a simple EmberObject instance rather than an Ember Model instance meaning the tests weren't covering the real code paths
- updated the unit test with a more realistic environment ready for re-working the reverted code+tests
2024-08-20 08:37:49 +01:00
Kevin Ansfield
25c31c31c9
🐛 Fixed autosave not triggering when in-editor excerpt is changed (#20785)
ref https://linear.app/tryghost/issue/PLG-174

- added `blur` handler to excerpt field so it acts the same as the title field and triggers a save when it loses focus
2024-08-20 08:37:41 +01:00
Kevin Ansfield
9dfbd3e293 Fixed excerpt blur saving non-draft posts
ref https://linear.app/tryghost/issue/PLG-174

- forcing autosave on excerpt blur caused posts to revert to `draft` and save immediately even when they were published/scheduled
- updated the save-on-excerpt-blur to only autosave drafts
- added acceptance tests for title and excerpt change+blur on published posts
2024-08-19 21:04:15 +01:00
Kevin Ansfield
887f4d3ac2
🐛 Fixed editor unsaved changes modal showing too often (#20787)
ref [ENG-661](https://linear.app/tryghost/issue/ENG-661/) 
ref [ONC-253](https://linear.app/tryghost/issue/ONC-253/)
ref [PLG-174](https://linear.app/tryghost/issue/PLG-174/)

- restored the original but reverted fix for unsaved changes modal from https://github.com/TryGhost/Ghost/pull/20687
- updated code to remove some incorrect early-falsy-return logic in `editorController.hasDirtyAttributes` that prevented save of unsaved changes on the underlying model (e.g. excerpt)
- updated unit tests so they are testing real post model instances and therefore are testing what we expect them to test
- added acceptance tests to ensure autosave is working for title and excerpt fields

---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2024-08-19 18:03:13 +00:00
Kevin Ansfield
64fbf3b9ee Updated Admin editor unit tests to use real model instances
ref https://linear.app/tryghost/issue/PLG-176

- we recently had to revert code because it caused unexpected problems despite the unit tests passing
- the setup for the editor unit tests was very basic and did not represent the real world because it tested a simple EmberObject instance rather than an Ember Model instance meaning the tests weren't covering the real code paths
- updated the unit test with a more realistic environment ready for re-working the reverted code+tests
2024-08-19 16:13:49 +01:00
Kevin Ansfield
21aa1b4378
🐛 Fixed autosave not triggering when in-editor excerpt is changed (#20785)
ref https://linear.app/tryghost/issue/PLG-174

- added `blur` handler to excerpt field so it acts the same as the title field and triggers a save when it loses focus
2024-08-19 14:38:00 +00:00