Commit Graph

34871 Commits

Author SHA1 Message Date
Ghost CI
18a0e173fb v5.52.2 2023-06-21 03:32:56 +00:00
Chris Raible
2568c5898a
🐛 Fixed post scheduling for sites with transferred ownership (#17075)
refs TryGhost/Ghost#3494

- By default, the post scheduler runs as user_id = 1, which is the
original owner of the site
- If ownership has been transferred to a different user, it's possible
that there is no user with id = 1
- In this case, the scheduler would fail to publish a post, because
updating the post using user_id = 1 failed a foreign key constraint in
the post_revisions table
- This commit fixes the issue by checking if the contextUser exists, and
if not, replacing it with the current owner of the site
2023-06-20 19:51:13 -07:00
Ghost CI
69fddf8abe v5.52.1 2023-06-20 06:54:10 +00:00
Fabien 'egg' O'Carroll
41cbc40353
Moved collections initialisation behind labs flag (#17057)
We ran into an issue where the large `published:true` query was
affecting the boot time of large sites which had knock-on effects with
availability.
2023-06-19 16:40:15 +02:00
Kevin Ansfield
2e3d2e1121
Fixed "Beta feedback" not showing in beta editor when feature flag is switched off
no issue

- even when the editor beta is turned off, any post created in the beta will still open in the beta editor
- the "beta feedback" text in the bottom right was disabled when the beta flag was disabled which meant it was difficult to tell when you were using the beta editor vs the original editor
2023-06-19 15:24:11 +01:00
Kevin Ansfield
3070e505f5
🐛 Fixed beta editor causing left-aligned images in some themes
closes https://github.com/TryGhost/Team/issues/3499

- bumps `@tryghost/kg-default-nodes` and `@tryghost/kg-lexical-html-renderer` to fix missing `kg-image` class on the `<img>` element of rendered image cards
2023-06-19 14:20:40 +01:00
Kevin Ansfield
5d9dd893b3
🐛 Fixed beta editor HTML cards auto-closing tags when rendering
closes https://github.com/TryGhost/Team/issues/3462
refs a49f296c08

- bumps `@tryghost/kg-default-nodes` and `@tryghost/kg-lexical-html-renderer` with support for "raw" html values in rendered card output
2023-06-19 14:39:51 +02:00
Ghost CI
5b2ba79cef v5.52.0 2023-06-16 15:02:41 +00:00
Ghost CI
6a3af5b406 🎨 Updated Casper to v5.4.11 2023-06-16 15:02:41 +00:00
Simon Backx
9774dc7a51 Released @tryghost/signup-form v0.1.2 2023-06-16 16:01:09 +02:00
Simon Backx
f13c8c4af2 🐛 Fixed signup form text wrapping after submitting
no issue
2023-06-16 15:57:51 +02:00
Peter Zimon
78aa31973c Updated installed theme list
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-16 15:44:02 +02:00
Sag
dfd69f9cf7 Bumped Lexical dependencies
no issue
2023-06-16 15:23:20 +02:00
Fabien 'egg' O'Carroll
a1dae99245
Enabled errors for our error rules in eslint (#17041)
Yo dawg, I heard you like errors?

This fixes the last issues we had with incorrect error usage and updates
eslint to longer allow them through!
2023-06-16 14:50:06 +02:00
Michael Barrett
721d7202a0
Added truncation to custom theme setting description (#17044)
no issue

Added truncation to custom theme setting description to prevent overly
long custom setting descriptions from diminishing the settings UX
2023-06-16 13:14:43 +01:00
Daniel Lockyer
e13fcd3272
Released Portal v2.33.2 2023-06-16 13:41:31 +02:00
Daniel Lockyer
14f614d0c1 Added apps/ to vscode working directories
- this maintains support for all the code folders in the vscode
  settings.json file, so they load the eslint files correctly
2023-06-16 13:37:58 +02:00
Daniel Lockyer
f3894d5898 Moved Portal to apps/
refs https://github.com/TryGhost/Toolbox/issues/594

- we're moving all the standalone apps to a separate folder to keep them
  out of the core code and easier to find
2023-06-16 13:37:58 +02:00
Rishabh
eeabce2473 Fixed official theme image assets not loading in adminX
refs https://github.com/TryGhost/Team/issues/3432

The admin assets url are modified by ember build process by adding cache busting, so the original urls can't be used directly in adminX. This change passes the image assets from ember admin, causing the right image urls to be passed to adminX and for loading images.
2023-06-16 17:06:22 +05:30
Ronald Langeveld
77e3b3e947
🐛 Fixed page revision returning empty array on update and restore (#17042)
closes https://github.com/TryGhost/Team/issues/3491

- the `PostRevisionModel` had a `belongsTo` relation to Post which resulted in the Page model returning an empty array in the `post_revisions` property.
- Simply removing it fixed it. refs https://ghost.slack.com/archives/C02G9E68C/p1686912389383579?thread_ts=1686909240.034419&cid=C02G9E68C
2023-06-16 13:24:02 +02:00
Daniel Lockyer
99aeb73ecc Optimized DB reset during tests
refs https://github.com/TryGhost/Toolbox/issues/592

- it turns out that `TRUNCATE` in CI takes ~300ms for all tables, but
  `DELETE FROM` takes ~30ms
- whilst truncating is generally known to be faster, I believe it's only
  faster on large tables
- this saves 90% of the time it takes to reset the DB in MySQL
2023-06-16 13:15:17 +02:00
Peter Zimon
0f9417456a Added optional confirmation for modals in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-16 12:35:27 +02:00
Peter Zimon
f4e015d2c5 Added back button to theme preview in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-16 12:35:27 +02:00
Naz
09264261b7 Added ability to fetch posts by collection
closes https://github.com/TryGhost/Team/issues/3423

- For convenience we need a way to fetch posts that belong to a certain collection. This change adds support for `collection` query parameter: `/?collection=` which can be either an id or slug of the collections we are trying to fetch.
- When posts are fetched by collection we ignore any filters passed along in query parameters as collection is a "filter" by it's very nature.
2023-06-16 17:28:12 +07:00
Daniel Lockyer
b5d3066116
Removed eslint-plugin-react dependency from signup-form
refs 997cd3687e

- the `eslint-config-react-app` dependency already covers all necessary rules from `eslint-plugin-react`
  and using it separately causes conflicts across projects in eslint config
- thanks for the commit message @rishabhgrg :)
2023-06-16 11:53:40 +02:00
Rishabh
997cd3687e Removed eslint-plugin-react from AdminX
The `eslint-config-react-app` already covers all necessary rules from `eslint-plugin-react` and using it separately causes conflicts across projects in eslint config
2023-06-16 15:21:19 +05:30
Naz
25e0cb12c0
Added "getBySlug" method to Collections Service
refs https://github.com/TryGhost/Team/issues/3423

- This is a convenience method that should allow fetching collections by their slug. It is a great developer experience for in case when fetching built-in collections like "featured" and "index", so can avoid an extra call to find the collection and it's ide one wants to use.
2023-06-16 16:31:50 +07:00
Daniel Lockyer
361fea9977
Revert "Updated Lerna to v7"
This reverts commit d007ff86ac.
2023-06-16 11:22:28 +02:00
Daniel Lockyer
d007ff86ac
Updated Lerna to v7
refs https://github.com/TryGhost/Ghost/pull/16973

- updates Lerna to v7 and removes `useWorkspaces` as Lerna now detects
  this automatically
2023-06-16 11:18:52 +02:00
Fabien "egg" O'Carroll
eee5eed6e2 Improved DX when working with collections
This was missing from the initial package creation, adding the command here
means that `yarn dev` in the top level will watch and build collections
2023-06-16 11:08:13 +02:00
renovate[bot]
e9595d9a4b Update dependency ember-cli-dependency-checker to v3.3.2 2023-06-16 10:15:56 +02:00
renovate[bot]
3aa0c7018d Update dependency i18next to v23 2023-06-16 10:15:18 +02:00
renovate[bot]
6ad1e5be68 Update dependency @ember/test-helpers to v2.9.4 2023-06-16 10:03:40 +02:00
renovate[bot]
c1d90df181 Update dependency @playwright/test to v1.35.1 2023-06-16 10:03:32 +02:00
renovate[bot]
d6664b70fd Update dependency semver to v7.5.2 2023-06-16 09:56:57 +02:00
Naz
1d214361ad
Refactored posts browsing to posts service
refs https://github.com/TryGhost/Team/issues/3423

- This refactor allow for smaller and cleaner change that's coming up when dealing with `?collection=` query parameter
2023-06-16 14:52:55 +07:00
Ronald Langeveld
cfbc97b033
🐛 Fixed revisions relation not linked to Posts api (#17037)
no issue

This was a bit of an oversight from our feature built at the retreat. We
didn't take revisions into account for pages at all, but luckily it made
revisions without issues regardless.
It just wasn't accessible and users weren't able to restore via ADMIN
because the API didn't serve them at all.

This wires up the revisions relation to be served by the API so we can
retrieve it in Admin.
2023-06-16 09:49:12 +02:00
Daniel Lockyer
02eadc32d3
Switched to only enabling retries in CI
refs https://ghost.slack.com/archives/C02G9E68C/p1686841987067309?thread_ts=1686761234.035659&cid=C02G9E68C

- enabling retries has helped reduce the number of flaky tests we see,
  but it means it's causing issues with local development and snapshots
- this moves the retry config to the CI specific commands so we don't
  have retries enabled locally
- also deduped test:base and test:single
2023-06-16 09:47:03 +02:00
Fabien "egg" O'Carroll
0d7f98f4d1 Supported adding/removing post to collection via Posts API
We've got some fairly simple diffing logic here to update the collections which
a post is in, the bulk of the changes here are to support the return of a DTO
rather than Bookshelf Model. This also helps improve the architecture because
we are step closer to removing infrastructure concerns (HTTP Response Headers)
from the business logic layer.

For now there is a crappy EventString which can be passed back to the
controller which can then handle any HTTP related concerns, although long term
these should be actual events like PostPublished or PostUpdated.
2023-06-16 09:28:19 +02:00
Fabien "egg" O'Carroll
f3f9e5a2f3 Moved serialisation of formats into the serialiser-layer
This prepares us to return a DTO rather than BookshelfModel to the serialiser
layer. When passing a BookshelfModel, the serialisation layer uses the model to
read from when building computed properties. By stripping values out in the
toJSON method it means that the DTO will be missing them and the computed
properties won't be able to be calculated. Instead we return ALL values to the
serialisation layer, and then strip out the ones that weren't requested in the
"clean" step.

This also inadvertently fixes the issue with `reading_time` requiring the
`html` field to be requested, we can now request just `reading_time`, as well
as have it included by default.
2023-06-16 09:17:47 +02:00
Fabien "egg" O'Carroll
41716a06ae Fixed mutation of shared state for matcher
This can cause bugs due to the matcher constraints changing in each test
2023-06-16 09:17:47 +02:00
Fabien "egg" O'Carroll
53eea00d21 Fixed check for god_mode param
Rather than require the string 'true', we allow any value to be passed, this
works with any parsing of params into booleans.
2023-06-16 09:17:47 +02:00
Fabien "egg" O'Carroll
229875d67d Bumbed @tryghost/admin-api-schema to latest version
This includes the changes necessary to allow the `collection` property to be
passed on posts
2023-06-16 09:17:47 +02:00
Jono Mingard
c71d245b1d Show descriptions from theme settings if set
refs https://github.com/TryGhost/Team/issues/3354
2023-06-16 15:43:48 +12:00
Peter Zimon
005a488eed Changed button color in nav settings in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-15 20:46:51 +02:00
Peter Zimon
5bfbd5a7a0 Refined navigation design in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-15 20:42:33 +02:00
Rishabh
5559b2234e Released Admin-x-settings v0.0.7 2023-06-15 23:09:19 +05:30
Rishabh
e19c1e905d Removed theme images from adminX
refs https://github.com/TryGhost/Team/issues/3432

The theme images are used directly from admin assets using the admin assets url in AdminX, so these are redundant and not used.
2023-06-15 22:55:27 +05:30
Rishabh
7400937f52 Added delete and upload confirmation for themes in adminX
refs https://github.com/TryGhost/Team/issues/3432

- shows user confirmation popup on deleting a theme
- shows user confirmation popup to activate an uploaded theme
- shows user confirmation popup to overwrite an existing theme
2023-06-15 21:00:51 +05:30
Rishabh
44a07e04e2 Fixed file upload not triggering for same file selection
refs https://github.com/TryGhost/Team/issues/3432

File upload component was not firing `onChange` when user attempts to upload the same again, which is a side-effect of `input` field behavior. This change resets the file input on every upload with a new key so that the upload always fires
2023-06-15 21:00:51 +05:30