Commit Graph

928 Commits

Author SHA1 Message Date
Kevin Ansfield
b447a26832
Added custom excerpt to post revisions (#20323)
closes https://linear.app/tryghost/issue/MOM-170

When the subtitle field is included in the editor it creates a disconnect with post revisions if the underlying custom excerpt data is not included so we'd like to both preview and restore the subtitle when the in-editor subtitle field is enabled.

- added `post_revisions.custom_excerpt` column to schema
- added migration to add `post_revisions.custom_excerpt` to existing databases
- added migration to populate `post_revisions.custom_excerpt` with the current `post.custom_excerpt` value from the associated record
  - ensures no data is inadvertently lost when restoring an old version
- using current data matches what would have happened previously where custom_excerpt was never overwritten when restoring an old version
- updated post revisions handling to accept the `custom_excerpt` field
- updated Admin's revision preview and restoration to display and set the `custom_excerpt` field
2024-06-05 14:47:33 +01:00
Kevin Ansfield
36ba47604f Added Admin acceptance test for post revision restoration
ref https://linear.app/tryghost/issue/ENG-1078

- adds required setup for acceptance testing post revisions
- adds happy-path test for listing, previewing, and restoring a post revision
2024-06-04 20:16:19 +01:00
Kevin Ansfield
9ab9a88d5b Adjusted subtitle copy
closes https://linear.app/tryghost/issue/MOM-180
closes https://linear.app/tryghost/issue/MOM-184
2024-06-04 09:31:00 +01:00
Kevin Ansfield
d94a4c581f Added TK support to subtitle
closes https://linear.app/tryghost/issue/MOM-176

- display TK next to subtitle field as per the title field
- include subtitle TK in the pre-publish TK check
2024-06-03 13:22:16 +01:00
Ronald Langeveld
833ac83921
Added validation logic to in-editor subtitle (#20284)
closes https://linear.app/tryghost/issue/MOM-150

- use our validation engine to display an error state when >300 characters have been typed in the subtitle input field

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2024-06-03 11:02:18 +00:00
Sanne de Vries
c157619e3e
Fixed error message of the date-time-picker not breaking onto next line (#20221)
REF DES-261

- Also updated error message copy of both the date-time-picker and the
date-picker to be friendlier.
2024-05-16 14:59:07 +00:00
Kevin Ansfield
d2da9d3c17
Updated metadata shown on hover in internal link lists (#20204)
closes https://linear.app/tryghost/issue/MOM-80

- updated internal linking search results items
  - removed visibility text from meta data
  - added additional icon for paid/specific tier visibility
  - added titles to icons
- bumped `@tryghost/koenig-lexical` to include support for meta icon titles
- bumped other Koenig packages due to sub-dependency updates
2024-05-14 16:07:04 +00:00
Kevin Ansfield
b5af65a130
Added access and publish date display to internal link list on hover (#20168)
closes https://linear.app/tryghost/issue/MOM-80

- bumps @tryghost/koenig-lexical to add support for search result metadata in internal links as well as some improvements to the internal linking UI/UX
- updates search service to fetch and expose additional `visibility` and `published_at` fields for post/page resources
- updates `searchLinks` method passed to editor to decorate the search results with appropriate meta text and icon based on publish date, post visibility and member settings
2024-05-08 16:04:05 +00:00
Kevin Ansfield
2cd0eb62a7
Re-ordered Admin search results (#20166)
closes https://linear.app/tryghost/issue/MOM-106

- the search results can hide any matching authors/tags due to them appearing after matching posts which is typically a longer list that needs scrolling through
- changed the order to list matched authors and tags before posts, this matches the behaviour in our front-end search
2024-05-08 13:35:23 +00:00
Kevin Ansfield
40ee2043e0
Reduced Admin search re-indexes (#20154)
closes https://linear.app/tryghost/issue/MOM-97

The 30s search content expiry didn't really make sense and caused unnecessary delays and server load now that search will be more widely used within the editor.

- replaced concept of time-based expiry with explicit expiry
  - content still fetched on query if not already loaded or marked as stale
  - added `.expireContent()` method on search service to allow explicit expiry
- updated editor to pre-fetch search content when not already loaded or marked as stale
  - removes delay when first using internal linking search inside the editor
- updated post model to expire search content on save
  - expires on published post save or delete
  - expires on publish and unpublish
- updated tag model to expire content on create/save/delete
  - only expires when name or url is changed
- updated user model to expire on save/delete
  - only expires when name or url is changed
  - does not handle creation because that's done server-side via invites
2024-05-07 15:24:20 +01:00
Kevin Ansfield
27e771b3a8
🐛 Fixed Admin search sometimes stalling on first query (#20143)
closes https://linear.app/tryghost/issue/MOM-103

- the `yield waitForProperty(...)` call that was supposed to return once the content refresh occurred never reached a valid state so the first search query (or any later query) where a content refresh occurred would never resolve causing search to look like it had stalled
- switched to waiting for the last running task to resolve instead which does the same as the previous code intended
- exported the `getPosts` request handler function so in mirage config so we can re-use it with different timing on a per-case basis
2024-05-06 21:04:13 +00:00
Sanne de Vries
a2bbe6b3c3
Updated 'Users' to 'Staff' in search dropdown component (#20064)
No ref

- This copy change allows us to use consistent copy in both the general
search as well as the internal linking search component in the editor.
2024-04-22 14:49:43 +00:00
Kevin Ansfield
d6e599dab3
Generalised Admin search for use in editor (#20011)
ref https://linear.app/tryghost/issue/MOM-1

- renamed `searchable` to `groupName` so it better matches usage and avoids leaking internal naming to external clients
- added `url` to the fetched data for each data type as the editor will want to use front-end URLs in content
- added acceptance tests to help avoid regressions as we further generalise/optimise the search behaviour
2024-04-11 14:01:39 +00:00
Kevin Ansfield
2332f339dc
Fixed setup/done screen showing 500 when not authenticated (#19973)
closes https://linear.app/tryghost/issue/IPC-136/setupdone-route-500s-if-you-hit-it-from-a-logged-out-state-instead-of

- the setup/done route was not set up as an authenticated route so no redirect occurred when accessing it directly before logging in which in turn caused an error because the route tries to read from the session user
2024-04-02 16:43:44 +00:00
Kevin Ansfield
5cb85ff58f
Replaced setup/done screen with onboarding checklist (#19952)
part of https://linear.app/tryghost/issue/IPC-81/remove-setupdone-screen-from-signup-flow

- when the `onboardingChecklist` flag is enabled the `setup/done` screen shown after install or signup will initiate the onboarding checklist and redirect straight to the dashboard effectively replacing the previous onboarding flow
2024-03-28 16:10:59 +00:00
Kevin Ansfield
919ec733e7
Moved onboarding display check into new onboarding service (#19938)
refs
https://linear.app/tryghost/issue/IPC-92/add-logic-for-completing-steps

- added `onboarding` service to manage logic and state for the onboarding display and it's various steps
- added basic "display onboarding checklist" state to replicate the basic feature flag toggle along with making sure it's only shown to owners
- added acceptance test file and missing mirage endpoints needed for the dashboard to load without error
2024-03-27 17:37:37 +00:00
Sanne de Vries
f8a55de743
Added exact timestamp to the title attribute of the post date in the … (#19936)
…post list view

Ref DES-171
2024-03-27 13:52:38 +01:00
Sanne de Vries
c39c2de067
Updated time formatting for drafts and scheduled posts (#19924)
Ref TRI-27
- Published posts now show the published date in post list, instead of
updated date.
- The `gh-format-post-time` helper now has a `relative` and `absolute`
and option instead of formatting being tied to `draft` and `published`
state. This allows for more flexibility in how dates are displayed.
- Draft, scheduled and published posts now follow the same time
formatting pattern: today, yesterday, or explicit dates if further in
the past.
- Hover states for dates in the post list have been removed.
- Title attributes are added indicating whether timestamp refers to updated_at or published_at
- The scheduling logic on the publish page still uses relative
formatting.
2024-03-27 11:30:14 +01:00
Ronald Langeveld
0c95111f8e
🎨 Admin X - Offers (#19520)
no issue

- Offers rebuilt in React and now located in Settings.
2024-01-25 12:41:54 +00:00
Sag
e4f60ee028
Fixed member subscription status when multiple subs (#19530)
fixes PROD-325
- if a member has multiple subscriptions, show the status of the active
subscription
- if a member has multiple active subscriptins, show the status of the
subscription with the latest current_period_end date
2024-01-24 12:16:26 +01:00
Daniel Lockyer
57c5f92770 Reverted "🎨 Added Offers to the new Settings (#19493)"
This reverts commit c7d7b883cc.
2024-01-18 15:04:59 +01:00
Ronald Langeveld
c7d7b883cc
🎨 Added Offers to the new Settings (#19493)
no issue

- Removes flags for the new Offers in Admin X (Settings)
- Removes old Offers from the sidebar.
- See a new version of Offers in Settings. 🎨
2024-01-18 12:56:08 +00:00
Kevin Ansfield
100e7b70c6
Added TK Reminders feature (#19491)
no issue

- keep an eye on on https://ghost.org/changelog/ for full details
2024-01-17 08:57:35 +00:00
Steve Larson
549aaa4c5a
Added tests for TK indicators within editor (#19262)
closes TryGhost/Product#4225
- added basic tests for TK detection in title
- added coverage for TK reminder modal popping up
2023-12-06 11:29:27 -06:00
Chris Raible
a97e2b823e
Added error handling to Sentry's beforeSend (#19109)
refs TryGhost/Product#4175

- Added error handling to Sentry's beforeSend function in both Admin and
Core, so if there is any error in beforeSend, we will still send the
unmodified event to Sentry
- This is in response to an incident yesterday wherein the beforeSend
function threw an error due to an unexpected missing value in the
exception. The event sent to Sentry was the error in the beforeSend
function, and the original error never reached Sentry.
- If the original event had reached Sentry, even if unmodified by the
logic in beforeSend, we could have been alerted to the issue sooner and
more easily identified all affected sites.
- Also added defensive logic to protect for certain values in the
exception passed to beforeSend not existing and added unit tests for the
beforeSend function in admin and core
2023-11-23 02:46:50 +00:00
Sanne de Vries
e9e2b678c7
Updated Admin meta title to Ghost Admin – [site title] (#19023)
No ref
- In order to make it easier to distinguish between Admin and site in
browser tabs, we've updated the meta title to include `Ghost Admin` in
the title.
2023-11-16 13:15:48 +01:00
Jono M
e8e0d84d50
Deleted old Ember settings pages (#18740)
refs https://github.com/TryGhost/Product/issues/4055

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 3b24693</samp>

Removed unused components related to announcement settings, custom theme
settings, and file upload. These components were part of a deprecated
feature or a legacy UI.
2023-11-06 06:46:31 +00:00
Susheel Thapa
2e5fdffe32
Fixed typos (#18648)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-10-31 15:21:44 +00:00
Michael Barrett
b4d2dd0282
Handled ServerError to show a custom error message in the admin (#18709)
refs https://github.com/TryGhost/Product/issues/4040

Handled `ServerError` to show a custom error message in the admin when
an unhandled server error occurs (i.e 504). Supersedes
https://github.com/TryGhost/Ghost/pull/18703
2023-10-20 12:02:51 +01:00
Jono M
caae0edf19
Fixed and restored new AdminX E2E tests (#18606)
refs https://github.com/TryGhost/Product/issues/3831

---

### <samp>🤖 Generated by Copilot at 539c2d3</samp>

This pull request updates and adds some test cases for the date picker
and newsletter features in the Ghost admin panel. It introduces a test
helper function for the date picker in `editor-test.js`, and removes a
redundant test case from `publish-flow-test.js`. It also adds two new
test cases in `publishing.spec.js` using the Playwright framework to
verify the timezone and recipient settings for publishing posts.
2023-10-20 10:00:35 +01:00
Michael Barrett
88e49b4f0e
Added 504 error handling in the admin (#18703)
refs https://github.com/TryGhost/Product/issues/4040

Added error handling for 504 errors to improve the message shown to the
user when a 504 occurs
2023-10-20 08:53:54 +01:00
Jono M
b75a6d0e7f
Revert "Updated old admin acceptance tests to E2E with AdminX" (#18604)
Reverts TryGhost/Ghost#18599

There seems to be a timezone issue with one of the tests
2023-10-13 10:16:28 +01:00
Jono M
f0efbb7fbb
Updated old admin acceptance tests to E2E with AdminX (#18599)
refs https://github.com/TryGhost/Product/issues/3831

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 5af23a9</samp>

This pull request updates and adds some test cases for the editor and
the publishing flow in Ghost. It uses a helper function to test the date
picker component in the editor, and removes a redundant test case from
the `publish-flow-test.js` file. It also adds two test cases to the
`publishing.spec.js` file, using the Playwright framework, to check the
publish time and the newsletter settings of a post.
2023-10-12 20:27:16 +01:00
Kevin Ansfield
fa0b1c607b
Deleted all Admin code relating to the old editor (#18580)
no issue

- removed labs flag
- removed main editor component and all associated components
- switched usage of `<KoenigBasicHtmlInput>` and `<KoenigBasicHtmlTextarea>` over to use plain `textarea`, the only uses were in settings modals that have been replaced in AdminX
- cleaned up unused editor CSS
2023-10-12 13:17:39 +01:00
Peter Zimon
e68db848dc
AdminX: reroute settings-x to settings (#18360)
refs. https://github.com/TryGhost/Product/issues/3949

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-09 08:12:46 +01:00
Steve Larson
8bc653802d
Released new editor (#18422)
Promoted our beta editor to the default editor. Keep an eye on (or subscribe to) https://ghost.org/changelog/ for release announcements with full details.

- moved the beta editor (Lexical-based editor) to the default editor; all pages and posts will now use it
- all mobiledoc (previous editor) posts will remain mobiledoc until opened in the editor at which point will be converted to Lexical on the fly and open in the new editor
2023-10-04 12:22:54 +01:00
Daniel Lockyer
639be25f1d Updated Koenig-Lexical bundling
refs https://github.com/TryGhost/DevOps/issues/83

- this will now continue use the dev server assets if we tell it to,
  or copy the dependency package files to the built folder otherwise
- removes `editor` from config API because it's no longer needed
- removes dependency on `editor.url` in tests, as this no longer exists
- edits dev script to pass dev server URL as env var
- adds `@tryghost/koenig-lexical` dependency to Admin
2023-10-04 12:50:21 +02:00
Chris Raible
80a6fe17d0 Added Source as the new default theme
refs TryGhost/Product#3510

- Added `TryGhost/Source` as a submodule in `ghost/core/content/themes` so `Source` will ship with Ghost (along with Casper)
- With this change, new installs will use `Source` as the default theme. Existing sites will have `Source` installed, but not activated, as this is a large change and we don't want to drastically change existing sites without warning. Users can upgrade to use `Source` simply by clicking 'Activate' in design settings.
- Updated protections to prevent users from uploading their own conflicting version of `Source`
2023-10-03 14:02:08 +02:00
Princi Vershwal
3442fdfee6
🐛 Show specific tier posts under 'Paid-member only' filter in admin panel (#17043)
fixes https://github.com/TryGhost/Ghost/issues/16988
2023-10-03 14:43:11 +05:30
Kevin Ansfield
5f5ad4d5dd
Added automatic conversion of old content when opening in beta editor (#17876)
no issue

Previously the beta editor only worked for newly created posts/pages, any older content would open with the original editor. This change enables automatic conversion of old content to the new content format when a post/page is opened in the admin interface allowing new features like signup and advanced header cards to be used on existing content.

- removed `convertToLexical` feature flag
  - where necessary switched to using just the `lexicalEditor` feature flag in its place
- moved the "L"/"M" indicators on the posts list to a new `lexicalIndicators` feature flag to make debugging/development easier
- added a redirect to the original editor route so that any route to opening the editor (such as the `/edit` front-end shortcut, or other areas of Admin) will open in the beta editor
  - avoids confusing/inconsistent behavior
2023-08-30 16:54:03 +01:00
Michael Barrett
8d0eed2dcd
🐛 Fixed member filter by single newsletter subscription (#17668)
fixes https://github.com/TryGhost/Product/issues/3708

When filtering members by the `Newsletter subscription` parameter, If
the site has a single newsletter, members with disabled emails were
being erroneously returned. This fixes that 👍
2023-08-10 12:59:14 +01:00
Michael Barrett
184c6ae951
Retain newsletter subscriptions on suppression (#17373)
refs https://github.com/TryGhost/Product/issues/2610
2023-07-24 10:47:57 +01:00
Kevin Ansfield
ba6ae472c3
Renamed editor beta route
closes https://github.com/TryGhost/Team/issues/3369

- removes `lexical` from user-visible URL
- only renames path rather than renaming all associated files to keep changeset minimal prior to beta launch
2023-06-02 12:52:57 +01:00
Simon Backx
bd6b3099d8 Updated admin tests for feature helper change
refs 488aa983d0
2023-05-25 15:38:21 +02:00
Naz
cc4ff8c6d4 Added collections CRUD UI
refs https://github.com/TryGhost/Team/issues/3168

- This is basic scaffolding for collection resources UI in Admin. For the most part it's a copy-paste of tags code with slight modifications to fit the collections usecase
2023-05-23 17:26:47 +07:00
Elena Baidakova
ca46308abe
Added logic for showing feedback form in Labs (#16831)
refs TryGhost/Team#3247
- The feedback form UI is hidden by default
- Enabling “Lexical editor” doesn’t show the feedback form
- Disabling “Lexical editor” shows the feedback form below this lab item
and user can send the feedback
- Refreshing the page or navigating to some other page and then back to
Labs → the form is hidden again
2023-05-19 13:15:25 +04:00
Michael Barrett
94c863f189
Implemented post slug update on duplicated post title update (mobiledoc) (#16811)
no issue

Updated the slug generation logic so that when a mobiledoc post is
duplicated and the title is edited, the slug gets updated to reflect the
new title of the post. See lexical implementation here:
https://github.com/TryGhost/Ghost/pull/16802
2023-05-17 10:11:01 +01:00
Elena Baidakova
57d5f544d8
Updated inlined feedback form (#16794)
refs TryGhost/Team#3214

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 92b2412</samp>

This pull request refactors and simplifies the feedback system for the
lexical editor feature. It replaces the nested modal with a new
`FeedbackLexical` component that can be used in different contexts. It
also removes unused code and files related to the old feedback modal.
2023-05-16 16:16:57 +04:00
Steve Larson
26389507ed Revert "Reverted "Add lexical feedback (#16772)""
This reverts commit 0a9f280a75.
2023-05-11 08:12:25 -05:00
Daniel Lockyer
0a9f280a75
Reverted "Add lexical feedback (#16772)"
This reverts commit 72ed8f56f6.
2023-05-11 11:08:18 +02:00