Commit Graph

34846 Commits

Author SHA1 Message Date
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
Michael Barrett
9ce4c85905
Added custom theme setting descriptions (#17024)
refs https://github.com/TryGhost/Team/issues/3448

Added the ability to specify a description for a custom theme setting

---------

Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
2023-06-15 15:10:56 +01:00
Daniel Lockyer
4b6cfa8f28
Added yarn archive to produce a build tarball
fixes https://github.com/TryGhost/Ghost/issues/16835

- this reimplements a command to product a tarball with Ghost after we
  took over `yarn build` for package-specific build steps
2023-06-15 15:42:39 +02:00
Simon Backx
885e5b7b9c 🐛 Fixed visible scrollbars in signup form preview
fixes https://github.com/TryGhost/Team/issues/3485
2023-06-15 15:04:09 +02:00
Naz
6335033466
Added full post data when returning collection's posts
refs https://github.com/TryGhost/Team/issues/3423

- When querying for posts that belong to a collection we should be returning full post information just like we do for Posts API.
2023-06-15 18:35:58 +07:00
renovate[bot]
8ccb0f37ad Update storybook monorepo to v7.0.21 2023-06-15 13:04:31 +02:00
Elena Baidakova
26abeb0ad2 Hide announcement bar script if visibility wasn't chosen
no issue
2023-06-15 15:03:04 +04:00
Ghost CI
a22317305e Merged v5.51.2 into main 2023-06-15 08:11:45 +00:00
Ghost CI
ab119ec96e v5.51.2 2023-06-15 08:11:43 +00:00
ErminMerdanovic
7cbff19995
Updated German translations (#17027)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-15 09:22:49 +02:00
Leonardo Ferreira
b28b18c05a
Updated Brazilian Portuguese translations (#17010)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-15 09:15:41 +02:00
Kevin Ansfield
3ee857a0de
🎨 Added word count to beta editor
closes https://github.com/TryGhost/Team/issues/3242

- the beta editor now provides `<WordCountPlugin>` for tracking word count so we can add the UI for it back
2023-06-15 09:04:13 +02:00
Ronald Langeveld
49f936b098
🐛 Fixed empty icon crashing signup embed preview (#17022)
closes https://github.com/TryGhost/Team/issues/3471

- after adding and removing an icon, icon settings passed an undefined
icon to the signup form's all-in-one style. The AIO conditions didn't
take that into account and caused the entire component to crash.

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

Fix signup form embed code generation when icon is not set. Add a check
for `this.settings.icon` in `signup-form-embed.js` before replacing
image path.
2023-06-15 09:03:14 +02:00
Fabien 'egg' O'Carroll
8cb8b84786
🐛 Fixed Post History for posts sent as an email (#16999)
refs https://github.com/TryGhost/Team/issues/3458

From the discussion in slack, for all published/sent posts:
  Published only --> view history & restore
  Published & sent --> view history & restore
  Email only --> history hidden

And for all unpublished/unsent posts:
  All states --> view history & restore.
2023-06-15 09:03:01 +02:00
Elena Baidakova
333471c263 Released Announcement-Bar v1.1.5 2023-06-15 09:54:19 +04:00
Jono Mingard
63a6b20b18 Added navigation settings logic to AdminX
refs https://github.com/TryGhost/Team/issues/3433
2023-06-15 15:39:11 +12:00
Kevin Ansfield
3e8a0c5028
🎨 Added word count to beta editor
closes https://github.com/TryGhost/Team/issues/3242

- the beta editor now provides `<WordCountPlugin>` for tracking word count so we can add the UI for it back
2023-06-14 17:56:03 +01:00
Rogerio
09cbfae5c5
Updated Brazilian Portuguese translations (#16968)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-14 17:47:35 +02:00
Simon Backx
82a511e2df Released Signup Form v0.1.1 2023-06-14 17:45:33 +02:00
Ronald Langeveld
004f5ff9bf Added empty line at end of file to i18n.d.ts
no issue

- added missing empty line
2023-06-14 16:59:28 +02:00
Ronald Langeveld
b8935a918e
Removed typescript declaration build step for i18n (#17023)
ref https://ghost.slack.com/archives/C02G9E68C/p1686735066587639

### <samp>🤖 Generated by Copilot at f9ec3e9</samp>

This pull request removes redundant build scripts from the `ghost/i18n`
and `ghost/signup-form` packages. This simplifies the build process and
avoids unnecessary TypeScript compilation.
2023-06-14 16:51:14 +02:00
Simon Backx
5bb4a94444 Added signup form attribution tests
no issue

Added some tests for the signup form attribution when on an external site or on the Ghost site.
2023-06-14 15:50:04 +02:00
Simon Backx
4da658e72a 🎨 Reused attribution for embeddable signup forms on own site
fixes https://github.com/TryGhost/Team/issues/3473

When a signup happens via the embeddable signup form on your own site, we'll use the default
attribution, so it indistinguishable from a signup via Portal.
2023-06-14 15:26:40 +02:00
Ronald Langeveld
998708c81a
🐛 Fixed empty icon crashing signup embed preview (#17022)
closes https://github.com/TryGhost/Team/issues/3471

- after adding and removing an icon, icon settings passed an undefined
icon to the signup form's all-in-one style. The AIO conditions didn't
take that into account and caused the entire component to crash.

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

Fix signup form embed code generation when icon is not set. Add a check
for `this.settings.icon` in `signup-form-embed.js` before replacing
image path.
2023-06-14 15:13:49 +02:00
Simon Backx
14e05a6f0f 🐛 Disabled signup form embed menu when members are disabled
fixes https://github.com/TryGhost/Team/issues/3470

- When members are disabled or invite only, the signup form embed should be disabled
- The comments access setting is now also disabled if members are disabled
- The tiers menus are now also disabled if members are disabled
2023-06-14 14:57:08 +02:00
Daniel Lockyer
ecc28c5acd
Revert "Update dependency expect to v29.5.0"
This reverts commit 155c08bc61.
2023-06-14 14:56:03 +02:00