Commit Graph

18015 Commits

Author SHA1 Message Date
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
Duy
b7bdd1f401
Updated Vietnamese translations (#17051)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-19 13:51:12 +02:00
Duy
e85845f914
Updated Vietnamese translations (#17052)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-19 13:50:36 +02:00
Kevin Ansfield
bdd8302484
🐛 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 11:13:06 +01:00
Naz
7d4b278a83
Fixed slug-based navigation in collections UI
refs https://github.com/TryGhost/Team/issues/3169

- When navigating through collections slugs did not display correctly returning "undefined" in the navigation. It was easier to fix the bug than working around it.
2023-06-19 17:07:50 +07:00
Daniel Lockyer
2173fd9ef9 Moved signup-form to apps/ folder
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-19 09:43:33 +02:00
Naz
8d9d9de8d4
Added basic UI for collection posts
refs https://github.com/TryGhost/Team/issues/3169

- Added a lits to a collection view showing which posts belong to a collection.
2023-06-19 14:38:01 +07:00
ErminMerdanovic
1a868e08ef
Updated German translations (#17045)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-19 08:19:54 +02:00
renovate[bot]
14c22a9b6f Update storybook monorepo to v7.0.22 2023-06-19 07:34:10 +02:00
Jono Mingard
5331cc90e2 Added errors and improved behaviour of the navigation editor
refs https://github.com/TryGhost/Team/issues/3432
2023-06-19 16:48:42 +12:00
Rishabh
fce6b52bbd Released Admin-x-settings v0.0.8 2023-06-18 18:48:06 +05:30
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
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
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
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
renovate[bot]
155c08bc61 Update dependency expect to v29.5.0 2023-06-14 14:43:08 +02:00
Aileen Booker
00131de0b6 Simplify logic when to call stripeService.connect() 2023-06-14 08:18:19 -04:00
Aileen Booker
10859b9b01 Fixed e2e tests 2023-06-14 08:18:19 -04:00
Aileen Booker
d27bb8f075 Added new Stripe events to DomainEventsAnalytics
no issue

- We need to send information about Stripe being enabled or disabled in live mode to analytics
- This hooks up the Domain events listeners in the analytics service and processes this information accordingly
2023-06-14 08:18:19 -04:00
Aileen Booker
48f9e85e09 Expose Stripe events in package 2023-06-14 08:18:19 -04:00
Aileen Booker
98fd6a7dbf Hooked up Stripe service connect method on Stripe public key update
no issue

- Withing the `SettingsBREADService` we want to call the `connect` method of the Stripe Service, which then dispatches the `DomainEvent`
- In order to ensure that the Stripe service is connected in 'live' mode, we compare the public key and make sure no live key was set before so to avoid multiple triggers of this call.
2023-06-14 08:18:19 -04:00
Aileen Booker
f3e0cec0d2 Added StripeLiveEnabledEvent and StripeLiveDisabledEvent to Stripe service
no issue

- This is preparation work to be able to listen to events whenever Stripe gets enabled in live mode or disabled again.
- This creates two new event types, which are being dispatched with `DomainEvents` from the Stripe service on the `connect()` and - vice versa - the `disconnect()` methods.
2023-06-14 08:18:19 -04:00
Daniel Lockyer
974ce0b25b
Updated i18n support locales
refs https://github.com/TryGhost/Team/issues/2795

- added Croatian and Malay, and added the changes they've had since
  merging
2023-06-14 12:29:01 +02:00
Daniel Lockyer
7a124a6901 Moved announcement-bar 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-14 12:28:55 +02:00
Nik Syarul Zaffi
ed20ff4a06
Added Malay locale (#16952)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-14 12:23:45 +02:00
Daniel Lockyer
fa43a0236b Moved Sodo-Search into apps/
refs https://github.com/TryGhost/Toolbox/issues/594

- this is the first of a set of commits to move our "apps" into the
  `apps/` folder, so we don't mix Ghost core and standalone apps
2023-06-14 12:10:57 +02:00
renovate[bot]
da0b2373a0 Update babel monorepo to v7.22.5 2023-06-14 12:08:12 +02:00
Simon Backx
04d04e1864
Revert "Fixed post editor items getting cut off on iOS" (#17017)
Reverts TryGhost/Ghost#16765

This commit broke the browser tests because the save button is hidden
underneath the settings menu:


![image](https://github.com/TryGhost/Ghost/assets/5277847/ec384fbb-6a39-4799-965d-768f66df3ad5)
2023-06-14 11:31:58 +02:00
Ronald Langeveld
327daa5dde
🐛 Fixed horizontal scrolling on signup form input field. (#17002)
closes https://github.com/TryGhost/Team/issues/3429

Resolved the issue where the input field in the signup form was not scrolling horizontally when a long text was entered. Updated the form container to properly contain the input field and prevent it from extending behind the button. The input field now blends into the form box and enables horizontal scrolling when necessary.
---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-06-14 11:15:48 +02:00
Peter Zimon
010be7fd3d Updated theme preview in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 10:57:22 +02:00
Simon Backx
e680ddf14a Fixed retrying failed email without error message
refs https://ghost.slack.com/archives/CTH5NDJMS/p1686730494254149?thread_ts=1686593227.689069&cid=CTH5NDJMS
2023-06-14 10:18:50 +02:00
Simon Backx
dbf6ccf29e Added missing cover style for signup card in frontend 2023-06-14 10:18:32 +02:00
Thomas Lamant
4e082a33cc
Updated Danish translations (#16967)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-14 09:46:20 +02:00
Jonathan Browne
d34b9b021a
Fixed post editor items getting cut off on iOS (#16765) 2023-06-14 09:45:17 +02:00
Thomas Lamant
5bfbaec262
Updated French translations (#16942)
refs https://github.com/TryGhost/Team/issues/2795
2023-06-14 09:41:22 +02:00
Peter Zimon
5c229ce543 Added Breadcrumbs component to AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 09:40:27 +02:00
Naz
34f7b77190
Fixed collections snapshot
no issue

- The snapshot has save a wrong amount of "pages" for collections and was falsely passing after a retry. The correct amount should be 6.
2023-06-14 14:17:23 +07:00
Peter Zimon
15ec9f0d14 Added page header component in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 09:13:00 +02:00
renovate[bot]
52af10fef5 Update dependency lib0 to v0.2.78 2023-06-14 08:55:45 +02:00
renovate[bot]
77cc3aa2c0 Update dependency @storybook/addon-styling to v1.3.0 2023-06-14 08:55:26 +02:00
Peter Zimon
8820efa80b AdminX Design System component structure cleanup
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 08:35:51 +02:00