Commit Graph

17292 Commits

Author SHA1 Message Date
Djordje Vlaisavljevic
75aa3d1186 Updated feedback widget design inside Editor
no refs
2023-05-16 11:49:01 +01:00
Michael Barrett
43f55521c0
Implemented post slug update on duplicated post title update (#16802)
no issue

Updated the slug generation logic so that when a post is duplicated and
the title is edited, the slug gets updated to reflect the new title of
the post
2023-05-16 10:47:40 +01:00
Rishabh
f9866f97ae Updated config test to include adminX property
refs https://github.com/TryGhost/Team/issues/3151
2023-05-16 13:10:00 +05:30
Rishabh
52b2e48313 Released Admin-x-settings v0.0.3 2023-05-16 12:51:19 +05:30
Rishabh
067766e555 Updated publish config for admin-x settings package
refs https://github.com/TryGhost/Team/issues/3151
2023-05-16 12:49:59 +05:30
Rishabh
bb8eba9f37 Released Admin-x-settings v0.0.2 2023-05-16 12:41:50 +05:30
Rishabh
cfd704d0e1 Updated publish config for admin-x settings
refs https://github.com/TryGhost/Team/issues/3151
2023-05-16 12:33:37 +05:30
Rishabh
7b42aedf74 v0.0.1 2023-05-16 12:29:32 +05:30
Rishabh
f9ac201891 Handled missing config for new admin-x settings routing
refs https://github.com/TryGhost/Team/issues/3151

- handles redirection to old settings if the config for admin-x is missing and new settings route is opened
2023-05-16 12:27:18 +05:30
Rishabh
31779c95b5 Added feature flag for new admin-x settings
refs https://github.com/TryGhost/Team/issues/3151

- allows toggling route to new settings screen in react

Co-authored-by: Peter Zimon <zimo@ghost.org>
2023-05-16 12:23:24 +05:30
Rishabh
bf2a2eeb63 Added route for new admin-x settings
refs https://github.com/TryGhost/Team/issues/3151

- adds route in Admin for opening new settings screen in react
- adds new config for passing `adminX` to Admin
- loads adminX settings from package in Admin UI when new route is opened

Co-authored-by: Peter Zimon <zimo@ghost.org>
2023-05-16 12:23:24 +05:30
Rishabh
3d6fb0d6b1 Added new package for admin-x settings
refs https://github.com/TryGhost/Team/issues/3151

- adds a new vite + typescript + storybook + TW package for setting up admin settings in react with base config that works with Ghost monorepo
- includes base components/design system for new settings UI
- adds eslint rule config to the package to match rest of Ghost codebase
- this is an experimental package as we figure out the best patterns for new admin packages in Ghost monorepo

Co-authored-by: Peter Zimon <zimo@ghost.org>
2023-05-16 12:23:24 +05:30
Naz
2a16b1427d
Removed stray tsconfig.tsbuildinfo file
refs 69ce97268e

- This file should not have gotten into the source code from the get co
2023-05-16 13:08:57 +07:00
Naz
4e2a00b6e6 Added a collections package with CRUD logic
closes https://github.com/TryGhost/Team/issues/3166

- The collections service contains CRUD logic to manage collection entities through: save, getById, getAll, and destroy methods.
2023-05-16 12:21:31 +07:00
Sodbileg Gansukh
0e97cc3a11 Fixed double scrollbar issue on Pages
closes https://github.com/TryGhost/Team/issues/3219

- the pages template had a leftover .gh-list-sticky and it was causing an additional scrollbar inside the list
- removing the unncessary element fixes the issue
2023-05-16 12:27:37 +08:00
renovate[bot]
4ffdd27f0a Update dependency vite to v4.3.6 2023-05-15 20:15:31 +02:00
Elena Baidakova
86e84e35cb
Replaced modal feedback on dropdown in editor (#16793)
refs TryGhost/Team#3213

---

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

This pull request enhances the feedback modal feature in the lexical
editor. It improves the layout and appearance of the modal and its
trigger button, and uses a dropdown component to show and hide the
modal.
2023-05-15 17:15:34 +04:00
renovate[bot]
e66d335aef Update dependency semver to v7.5.1 2023-05-15 15:13:17 +02:00
renovate[bot]
f29f011919 Update dependency @types/sinon to v10.0.15 2023-05-15 15:12:50 +02:00
renovate[bot]
25dd51aa82 Update dependency cross-fetch to v3.1.6 2023-05-15 15:12:41 +02:00
Djordje Vlaisavljevic
6812e026b0 Commented out inlined beta feedback form on Published post page
no refs
2023-05-15 10:35:16 +01:00
Djordje Vlaisavljevic
5ae2425fb6 Hid inlined Labs beta feedback form
no refs
2023-05-15 10:35:16 +01:00
Djordje Vlaisavljevic
8640acf94e Moved feedback button to the left side of editor
no refs
2023-05-15 10:35:16 +01:00
Djordje Vlaisavljevic
1e3d78a937 Added inlined feedback form design to post published page
no refs
2023-05-15 10:35:16 +01:00
Djordje Vlaisavljevic
d82ad53bab Fixed bug where closing modal takes you to dashboard
no refs
2023-05-15 10:35:16 +01:00
Sodbileg Gansukh
c1b6d70b3d Added enter key support to tier benefits
closes https://github.com/TryGhost/Team/issues/2950

- when adding/editing tiers, benefits used to be added only when the plus button was pressed
- this adds enter key support for adding new benefits, same as how the navigation items are added
2023-05-15 16:47:20 +08:00
Michael Barrett
59fe794b0c
Implemented duplicate post functionality (#16767)
refs: https://github.com/TryGhost/Team/issues/3139 https://github.com/TryGhost/Team/issues/3140

- Added duplicate post functionality to post list context menu
  - Currently only a single post can be duplicated at a time
  - Currently only enabled via the `Making it rain` flag
- Added admin API endpoint to copy a post - `POST ghost/api/admin/posts/<post_id>/copy/`
- Added admin API endpoint to copy a page - `POST ghost/api/admin/pages/<page_id>/copy/`
2023-05-15 09:30:32 +01:00
Michael Barrett
77d7b590bc
🐛 Fixed outbound link tagger tagging non http urls (#16773)
refs https://github.com/TryGhost/Team/issues/3172

The outbound link tagger was tagging non http urls (i.e `javascript:`,
`mailto:`) which would prevent these urls from working as expected. This
change only allows urls to be tagged if they use the `http(s)` protocol.
2023-05-15 09:19:33 +01:00
Sodbileg Gansukh
77dda7beba Fixed long URL scrolling in members activity
refs https://github.com/TryGhost/Team/issues/2616

- long urls were causing scrolls in the members activity
- now the urls are broke into multiple lines, so that it's easier to understand/copy them
2023-05-15 16:00:11 +08:00
Sodbileg Gansukh
828c1df6ac Capitalize the homepage event in the members activity
refs https://github.com/TryGhost/Team/issues/2616
2023-05-15 16:00:11 +08:00
Ghost CI
8a5b1dd5d9 Merged v5.47.2 into main 2023-05-15 07:56:45 +00:00
Ghost CI
80d4072fdd v5.47.2 2023-05-15 07:56:43 +00:00
Chris Raible
58ffd1cfeb
Bumped kg-default-nodes and kg-lexical-html-renderer (#16785)
no issue

- bumped kg-default-nodes to 0.0.41
- bumped kg-lexical-html-renderer to 0.1.37
2023-05-12 18:20:54 -07:00
Fabien "egg" O'Carroll
ecb90c88ca 🐛 Fixed visibility of the post history feature
We had side stepped the existing checks of lexical and the feature flag when
checking if a published post was sent as an email. This takes into account the
existing checks to make sure the feature isn't leaked without the flag
2023-05-12 17:34:52 -04:00
Fabien "egg" O'Carroll
08597b47ba Added unit test for TiersRepository
We were completely missing tests for this, and the new logic pushed us under
the coverage threshold.
2023-05-12 16:38:32 -04:00
Fabien "egg" O'Carroll
c0ca7b16f6 Added caching to TierRepository
refs https://github.com/TryGhost/Toolbox/issues/515

Tiers are very frequently queried and we want to reduce the number of DB calls
we're making. We can store the Tiers in-memory, using the existing in-memory
repository patterns, but still persisting writes the the database.

We also have to update our test helpers, because they were bypassing the
repository for writes, but using it for reads resulting in an invalid cache
2023-05-12 16:38:32 -04:00
Fabien "egg" O'Carroll
6ab862568c Used TierRepository in serializers
We want to cache access to Tiers, and it's easier to do that in the
TierRepository. So we update a heavy user of Tiers to use the Tier
service so it can take adv of caching. The serializers are a big
offender for making calls to fetch Tiers.
2023-05-12 16:38:32 -04:00
Ghost CI
e41d9fedd8 v5.47.1 2023-05-12 15:02:19 +00:00
Ghost CI
8ce8cc81a5 🎨 Updated Casper to v5.4.11 2023-05-12 15:02:19 +00:00
Daniel Lockyer
72074b4c87
Released Portal v2.31.1 2023-05-12 15:43:25 +02:00
Daniel Lockyer
f8d446da7c
Updated location files
- contains changes as applied by i18next-parser
2023-05-12 15:40:17 +02:00
Daniel Lockyer
3ae29567d4
Added missing locales
- forgot to do this after merging the PRs
2023-05-12 15:39:28 +02:00
Daniel Lockyer
53d30199b3
Updated Portal to v2.31
- contains support for several new languages
2023-05-12 15:37:23 +02:00
Daniel Lockyer
763c07e421
Released Portal v2.31.0 2023-05-12 15:36:44 +02:00
Fabien "egg" O'Carroll
0abcba052c Used static created_at_ts to avoid flaky tests
closes https://github.com/TryGhost/Team/issues/3184
2023-05-12 08:13:51 -04:00
renovate[bot]
aa85263cb2 Update dependency express-lazy-router to v1.0.5 2023-05-12 13:55:57 +02:00
Daniel Lockyer
898b55265c Lazyloaded @extractus/oembed-extractor dependency
- this dependency seems a pretty heavy one to require upon boot and
  given most sites don't need it to function as normal, this saves
  several MB of RAM per instance
2023-05-12 12:18:40 +02:00
renovate[bot]
1fbf28618c Update dependency lib0 to v0.2.74 2023-05-12 11:47:38 +02:00
renovate[bot]
36b26611a4 Update dependency @babel/eslint-parser to v7.21.8 2023-05-12 11:30:55 +02:00
renovate[bot]
4ca5817286 Update dependency express-jwt to v8 2023-05-12 11:14:05 +02:00
renovate[bot]
763b3c50fc Update dependency vite-plugin-svgr to v3 2023-05-12 11:11:56 +02:00
Fabien 'egg' O'Carroll
13a18711d0
🐛 Fixed site setup hanging when mail isn't configured
closes https://github.com/TryGhost/Team/issues/3176

We were waiting for the welcome email to send before responding to the
client that setup is complete, this was causing the client to hang when
running `ghost install local` as mail isn't configured by default.
2023-05-11 11:58:27 -04:00
Sag
d86ac17e31
Added fetchLabels to the Lexical config (#16774)
closes https://github.com/TryGhost/Team/issues/3183
- fetches all existing labels
- returns "id" and "name" fields
2023-05-11 16:36:56 +02:00
Steve Larson
080a1c92d8 fixed linter errors
no refs
2023-05-11 08:14:11 -05:00
Steve Larson
26389507ed Revert "Reverted "Add lexical feedback (#16772)""
This reverts commit 0a9f280a75.
2023-05-11 08:12:25 -05:00
Kevin Ansfield
9ae3a535ac
Added missing explicit jsdom dependency in core
no issue

- the lexical lib file makes use of `jsdom` but there was no explicit dependency for it in `package.json` meaning we were relying on it being incidentally depended on through another package which is brittle
2023-05-11 14:05:11 +01:00
renovate[bot]
3920d217c0 Update dependency jsdom to v22 2023-05-11 14:40:08 +02:00
Deepam Kapur
3a39aa361b
🐛 Fixed generating card assets with include allowlist (#16766)
fixes https://github.com/TryGhost/Ghost/issues/16652

- we need `@` keyword before '(' according to the globrex package used in tiny-glob
2023-05-11 14:20:35 +02:00
Raka Afp
78a603e0a4
Added Bahasa Indonesia translation (#16746)
refs https://github.com/TryGhost/Team/issues/2795

- this adds translations for Bahasa Indonesian within Portal and Ghost
2023-05-11 11:42:30 +02:00
Naz
3eebeb608c
Added collections feature flag
closes https://github.com/TryGhost/Team/issues/3165

- This feature flag is here to gate the development of Collections 2.0 feature
2023-05-11 16:31:45 +07:00
Audun
b821136b5e
Added Norwegian translations (#16749)
refs https://github.com/TryGhost/Team/issues/2795

- this adds Norwegian translations for Portal and Ghost
2023-05-11 11:30:10 +02:00
Umidjon Tukhtaev
ea055e8b74
Added Uzbek locale (#16758)
refs https://github.com/TryGhost/Team/issues/2795

- this adds Uzbek translations for Portal
2023-05-11 11:25:42 +02:00
Elena Baidakova
bfa9ea88a2 Removed p wrapper for announcement bar
refs TryGhost/Team#3147
2023-05-11 13:22:05 +04:00
Uvindu Rajapakshe
022406b981
Updated Sinhalese translations (#16638)
refs https://github.com/TryGhost/Team/issues/2795

Co-authored-by: Prabodh Meshram <prabodh.meshram7@gmail.com>
2023-05-11 11:14:51 +02:00
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