Commit Graph

17278 Commits

Author SHA1 Message Date
Daniel Lockyer
0a9f280a75
Reverted "Add lexical feedback (#16772)"
This reverts commit 72ed8f56f6.
2023-05-11 11:08:18 +02:00
Steve Larson
72ed8f56f6
Add lexical feedback (#16772)
no refs
- add lexical feedback modal in the editor, labs, and publish workflows
- modal is a basic textarea form

---------

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-05-10 17:40:55 -05:00
Jono M
62f7600aa4
Update search text highlighting to escape HTML (#16760)
refs: https://github.com/TryGhost/Team/issues/2390

Escapes each matched and non-matched segment of the post title in the
admin search field, to make sure they're displayed in plain text but
still have matches highlighted.
2023-05-11 09:53:05 +12:00
Fabien "egg" O'Carroll
7f254a0143 Renamed @tryghost__nql.d.ts to nql.d.ts
This matches the filename convention specified in eslint
2023-05-10 17:24:58 -04:00
Fabien 'egg' O'Carroll
d3432399c7
Bumped knex-migrator & gscan to latest versions (#16770)
These versions use the latest version of @tryghost/errors, which uses
the correct import for @stdlib/utils-copy. This should hopefully stop
missing module errors when running locally.
2023-05-10 10:13:02 -04:00
Fabien 'egg' O'Carroll
474e683011
Added @tryghost/in-memory-repository (#16769)
This is the first pass at an abstract class for our in-memory repository
implementations. It's based off of the existing implementations and
should speed up local development and deduplicate code
2023-05-10 09:23:16 -04:00
Sodbileg Gansukh
4898fd401b Updated signup confiramtion email snapshot
no issues

- updated the snapshot based on the changes added to the email template
2023-05-10 18:18:10 +08:00
Sodbileg Gansukh
1520ba3c10 Improved spacing of the transactional emails
refs https://github.com/TryGhost/Team/issues/3159
2023-05-10 18:01:46 +08:00
Sodbileg Gansukh
13e9c65860 Removed unnecessary tabindex property 2023-05-10 15:43:30 +08:00
Sodbileg Gansukh
b668ca3943 Fixed newsletter clicks not updating in Safari
refs https://github.com/TryGhost/Team/issues/2619

- blur event occurs before mouseup event is called, so when the update button was clicked, the update function has never been called in Safari
- this replaces the mouseup with mousedown which is called before the blur event, so the links are updated properly
2023-05-10 15:40:57 +08:00
Fabien "egg" O'Carroll
9ac8301f5b Revert "Added @tryghost/in-memory-repository"
This reverts commit 905578d590.
2023-05-09 19:38:06 -04:00
Fabien "egg" O'Carroll
6ad14bfba9 Revert "Removed weird file"
This reverts commit 2ceb5db2bd.
2023-05-09 19:38:03 -04:00
Fabien "egg" O'Carroll
2ceb5db2bd Removed weird file
This was accidentally commited
2023-05-09 19:21:10 -04:00
Fabien "egg" O'Carroll
905578d590 Added @tryghost/in-memory-repository
This is the first pass at an abstract class for our in-memory repository
implementations. This should speed up local development and deduplicate code
2023-05-09 18:46:48 -04:00
Fabien "egg" O'Carroll
c5dc5a2675 Fixed @tryghost/mailgun-client import
We were incorrectly specifying the path of the file rather than relying on the
package exports, and this broke in the previous commit to a file rename. It
wasn't caught by CI because the browser tests are not run on pull requests
2023-05-09 13:00:18 -04:00
Fabien "egg" O'Carroll
104f84f252 Added eslint rule for file naming convention
As discussed with the product team we want to enforce kebab-case file names for
all files, with the exception of files which export a single class, in which
case they should be PascalCase and reflect the class which they export.

This will help find classes faster, and should push better naming for them too.

Some files and packages have been excluded from this linting, specifically when
a library or framework depends on the naming of a file for the functionality
e.g. Ember, knex-migrator, adapter-manager
2023-05-09 12:34:34 -04:00
Ronald Langeveld
8a08cf3628
Added signupCard feature flags (#16763)
no issue

This pull request adds a new experimental feature flag `signupCard` to
the Ghost admin app, which enables a signup card component in the
lexical editor that's currently being worked on. 
The feature flag can be toggled from the settings/labs
UI and is read from the server-side configuration.
2023-05-09 16:27:36 +02:00
renovate[bot]
35d02fd3ec Update dependency vite-plugin-css-injected-by-js to v3.1.1 2023-05-09 12:51:52 +02:00
Fabien 'egg' O'Carroll
0b8c3747c5
Supported inviting users using an Admin API Integration
Whilst Admin API Integrations had the permissions to create invites they were
blocked from doing so at the HTTP level. We've removed this restriction for
creating Invites as well as browsing Roles, because a Role ID is necessary to
create an invite. The code was also not setup to support Admin API Integrations
as it made assumptions about the existence of a User. That has been updated in
the permissions layer - so that the Invites are limited to Contributors,
Authors and Editors as well as at the email layer, which has has the copy and
from address updated to reflect the lack of a User creating the Invite.
2023-05-08 15:27:15 -04:00
Rishabh
e2fe1171be Released Portal v2.30.2 2023-05-08 22:32:21 +05:30
Sag
f560a334cc
Bumped Lexical packages (#16756)
no issue

- Bumped default config for koenig-lexical to ~0.2
2023-05-08 18:39:14 +02:00
Fabien "egg" O'Carroll
819571749b Released Portal v2.30.1 2023-05-08 11:13:37 -04:00
Fabien "egg" O'Carroll
45a70a3f4c 🐛 Fixed Member signup when signup terms are null
We only display the signup checkbox if both the checkbox is required AND we
have some terms to display alongside it. However we require the checkbox to be
checked, regardless of if it is displayed. This results in the Signup button
not working at all if your settings are in this state.
2023-05-08 11:11:39 -04:00
Rishabh Garg
c6a75cf015
Integrated image editor for staff and tag admin pages (#16755)
refs https://github.com/TryGhost/Team/issues/3145

- includes image editing for generic upload image components to extend
image editing capabilities to other areas in Admin
- allows image editing for tag images and staff user images
2023-05-08 15:22:25 +05:30
Daniel Lockyer
799561aaec
Reduced Sharp concurrency to test alleviating memory fragmentation
refs 9d104c8511

- we've seen recurring instances where Ghost will hog memory after image
  uploads
- we use `jemalloc` to try and help this, but it still seems to happen
- according to the sharp thread referenced in my commit above, memory
  fragmentation can also be helped by reducing the concurrency within
  sharp
- this is a bit of an experiment and we can revert if it causes issues
2023-05-08 10:51:56 +02:00
Elena Baidakova
9df8e89806 Revert "Removed p wrapper for koenig-lexical-input (#16754)"
This reverts commit 9051ea62aa.
2023-05-08 12:15:37 +04:00
Elena Baidakova
07e979698d Revert "Checked whether initialHtml in lexical input has a paragraph"
This reverts commit dd26448dcf.
2023-05-08 12:15:25 +04:00
Elena Baidakova
dd26448dcf Checked whether initialHtml in lexical input has a paragraph
refs TryGhost/Team#3147
2023-05-08 11:07:18 +04:00
Elena Baidakova
9051ea62aa
Removed p wrapper for koenig-lexical-input (#16754)
refs TryGhost/Team#3147

---

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

This file adds a function to clean and format the HTML of the
`koenig-lexical-editor-input` component and passes it to the
`HtmlOutputPlugin` component.
2023-05-08 10:04:14 +04:00
renovate[bot]
6518d2ccae Update dependency i18next-parser to v8 2023-05-08 07:01:20 +02:00
Chris Raible
810b789419 Increased Post Revisions limit to 25
no issue
2023-05-05 21:46:50 +00:00
Ghost CI
832cee3005 v5.47.0 2023-05-05 16:00:42 +01:00
renovate[bot]
6d78512a4b Update dependency vite to v4.3.5 2023-05-05 16:04:32 +02:00
Simon Backx
6566903df5
Cleaned up member attribution flag (#16745)
no issue

This commit removes the `memberAttribution` feature flag from the
codebase. Some CSS classes are not removed as removing them and updating
the associated CSS files have side effects sadly.
2023-05-05 15:04:14 +02:00
Daniel Lockyer
310ec7d58b
Bumped Portal to v2.30
fixes https://github.com/TryGhost/Ghost/issues/16641

- this updates Ghost to use the latest Portal, which contains updated
  translations and new locales since the last publish
2023-05-05 13:29:16 +02:00
Daniel Lockyer
6d9b4b395f
Released Portal v2.30.0 2023-05-05 13:27:20 +02:00
Daniel Lockyer
b0483d1ef3
Updated supported locales 2023-05-05 13:24:41 +02:00
Daniel Lockyer
443ff9079b
Auto-generated translations
- this fixes some issues detected by i18next
2023-05-05 13:23:23 +02:00
Eflarus
1e51815f33
Added Russian locale (#16719)
refs https://github.com/TryGhost/Team/issues/2795
2023-05-05 13:22:34 +02:00
Rishabh Garg
6c131de6eb
Added image editing feature for publication logo and cover (#16741)
refs https://github.com/TryGhost/Team/issues/3145

- adds image editing functionality(behind flag) using pintura
integration to publication logo and cover
2023-05-05 16:30:34 +05:30
Sodbileg Gansukh
e50bc87780 Added explicit rules to announcement bar styles
refs https://github.com/TryGhost/Team/issues/3143

- due to the reset, some default styles stopped working
- this adds those missing explicit styles
2023-05-05 18:22:30 +08:00
Daniel Lockyer
16ea824f71
Fixed building Admin in development mode for browser tests
- I switched over `build` to run in production mode because we now do
  `lerna run build` during the release process, but this was bundling
  development assets
- this adds `build:dev` and switches the browser test to use that, so
  they should use the development assets moving forwards
2023-05-05 12:13:11 +02:00
Elena Baidakova
4207c9d0d1
Added browser tests for announcement bar (#16742)
refs TryGhost/Team#3122

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

Added `data-testid` attributes to various elements in the announcement
bar settings feature to enable Playwright testing. Fixed a potential bug
with the `visibilitySettings` getter in the `visibility.js` component.
Added Playwright tests for the announcement bar settings feature in
`announcement-bar-settings.spec.js`.
2023-05-05 14:11:26 +04:00
Sodbileg Gansukh
ffe6a472a9 Added a reset to the announcement bar styles
refs https://github.com/TryGhost/Team/issues/3143

- the reset was added to reduce the theme style conflict as much as possible
2023-05-05 17:58:37 +08:00
Simon Backx
05bba5135d
Cleaned up sourceAttribution flag (#16740)
no issue

This commit removes the `sourceAttribution` feature flag from the
codebase.
2023-05-05 10:57:26 +02:00
Daniel Lockyer
aede64acb9
Switched yarn build to run in production for Admin builds
- it's pretty rare we ever want to do a manual development build, so we
  can just let `yarn build` be for production
2023-05-05 10:53:19 +02:00
Daniel Lockyer
cf41c3ad54
Removed final declaration of oembed-parser
refs 27e4523aec

- we no longer use `oembed-parser`, so we can remove it from
  package.json
- also pins the `@extractus/oembed-extractor` package and adds it into
  `@tryghost/oembed-service` where it was missing
2023-05-05 10:48:16 +02:00
renovate[bot]
0cdf555758 Update dependency vitest to v0.31.0 2023-05-05 09:48:36 +02:00
Simon Backx
fbed93b866
🐛 Added missing history logs for post/page bulk actions (#16734)
no issue

The post/page bulk actions weren't logged in the history log / actions
table.

This change adds support for logging bulk actions.
- New `addActions` static method on models. It creates an action log in
the database for multiple models at once. If only one model was edited,
deleted or added, it will fallback to `addAction`
- `addAction` can also be called statically now
- `actionName` option is now supported when using `addActions`,
`addAction`, and as a result also in all bulk manipulation methods, and
CRUD methods. This allows you to replace the default '5 posts edited'
into something more specific like '5 posts featured'
- Fixed support for null resource_id in the parse-history-event helper
- Removed the default 'published' status requirement when using
Post.findOne for internal queries.
2023-05-05 09:45:36 +02:00
Chris Raible
27e4523aec
🐛 Improved error message for unauthorized YouTube embeds (#16374)
refs TryGhost/Ghost#16048

- When attempting to embed a Youtube video that has had embedding
disabled by its owner/author, Ghost displayed a generic error message
that didn't indicate the reason for the failed emebed.
- This change updated the error message when Youtube (or any provider)
returns 401: Unauthorized to indicate that the owner of the resource has
explicitly disabled embedding.
2023-05-04 16:04:58 -07:00
Simon Backx
848b2d82a1
Cleaned up suppressionList feature flag (#16736)
no issue

This pull request removes the `suppressionList` feature flag and all its
dependencies from the codebase. It makes the suppression list feature
the default and consistent behavior for all email events and
newsletters. It simplifies the UI, logic, and data related to email
events and newsletters. It affects several files in the
`ghost/admin/app`, `ghost/core/core`, and `ghost/members-api`
directories.
2023-05-04 14:47:04 +02:00
Simon Backx
17a6217cc7 🐛 Fixed members breadcrumbs when not coming from analytics
fixes https://github.com/TryGhost/Team/issues/2404

This change introduces a new 'post' query parameter to the members and member routes.

Previously, the members route would check if the previous route was the analytics page, and then show the breadcrumbs to go back to the analytics page. But when navigating to the members page from the menu, we don't want to show the breadcrumbs. To accomplish this, the routes that point to the members page from the analytics page now specifically pass on the post id in the query parameters. The query parameter is then passed on from the members page to the member page.

`directlyFromAnalytics` is still used in the member route, to know wheter we came from the members page or from the analytics page (changes the breadcrumbs). This doesn't need to go via a query parameter (figured that would make the url too long/complex).

The resetController method is now implemented and resets the filter and/or fromAnalytics post id if required (when going from members to member, we don't want to reset it because the we would lose the filter going back).
2023-05-04 11:20:33 +02:00
renovate[bot]
b407676b94 Update dependency vite to v4.3.4 2023-05-04 07:19:15 +02:00
Chris Raible
b62a642084
Added background save every 10 minutes to the lexical editor (#16732)
refs TryGhost/Team#3133

- the backend previously had logic to save a revision if more than 10
mins had elapsed since the last revision
- however, the frontend would autosave after 3 seconds of inactivity
(which doesn't trigger a revision), and never send another save request
at 10 minutes, so the backend logic to save a revision was never
triggered
- this change will save the current contents of the editor every 10
minutes, even if nothing has changed since the last save
2023-05-03 14:46:32 -07:00
Fabien "egg" O'Carroll
b9565bc290 Migrated @tryghost/post-revisions to TypeScript!
This is an initial start to using TypeScript in our non-core Ghost packages.

- Adds a prepare script to build the project after installing deps
- Adds an initial tsconfig.json which is compatible with our node env
- Migrates all of the code to TypeScript, including tests
- Updates tests to use ts-node so that we don't need to compile the tests
- ts-node is installed at the top level because the env is weird with lerna and
  doesn't work otherwise
- Updates the yarn dev script to build the project with the --all and --revisions flag
2023-05-03 14:32:31 -04:00
Fabien "egg" O'Carroll
ed674981e6 Updated npm scripts to support packages with a build step
- Updates the prepare script in the top level to run prepare on packages, so
  that packages can be built when running `yarn`

- Updates the build script in ghost/core to run build on packages, so that
  packages are built before being monobundled

- Updates monobundle to be a dependency and use the new TryGhost repo, which
  includes some minor fixes and improvements, such as supporting devDeps

- Updates the GitHub workflows to run the build command in the top level
  directory rather than ghost/core so that other packages are built, too.
2023-05-03 14:32:31 -04:00
Sam Lord
cb30c9bbc9 Prevent posts_meta data from killing the data-generator process
no issue
2023-05-03 16:28:29 +01:00
Simon Backx
84c6c0397b 🐛 Fixed CMD/shift clicking to open the editor in a new tab/window
refs https://ghost.slack.com/archives/C025584CA/p1683105468216909

When holding cmd,ctrl or shift when clicking a post list item, it would try to select it. But that meant some user flows were broken where users would open multiple posts at the same time in a new tab.

This change allows you to cmd/ctrl/shift/right click on the edit button again.
2023-05-03 17:02:26 +02:00
Ghost CI
81c93c16f0 Merged v5.46.1 into main 2023-05-03 13:47:34 +01:00
Ghost CI
17025cd344 v5.46.1 2023-05-03 13:47:31 +01:00
Fabien "egg" O'Carroll
b3caf16005 🔒 Fixed filtering on private Author fields in Content API
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-r97q-ghch-82j9

Because our filtering layer is so coupled to the DB and we don't generally
apply restrictions, it was possible to fetch authors and filter by their
password or email field. Coupled with the "starts with" operator this can be
used to brute force the first character of these fields by trying random
combinations until an author is included in the filter. After which the next
character can be brute forced, and so on until the data has been leaked
completely.
2023-05-03 08:43:20 -04:00
Fabien "egg" O'Carroll
a22717a8e7 🔒 Fixed filtering on private Author fields in Content API
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-r97q-ghch-82j9

Because our filtering layer is so coupled to the DB and we don't generally
apply restrictions, it was possible to fetch authors and filter by their
password or email field. Coupled with the "starts with" operator this can be
used to brute force the first character of these fields by trying random
combinations until an author is included in the filter. After which the next
character can be brute forced, and so on until the data has been leaked
completely.
2023-05-03 08:25:27 -04:00
Simon Backx
514c8917c0 Readded matchMetadataSnapshot
refs bac2f4d4d4 (diff-473dc0c49e80df6c07569ed5730445ebdaaa8138fc819182548727db50eb55aa)
2023-05-03 14:14:10 +02:00
Simon Backx
fd69ab181d Removed duplicate matchHTMLSnapshot 2023-05-03 14:13:04 +02:00
Simon Backx
bac2f4d4d4 Fixed snapshot tests for MySQL only newsletter test
no issue

There was an error when generating the snapshot for this test. It never ran, so the snapshot was never committed. On top of that, the generated snapshot would change every time because the email verification token was not replaced with a static value.
2023-05-03 14:05:53 +02:00
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
Fabien "egg" O'Carroll
cef062452b Fixed typo when referring to revision author 2023-05-02 19:50:34 -04:00
Fabien 'egg' O'Carroll
d87da627d9
Added author image to revision history list (#16724)
refs https://github.com/TryGhost/Team/issues/3129

This has copied the same pattern from the gh-user-list-item component.

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-05-02 19:38:31 -04:00
Ronald
ad3c5d1a0b Fixed linting
refs https://ghost.slack.com/archives/C02G9E68C/p1683036435533879

- Indentation errors was being ignored by eslint.
- Fixed it to bring it up to standard.
2023-05-02 19:55:51 +02:00
Sam Lord
f7188b4dcf Prevented an invalid order during deletion
no issue

Will allow the demo data script to run if offers exist and have been redeemed
2023-05-02 16:34:47 +01:00
Michael Barrett
b60761706b
Prevented post history from being viewed for emailed posts (#16704)
refs https://github.com/orgs/TryGhost/projects/88/views/2?pane=issue&itemId=26198422

Prevented post history from being viewed in the following scenarios:

- When a post is sent as and email only
- When a post is published and sent as an email
2023-05-02 15:58:56 +01:00
Simon Backx
6aa8fa2a8e Updated Portal back button translations
refs https://github.com/TryGhost/Ghost/issues/16628
2023-05-02 16:51:48 +02:00
Sanne de Vries
2342bfd06f Updated status badges in post revision list
Refs https://github.com/TryGhost/Team/issues/3123
2023-05-02 11:30:18 +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
Ronald
df1329f5e9 Added unpublished logic to revisionList.
refs https://github.com/TryGhost/Team/issues/3123

Refactor revisionList function to use a more concise logic for finding new published and unpublished revisions.
2023-05-02 09:11:56 +02:00
Peter Zimon
9dea2ef911 Contributor view post button color update
no refs.

- the hover color for the "View post" button was the same as the "Edit" which is a bit misleading
2023-05-02 06:46:24 +02:00
Peter Zimon
a55efec7be Contributor post list button fix
no refs.

- On the post list, an edit button was shown for contributors even if the post has been published. Clicking on this reloaded the post list
2023-05-02 06:40:51 +02:00
Fabien "egg" O'Carroll
a90cc2d7ab Fixed sodo-search build script 2023-05-01 13:00:37 -04:00
renovate[bot]
e7cef15bdf Update dependency jsdom to v21.1.2 2023-05-01 18:22:36 +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
Elena Baidakova
7ade895ce7
Hide preview select for design/announcement settings (#16721)
no issue
- Hide post preview select if there is no published posts yet.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-05-01 18:50:13 +04:00
Uvindu Rajapakshe
dc1ff890a0
Updated Sinhalese translations (#16639) 2023-05-01 16:49:04 +02:00
renovate[bot]
67abd6555b Update CSS preprocessors 2023-05-01 16:43:16 +02:00
Zabriskije
f81c7568fe Fixes for it localization 2023-05-01 15:19:16 +02:00
Andre Rafael
90adb7562b Added Portuguese locale for Portal 2023-05-01 15:18:36 +02:00
Daniel Lockyer
9bb2bc82bd Fixed erroneous timing in reported Mailgun metrics
- we have calls to the metrics library so we can measure the time it
  takes the Mailgun API to return a response
- however, there's a bug in the code whereby if the `batchHandler`
  takes a long time and then throws an error, this time will be reported
  to metrics
- this is misleading because it looks like Mailgun is taking a long time
  if the databases are slow
- this pulls the specific SDK call out into a function so it's easier to
  wrap with timing code
2023-05-01 15:05:59 +02:00
renovate[bot]
eff4662af3 Update dependency @types/sinon to v10.0.14 2023-05-01 15:01:17 +02:00
renovate[bot]
8ca3f301ae Update dependency date-fns to v2.30.0 2023-05-01 15:00:19 +02:00
Ronald
904a03f81a Sort revision list by createdAt.
refs https://ghost.slack.com/archives/C02G9E68C/p1682941387256079?thread_ts=1682507718.761429&cid=C02G9E68C https://github.com/TryGhost/Team/issues/3123

This commit modifies the revisionList method to sort the revisions array by createdAt property in descending order, instead of reversing the order of the array. This makes the code more intuitive and easier to follow for future developers.

Additionally, the published_latest key-value pair is renamed to initial_publish to better reflect its meaning. This key-value pair is added to the revision object at the index where the post status changed from 'draft' to 'published', indicating the initial publication of the post.
2023-05-01 14:13:05 +02:00
Ronald
d6794e6c43 Added "published_latest" key to revisionList
refs https://github.com/TryGhost/Team/issues/3123

This commit modifies the revisionList method to add a new key-value pair published_latest: true to the object if the current index matches with the index of the latest published revision with the reason 'published'. The change only affects the latest published revision and doesn't modify any existing data. This update improves the display of post revisions by highlighting the latest published revision in the list.
2023-05-01 10:30:02 +02:00
renovate[bot]
60d26c62e8 Update dependency vite to v4.3.3 2023-05-01 08:57:56 +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
Elena Baidakova
257e17c1ba Released Announcement-Bar v1.1.4 2023-04-27 17:23:37 +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
Simon Backx
1ff71dc36c Removed unused bulkRemoveTags
no issue

This bulk action is not used at the moment.
2023-04-27 14:56:54 +02:00
Elena Baidakova
f5446bea46 Released Announcement-Bar v1.1.3 2023-04-27 16:45:55 +04: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
Simon Backx
ec5ee76d0b
Added posts and pages bulk editing (#16634)
fixes https://github.com/TryGhost/Team/issues/2677


Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2023-04-27 10:26:44 +02:00
Peter Zimon
792834e742 Dark mode input field background fix
no refs.

- The background color of the announcement bar input field and its container's background color was slightly off in dark mode
2023-04-26 22:38:48 +02:00
Peter Zimon
5f266a11db Fixed text selection for announcement bar
no issue.

- In dark mode the text and the text selection color in the announcement bar's input field were the same. This made the selected text unreadable
2023-04-26 22:33:13 +02:00
Peter Zimon
ca7ca53d5c Fixed minor UI bugs for announcement bar dark mode
refs. https://github.com/TryGhost/Team/issues/3112

- the font color in the announcement input field was not prepared for dark mode
- the first background swatch had an unwanted border setting
2023-04-26 21:31:37 +02:00
Sanne de Vries
fddb0fe965 Updated copy in post list "add tag" modal
No ref
2023-04-26 16:55:25 +02:00
Simon Backx
ad3fc7fce3 Fixed filter update after bulk action
no issue

After making a change to a post via the bulk action menu, the filter checks if the post should still be included on the page. If not, it is removed.

There were two bugs here:
- Expansions were not applied
- Relation checks were not working because the model was not serialized

Now  the posts correctly stay on the page if needed, or are removed if not.
2023-04-26 16:25:48 +02:00
Peter Zimon
a65dd11637 Minor UI refinements for announcement bar
refs. https://github.com/TryGhost/Team/issues/3112

- sidebar was a bit misaligned
2023-04-26 16:10:11 +02:00
Simon Backx
56b51999dc Added accent color for Koenig Lexical
refs https://github.com/TryGhost/Team/issues/3082
2023-04-26 16:06:37 +02:00
Naz
4cd2688c25
Fixed announcement bar filtering for disabled members
refs https://github.com/TryGhost/Team/issues/3112

- When members features are disabled on the site, there is no point to show member-specific filters for the announcement bar. The only option available should be to show or not to show the announcement.
2023-04-26 15:39:25 +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]
235b39ab7a Update sentry-javascript monorepo to v7.49.0 2023-04-26 10:30:25 +02:00
renovate[bot]
2a2c8efaea Update dependency vite to v4.3.2 2023-04-26 10:30:12 +02:00
renovate[bot]
bcc2e06063 Update dependency @vitejs/plugin-react to v4 2023-04-26 10:29:12 +02:00
renovate[bot]
52b7086d1d Update dependency semver to v7.5.0 2023-04-26 10:14:22 +02:00
renovate[bot]
48ebe66208 Update sentry-javascript monorepo to v7.48.0 2023-04-26 10:14:04 +02:00
renovate[bot]
95b4d48c39 Update dependency vite to v4.2.2 2023-04-26 10:13:40 +02:00
renovate[bot]
31ae31a13d Update dependency tailwindcss to v3.3.2 2023-04-26 06:36:40 +02:00
Ghost CI
cf0fdc3d86 v5.45.1 2023-04-25 16:32:08 +01:00
Kevin Ansfield
11cab899f0
🐛 Fixed images sometimes being stored as data: URLs when copy/pasting from other editors (#16707)
refs https://github.com/TryGhost/Team/issues/2887

Images could sometimes be pasted into the editor (noticed especially with Google Docs) with `data:` URLs rather than typical `https:` URLs. That causes problems because data URLs are large binary blobs that get stored in the `posts` table and passed through many areas of the system that doesn't expect large binary blobs, causing knock-on effects.

- added handling to our editor's image card to detect when the card is displayed in the editor with a `data:` URL and if it was then it converts it to a file and uploads it so the image can be stored and displayed the same way as any other image
 - handles uploads on both paste and opening a post in the editor that was previously saved with a `data:` URL
2023-04-25 15:58:07 +01:00
Sanne de Vries
1f643884af Fixed broken links in feature image caption in post history
No ref
2023-04-21 17:01:51 +01:00
Sanne de Vries
d26ba6ff4d Surfaced feature image caption in post history versions
No ref
2023-04-21 16:57:49 +01:00
Chris Raible
3d785e4d95 Fixed restoring post revision not creating a new revision
refs TryGhost/Team#3109
2023-04-21 16:37:49 +01:00
Naz
d2f4c097a0 Added Ukrainian locale for Portal
refs https://github.com/TryGhost/Team/issues/2795

- Ukrainian translation - used informal form
2023-04-21 17:26:51 +02:00
Ronald
47a327a4ba Added ESC handling to modal-post-history
no issue

- added esc key handling
2023-04-21 16:25:14 +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
Fabien "egg" O'Carroll
f92def8dde Exposed feature image meta data to post revision modal template
This will allow Sanne to wire it up to the output
2023-04-21 16:02:02 +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
Sodbileg Gansukh
9f93c7b205 Refined the admin UI of the announcement bar
closes https://github.com/TryGhost/Team/issues/3098
2023-04-21 15:59:20 +01:00
Ronald
0751ff9e9d Added post status conditions in history modal
no issue
2023-04-21 15:58:45 +01:00
Rishabh Garg
a704071448
Added pintura config for lexical editor (#16698)
refs https://github.com/TryGhost/Team/issues/3034

- passes pintura editor config to Koenig lexical editor, allowing integrating it with lexical cards like image and product.
2023-04-21 20:18:28 +05:30
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
Sanne de Vries
22c45ee9b1 Updated copy for deleted staff users in post history
No ref
2023-04-21 15:27:40 +01: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
02f9ecb7c1
Fixed announcement showing to visitors when set to paid_members
refs https://github.com/TryGhost/Team/issues/3051

- The filter was not working properly when there was no logged in member, but the announcement filter was set to "paid_members" only
2023-04-21 15:27:18 +02:00
Elena Baidakova
4259867f4e Called onChange callback from announcement content
no issue
2023-04-21 17:20:56 +04:00
Naz
6928235c48
Refactored announcement bar settings tests
refs https://github.com/TryGhost/Team/issues/3051

- Made unit tests in the announcement bar settings package more concise
2023-04-21 15:19:33 +02:00
Sanne de Vries
d3a60c760b Updated feature image positioning in post history
No ref
2023-04-21 14:14:32 +01:00
Ronald
f37d7a3fc7 Wired up revision post status and reason to admin
no issue

We can now get post_status and reason in admin for each post_revision
object
2023-04-21 14:05:27 +01:00
Elena Baidakova
0adc81e192 Released Announcement-Bar v1.1.2 2023-04-21 17:00:47 +04:00
Elena Baidakova
bef618c975
Fixed announcement bar close button state (#16699)
refs TryGhost/Team#3095

We should show the announcement bar again in the following case:

- User closes the bar
- Publisher updates announcement content
- We show the bar again even if the user closed it previously in the
same session
2023-04-21 16:58:41 +04:00
Michael Barrett
1538b18d4e
Added post revision anonymous author label (#16697)
refs https://github.com/TryGhost/Team/issues/3104

When a post revision author has been deleted, or there is no author
associated with a post revision, the label "Anonymous" is used for the
revision author
2023-04-21 13:52:08 +01:00
Elena Baidakova
a46d837fbd Released Announcement-Bar v1.1.1 2023-04-21 16:49:13 +04:00
Chris Raible
857a5ad004
Fixed FIFO for post revisions (#16696)
no issue

- with this change, the oldest revision will be deleted and the new
revision will be added if the limit is reached
2023-04-21 13:34:12 +01:00
Fabien "egg" O'Carroll
9ab4579084 Added post history modal lint errors to todo file 2023-04-21 13:33:08 +01:00
Fabien "egg" O'Carroll
f33f9cc530 Added feature_image to the post history modal
This allows us to diff and review previous revisions feature images
2023-04-21 13:20:41 +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
Elena Baidakova
b893ec13ab Fixed announcement bar insertion
no issue
- Checked if react root div was already inserted to avoid duplication.
2023-04-21 15:19:24 +04:00
Sodbileg Gansukh
b6320ca976 Updated the announcement bar subheading copy in the settings
refs https://github.com/TryGhost/Team/issues/3098
2023-04-21 12:18:53 +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
Michael Barrett
a9ee30f8b0
Fixed issue with restoring post revision (#16694)
refs https://github.com/TryGhost/Team/issues/3102

Post revision restoration was failing due a few failing edge cases that
occurred during the refactor of the post history modal
2023-04-21 11:55:24 +01:00
Sodbileg Gansukh
0ecdd50d3b Refined the announcement bar frontend styles
refs https://github.com/TryGhost/Team/issues/3097
2023-04-21 11:50:08 +01:00
Ronald
6d4bee82f0 Add flag val to showDifferences in post history
no issue

- set the tracked value to showDifferences state in modal-post-history
2023-04-21 11:22:08 +01:00
Sanne de Vries
1d4a358fd5 Fixed feature image and content overlapping in post
No ref
2023-04-21 11:06:57 +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
Elena Baidakova
8e897ffdd4
Wired announcement settings admin UI to API (#16692)
refs TryGhost/Team#3094
2023-04-21 12:49:29 +04:00
Ronald Langeveld
a13ac255f3
Refactored post history modal to Glimmer component (#16690)
closes https://github.com/TryGhost/Team/issues/3077

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

This pull request refactors the modal-post-history component from a
classic Ember component to a glimmer component, using the latest APIs
and syntax. This improves the code quality and aligns with the Octane
edition of Ember. The changes affect the
`ghost/admin/app/components/modal-post-history.js` and
`ghost/admin/app/components/modal-post-history.hbs` files.
2023-04-21 09:45:28 +01:00
Sanne de Vries
ae04987d6f Added UI for highlighting published post revision
No ref
2023-04-21 09:25:51 +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
Sanne de Vries
ffcba43aa9 Fixed post diffing not being hidden behind feature flag 2023-04-21 08:44:12 +01:00
Sodbileg Gansukh
e5066252bd Added a separate settings page for the announcement bar
refs https://github.com/TryGhost/Team/issues/3080
2023-04-20 22:21:22 +01:00
Sanne de Vries
44206fad38 Updated post history modal
No ref
- Moved diffing toggle
- Removed feature image buttons
- Fixed faded content when diffs is toggled off
2023-04-20 17:47:24 +01:00
Rishabh
bcd0ed539c Updated image editor settings
refs https://github.com/TryGhost/Team/issues/3034

- updates frame options for pintura image editor
- cleans up image editor loading state based on settings
2023-04-20 17:28:01 +01:00
Michael Barrett
49eac033a3
Added confirmation modal when restoring a post revision (#16689)
no issue

Added confirmation modal when restoring a post revision
2023-04-20 17:01:17 +01: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
Fabien "egg" O'Carroll
e3fbab9dad Refactored the card diffing into a separate method
This makes it easier to enable and disable the card diffing in dev
2023-04-20 15:23:08 +01:00
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
53b2050c89 Released Announcement-Bar v1.1.0 2023-04-20 16:40:28 +04:00
Elena Baidakova
a282857379
Added announcement close button state storage to sessionStorage (#16683)
refs TryGhost/Team#3071
2023-04-20 16:39:44 +04:00
Sodbileg Gansukh
f95febbcbf Reverted to the default pintura editor style 2023-04-20 12:32:39 +01:00
Michael Barrett
096a31cf7e
Added post revision restoration (#16680)
no issue

Added functionality to restore a post revision
2023-04-20 11:43:22 +01:00
Elena Baidakova
bf6f697be4 Fixed announcement-bar package version
no issue
2023-04-20 14:32:20 +04:00
Elena Baidakova
5d3eed1eac Released Announcement-Bar v1.0.0 2023-04-20 14:24:49 +04:00
Elena Baidakova
d36f3618c0 Added onBlur handler for announcement editor
refs TryGhost/Team#3009
2023-04-20 14:05:37 +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
e39c79a811 Added debounce for announcement content editor
refs TryGhost/Team#3009
2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
65ba464548 Show the announcement bar only when there is content 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
b1f60fd589 Update the light announcement bar background color 2023-04-20 14:05:37 +04:00
Naz
5421ab5ab0 Limited the keys pulled from Settings API
refs https://github.com/TryGhost/Team/issues/3009

- It's best to pull in as much data from the API as the app's state will ever use. Makes it explicit about what fields the app depends on instead of requesting a whole of "settings"
2023-04-20 14:05:37 +04:00
Naz
7270c17a1d Connected announcement bar to Settings API data
refs https://github.com/TryGhost/Team/issues/3009

- The change hooks up the announcement bar script to use "announcement" and "announcement_background" values coming from the Content Settings API
2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
8e7a150237 Add closing logic 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
6e1cb2f8ad Add close button 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
af6b474e23 Add the default background color class 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
248d5833e4 Added basic styles 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