Commit Graph

1760 Commits

Author SHA1 Message Date
Ronald Langeveld
6189040fc4
Added unpublished reason to post revisions (#16726)
closes https://github.com/TryGhost/Team/issues/3137

We have now included the ability to display an "Unpublished" tag for revisions that have been unpublished. The tag is only displayed when the revision's reason property is set to "unpublished". A new revision is triggered when a post is unpublished, regardless whether there's a change in the content.
2023-05-03 09:20:34 +02:00
Simon Backx
1b38361211 Updated @sentry/node to v7.50.0 and reenabled renovate again
fixes https://github.com/TryGhost/Team/issues/2385

The Sentry version has been locked to v7.11.1 for some time because Sentry still used a legacy Node feature, called domains. Due to a bug or change in in Noide 16+, those domains broke handling uncaught promise execptions. So Ghost crashed when a promise exception wasn't caught. But that shouldn't be the case because we have a global uncaught exception handler.

Luckily Sentry switched to AsyncLocalStorage in v7.48.0. This fixes the issue as demonstrated in c0cd62184c
2023-05-02 10:23:45 +02:00
Daniel Lockyer
83ee1f8860
🔥 Dropped support for Node 14
refs https://github.com/TryGhost/Toolbox/issues/570

- Node 14 is now EOL so we don't support it any further
2023-05-01 17:51:10 +02:00
renovate[bot]
67abd6555b Update CSS preprocessors 2023-05-01 16:43:16 +02:00
renovate[bot]
f4cc04d235 Update dependency @playwright/test to v1.33.0 2023-05-01 08:57:43 +02:00
Ghost CI
45e84a60fe v5.46.0 2023-04-28 16:00:41 +01:00
Elena Baidakova
ef25e8dda7
Fixed tests (#16718)
no issue
2023-04-27 21:05:01 +04:00
Elena Baidakova
f9f5f72752 Added announcement bar setting
no issue

Allows publishers to set a banner at the top of their site
2023-04-27 17:51:24 +04:00
Elena Baidakova
62adec50f0 Bumped lexical package
no issue
2023-04-27 17:38:16 +04:00
Simon Backx
51473b3f7d Added tests for pages bulk API
fixes https://github.com/TryGhost/Team/issues/2925
2023-04-27 15:06:19 +02:00
Simon Backx
9fc98417b5 Added bulk post unpublishing test
refs https://github.com/TryGhost/Team/issues/2925
2023-04-27 14:58:27 +02:00
Elena Baidakova
0e9b8cc4ce Moved koenig-lexical from unpkg to jsdelivr cdn
no issue
2023-04-27 16:43:54 +04:00
Elena Baidakova
f69674ff9a
Fixed announcement bar preview (#16715)
refs TryGhost/Team#3122
- Fixed that preview takes data from user input before saving on
backend.

---

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

This pull request adds the ability to preview the announcement bar in
the Ghost admin panel and the theme settings. It also adds a
confirmation dialog to discard or save unsaved changes before leaving
the announcement bar settings. It refactors some components and methods
to remove unnecessary or redundant calls to save the settings. It
modifies the `ghost_head` helper, the `theme-management` service, and
the `announcement-bar/src` files to support the preview feature.
2023-04-27 16:40:11 +04:00
Naz
15eca6020d Migrated announcement bar script to use Members API
https://github.com/TryGhost/Team/issues/3121

- The announcement bar data is now exposed through Members API `/members/api/announcement` instead of Content API.
2023-04-27 14:01:36 +02:00
Naz
06c0a19718 Moved announcement bar settings to Frontend Members API
https://github.com/TryGhost/Team/issues/3121

- Because the announcement data has to be available with member's context, it's only possible to have it in cross-origin requests in the Members API.
- Exposed the announcement bar data through `GET /members/api/announcement` endpoint
2023-04-27 14:01:36 +02:00
Simon Backx
57557cb2f7 Added E2E tests for bulk post API
refs https://github.com/TryGhost/Team/issues/2925
2023-04-27 12:45:24 +02:00
Naz
e541ea8746
Extracted announcement visibility values to single place
refs https://github.com/TryGhost/Team/issues/3010

- Having all possible values in within single packages will make it easier to look for "source of truth" and is more maintainable rather than having values scattered all over the codebase
2023-04-26 14:42:33 +02:00
renovate[bot]
52b7086d1d Update dependency semver to v7.5.0 2023-04-26 10:14:22 +02:00
Ghost CI
cf0fdc3d86 v5.45.1 2023-04-25 16:32:08 +01:00
Fabien "egg" O'Carroll
960faf7d93 Fixed column type for feature_image_caption on post revisions
MySQL needs to use the TEXT type for large columns like this.
2023-04-21 16:21:16 +01:00
Chris Raible
58efca6c04
Added background saves every 10 mins for post-revisions (#16703)
no issue
2023-04-21 16:04:54 +01:00
Ghost CI
050ff1b28a v5.45.0 2023-04-21 16:00:48 +01:00
Ghost CI
74e44aeaca 🎨 Updated Casper to v5.4.10 2023-04-21 16:00:48 +01:00
Naz
f9fbac8fa5
Added labs safeguard for announcementBar settings
refs https://github.com/TryGhost/Team/issues/3051

- An extra safeguard to prevent announcementBar feature variables from accidentally leaking through the Content API.
2023-04-21 16:40:49 +02:00
Fabien "egg" O'Carroll
5feedadc80 Wired up feature image alt and caption to DB and Admin
We no longer need a reference to the previous version, instead we can use the
latest revision, this makes it easier to compare "off table" data such as the
feature image caption stored in posts_meta.
2023-04-21 15:26:43 +01:00
Fabien "egg" O'Carroll
bbdbcd02ef Added columns to store feature image metadata for revision
We need this to correctly display the difference with feature images and to
restore them.
2023-04-21 15:25:11 +01:00
Ronald Langeveld
f68936900c
Added post status saving (#16702)
no issue 

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

This pull request adds support for storing and tracking the status of
posts in revisions. It introduces a new `post_status` column and
property in the `post` and `PostRevision` models, and updates the
`PostRevisions.formatInput` method to handle it.
2023-04-21 15:17:25 +01:00
Chris Raible
3aec11328f
Populated reason field in post-revisions when revision is created (#16700)
no issue
2023-04-21 14:36:35 +01:00
Naz
cddf786424
Added filtering of announcement bar content
refs https://github.com/TryGhost/Team/issues/3051

-  We need to show the announcement_content to specific audiences based on the announcement_visibility filter
2023-04-21 13:46:37 +02:00
Ronald Langeveld
3cf6800e3e
Added post-status and reason col to post_revisions (#16693)
refs https://github.com/TryGhost/Team/issues/3099

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

This pull request adds a new column `post_status` to the
`post_revisions` table to store the status of the post revision. It also
updates the schema definition, the migration file, and the integrity
test to reflect the new column.
2023-04-21 12:32:35 +01:00
Fabien "egg" O'Carroll
bf37e6273a Fixed post_revisions title migration
This was incorrectly using the lenght of 24 rather than 2000
2023-04-21 12:03:11 +01:00
Fabien 'egg' O'Carroll
169a56d1bb
Added feature_image to post_revisions (#16695)
This will allow us to store historical data for feature images so we can
diff and restore them
2023-04-21 12:02:04 +01:00
Chris Raible
06262ecf33
Added logic for saving revisions on explicit saves (#16688)
refs @TryGhost/Team#3076

- added `save_revision` option to edit post endpoint
- this change covers the following cases:
1. we will not save a `post_revision` on every background autosave that
occurs after 3 seconds of inactivity in the editor
2. we will save a `post_revision` when the user hits `cmd+s` in the
editor to explicitly save
3. we will save a `post_revision` when the user navigates away from the
editor (e.g. by clicking the 'Posts' breadcrumb in the editor)
4. we will save a `post_revision` when the user publishes a post
5. we will save a `post_revision` when a user updates an already
published post
2023-04-21 10:04:05 +01:00
Naz
c21f136834 Corrected announcement_visibility setting type
refs https://github.com/TryGhost/Ghost/pull/14264

- With a requirement change we need to transform `announcement_visibility` setting to be an "array" instead of a "string". Array structure will allow us to hold multiple filters at once giving more coverage to the audience targetting usecases.
- Example filter variations we'll support are:
[ ] Logged out visitors
[ ] Members
[ ] Free members
[ ] Paid members
2023-04-21 10:18:50 +02:00
Rishabh Garg
d3c6d8ad13
Added Pintura integration page in Admin (#16686)
refs https://github.com/TryGhost/Team/issues/3034

- adds new integration page for Pintura in Admin
- allows site owners to enable/disable the image editor integration
- allows self-hosters to upload the files for enabling Pintura image
editor

---------

Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
2023-04-20 21:20:07 +05:30
Rishabh Garg
bd127eae6d
Added new settings for pintura editor integration (#16682)
refs https://github.com/TryGhost/Team/issues/3034

- adds 3 new settings for managing pintura image editor integration in
admin
- `pintura` setting controls the enabling of the feature
- `pintura_css_url` is used to store path to pintura css file uploaded
on integration page
- `pintura_js_url` is used to store path to pintura js file uploaded on
integration page
2023-04-20 19:19:56 +05:30
Ronald
71052cb33e Added postdiffing feature flag
closes https://github.com/TryGhost/Team/issues/3078

- added post diffing feature flag to isolate it from post history.
2023-04-20 14:15:59 +01:00
Elena Baidakova
09ead74f21 Bumped announcement-bar package
no issue
2023-04-20 16:44:35 +04:00
Elena Baidakova
bf6f697be4 Fixed announcement-bar package version
no issue
2023-04-20 14:32:20 +04:00
Elena Baidakova
4c4e5a9c95 Hide announcement bar script if announcement_content is empty
refs TryGhost/Team#3009
2023-04-20 14:05:37 +04:00
Elena Baidakova
725956bc8b Added script for announcement bar insertion
refs TryGhost/Team#3009
2023-04-20 14:05:37 +04:00
Sag
06610e150a Bumped lexical packages
no issue
2023-04-20 10:54:16 +01:00
Elena Baidakova
9c59fbfb52 Bumped Lexical packages
no issue
2023-04-20 10:58:09 +04:00
Fabien "egg" O'Carroll
ce3f2221a0 Removed bookshelf-relations config from PostRevision model
This was causing issues with saving posts when revisions did not have authors
and is not necessary for the functionality we desire.
2023-04-19 17:49:23 +01:00
Naz
de41b07228
Exposed announcement settings in Content API
refs https://github.com/TryGhost/Team/issues/3011

- Allows to read following settings fields:
  - announcement - alias to announcement_content
  - announcement_background
2023-04-19 16:01:50 +02:00
Naz
388a625f37
Added announcement_* fields to Settings Admin API
refs https://github.com/TryGhost/Team/issues/3011

- Allows to edit and read following settings fields:
  - announcement_content
  - announcement_background
  - announcement_visibility
2023-04-19 16:01:50 +02:00
Michael Barrett
78da6cf77d
Removed post revision author id on user deletion (#16670)
no issue

When a user is deleted any post revisions created by the user are set to
be owned by nobody (null) rather than deleting the post revisions
associated with the user
2023-04-19 14:00:45 +01:00
naz
865df1e143
Added announcement fields to settings table (#16654)
refs https://github.com/TryGhost/Team/issues/3011

- This is a data structure needed to support Announcement Bar feature -
allows to create custom site-wide announcements tailored to the
audience.
- The `announcement_content` is meant to hold displayed HTML content of
the announcement and will be exposed through unauthenticated Content
Site API

- The `announcement_visibility` sets the target audience to display the
Announcement Bart to:
  - `public` - Everyone
  - `visitors` - Logged out visitors only
  - `members` - Members only
  - `paid` - Paid members only

- The `announcement_background` sets the CSS class that should be
applied to the Announcement Bar. and will be exposed through
unauthenticated Content Site API. Three styles are available:
  - `accent` - matches the color of the site accent
  - `dark` - dark style
  - `light` - light style
2023-04-19 14:25:25 +02:00
Naz
7969399cdf
Added ability to pass 'flags' field into new settings
refs 3b90b1f335
refs https://github.com/TryGhost/Team/issues/3011

- The "flags" property was missing from the allowed parameters in addSettings migrations utility method. Passing in "flags" is needed to complete a refed issue where we add a new "announcement" group of settings and two of these settings have a "PUBLIC" flag
2023-04-19 14:02:03 +02:00
Chris Raible
f95012066a
Added author details to post_revisions in posts endpoint (#16674)
no issue

- added full author object to the post_revisions array on the /posts endpoint
- to be used in the post history modal to display who authored each revision
2023-04-19 12:05:55 +01:00