Commit Graph

11769 Commits

Author SHA1 Message Date
Kevin Ansfield
125b09324c
Added editorEmojiPicker labs flag (#18739)
closes https://github.com/TryGhost/Product/issues/4056

- adds new flag with UI and passes it through to the editor so it can conditionally enable the relevant plugins
2023-10-24 12:44:29 +00:00
Ghost CI
d20ad046db Merged v5.70.2 into main 2023-10-24 08:04:00 +00:00
Ghost CI
27f3f86d23 v5.70.2 2023-10-24 08:03:58 +00:00
renovate[bot]
c543193d86 Update dependency ember-svg-jar to v2.4.7 2023-10-24 07:57:01 +02:00
renovate[bot]
24849d8787
🐛 Fixed indent behaviour for paragraphs (#18724)
no issue

- updates `@tryghost/koenig-lexical` with indent improvements
  - prevents indents on paragraphs/headings etc which are not supported when rendering for front-end display
  - improves indent behaviour for lists so <kbd>Tab</kbd> can be pressed anywhere in a list item to indent rather than only at the beginning of the list
2023-10-23 08:43:25 +00:00
Ghost CI
ed885bd6b3 v5.70.1 2023-10-20 17:48:28 +00:00
renovate[bot]
975b122886
🐛 Fixed errors from using <br> in some situations when creating posts with ?source=html (#18714)
closes https://github.com/TryGhost/Product/issues/4037

- bumps `@tryghost/kg-html-to-lexical` that includes better node normalization to handle `<br>` in top-level text nodes and after a nested block-level element
  - also includes fix for button hrefs having `about:blank` prefixed to hash URLs
2023-10-20 17:09:55 +00:00
Ghost CI
ea42122a1f v5.70.0 2023-10-20 15:03:26 +00:00
Ghost CI
16c5e6e2f9 Merged v5.69.4 into main 2023-10-20 11:41:03 +00:00
Ghost CI
9e24ade17d v5.69.4 2023-10-20 11:41:01 +00:00
Michael Barrett
b4d2dd0282
Handled ServerError to show a custom error message in the admin (#18709)
refs https://github.com/TryGhost/Product/issues/4040

Handled `ServerError` to show a custom error message in the admin when
an unhandled server error occurs (i.e 504). Supersedes
https://github.com/TryGhost/Ghost/pull/18703
2023-10-20 12:02:51 +01:00
Jono M
caae0edf19
Fixed and restored new AdminX E2E tests (#18606)
refs https://github.com/TryGhost/Product/issues/3831

---

### <samp>🤖 Generated by Copilot at 539c2d3</samp>

This pull request updates and adds some test cases for the date picker
and newsletter features in the Ghost admin panel. It introduces a test
helper function for the date picker in `editor-test.js`, and removes a
redundant test case from `publish-flow-test.js`. It also adds two new
test cases in `publishing.spec.js` using the Playwright framework to
verify the timezone and recipient settings for publishing posts.
2023-10-20 10:00:35 +01:00
Michael Barrett
88e49b4f0e
Added 504 error handling in the admin (#18703)
refs https://github.com/TryGhost/Product/issues/4040

Added error handling for 504 errors to improve the message shown to the
user when a 504 occurs
2023-10-20 08:53:54 +01:00
renovate[bot]
93382df314
🐛 Fixed various editor issues (#18645)
closes https://github.com/TryGhost/Ghost/issues/18448

- improved slash menu positioning when opening at the bottom of a post
- fixed backspace sometimes deleting a preceding card (e.g. backspace at end of link inside a paragraph preceded by a card)
- fixed `?source=html` issues
  - images not rendering in front-end output after import
  - images wrapped in links losing their link after import
- fixed inline styles in HTML card content not displaying in the editor
- fixed broken help link in the email card
2023-10-19 19:17:23 +01:00
Sag
5c43945b94
Revert "Added Recommendations feature (#18664)" (#18694)
refs https://github.com/TryGhost/Product/issues/3744

- this reverts GA commit 4e338114de, as
launch has been postponed by a week
2023-10-18 17:03:35 +00:00
Ghost CI
099db95278 Merged v5.69.3 into main 2023-10-18 09:42:15 +00:00
Ghost CI
cf06037b81 v5.69.3 2023-10-18 09:42:13 +00:00
Sag
4e338114de
Added Recommendations feature (#18664)
refs https://github.com/TryGhost/Product/issues/3744

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-10-17 13:04:35 +00:00
Sodbileg Gansukh
73aa6bc22e Added back the global box-sizing rule 2023-10-17 17:36:44 +08:00
Ghost CI
af29aef5c5 Merged v5.69.2 into main 2023-10-16 16:16:28 +00:00
Ghost CI
75aadb1a92 v5.69.2 2023-10-16 16:16:26 +00:00
Kevin Ansfield
fac4d774a0
🐛 Fixed styles in HTML card content interfering with editor display (#18647)
closes https://github.com/TryGhost/Product/issues/4027

- bumps `@tryghost/koenig-lexical` to version that includes removal of `<style>` elements and `style` attributes when rendering HTML cards inside the editor
2023-10-16 16:35:55 +01:00
Kevin Ansfield
fc1728c695
🐛 Fixed potential invalid nesting of elements within heading nodes in editor (#18646)
refs https://github.com/TryGhost/Product/issues/3538

- bumps `@tryghost/koenig-lexical` with version that extends our de-nesting transforms to include non-Paragraph element nodes
2023-10-16 16:35:44 +01:00
Kevin Ansfield
f1236a07b4
🐛 Fixed card following paragraph being deleted when pressing Delete at beginning of some formatted text
closes https://github.com/TryGhost/Ghost/issues/18632

- bumps `@tryghost/koenig-lexical` to version containing the delete behaviour fix
2023-10-16 16:34:29 +01:00
Kevin Ansfield
70c2d98fba
🐛 Fixed styles in HTML card content interfering with editor display (#18647)
closes https://github.com/TryGhost/Product/issues/4027

- bumps `@tryghost/koenig-lexical` to version that includes removal of `<style>` elements and `style` attributes when rendering HTML cards inside the editor
2023-10-16 13:52:58 +00:00
Kevin Ansfield
4da6912d4b
🐛 Fixed potential invalid nesting of elements within heading nodes in editor (#18646)
refs https://github.com/TryGhost/Product/issues/3538

- bumps `@tryghost/koenig-lexical` with version that extends our de-nesting transforms to include non-Paragraph element nodes
2023-10-16 13:27:16 +00:00
Kevin Ansfield
8e422163b0
🐛 Fixed card following paragraph being deleted when pressing Delete at beginning of some formatted text (#18644)
closes https://github.com/TryGhost/Ghost/issues/18632

- bumps `@tryghost/koenig-lexical` to version containing the delete behaviour fix
2023-10-16 12:18:23 +00:00
renovate[bot]
68378e84c1 Update dependency webpack to v5.89.0 2023-10-16 01:06:09 +00:00
renovate[bot]
da25e86f41 Update dependency jose to v4.15.4 2023-10-16 01:05:29 +00:00
Ghost CI
d1e03f42fe v5.69.1 2023-10-13 15:03:10 +00:00
Jono M
b75a6d0e7f
Revert "Updated old admin acceptance tests to E2E with AdminX" (#18604)
Reverts TryGhost/Ghost#18599

There seems to be a timezone issue with one of the tests
2023-10-13 10:16:28 +01:00
Kevin Ansfield
b00388eb34
Cleaned up old re-auth code in editor route/template (#18605)
no issue

- brings the lexical editor in line with the previous editor
2023-10-13 09:13:52 +00:00
renovate[bot]
64fd510711 Update babel monorepo 2023-10-13 08:12:20 +02:00
Jono M
f0efbb7fbb
Updated old admin acceptance tests to E2E with AdminX (#18599)
refs https://github.com/TryGhost/Product/issues/3831

---

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

This pull request updates and adds some test cases for the editor and
the publishing flow in Ghost. It uses a helper function to test the date
picker component in the editor, and removes a redundant test case from
the `publish-flow-test.js` file. It also adds two test cases to the
`publishing.spec.js` file, using the Playwright framework, to check the
publish time and the newsletter settings of a post.
2023-10-12 20:27:16 +01:00
Kevin Ansfield
daa36a91b1
Fixed infinite save loop due to missing post_revisions include on saves (#18597)
refs edcd6caf2b
refs 56f2832754

- although we added an include for `post_revisions` when fetching a post for editing we didn't have the same `include` param added to saves meaning our revisions list was wiped from the store on each update
- on leaving the editor we check the last post revision to see if anything has changed and we need to save again, but with it being wiped and not being re-populated on save it meant the check always failed leading to an infinite loop of saves
- updated the posts and pages adapters to use the full includes param on create/update requests so we don't lose what we're trying to compare against
2023-10-12 19:16:45 +00:00
Kevin Ansfield
fa0b1c607b
Deleted all Admin code relating to the old editor (#18580)
no issue

- removed labs flag
- removed main editor component and all associated components
- switched usage of `<KoenigBasicHtmlInput>` and `<KoenigBasicHtmlTextarea>` over to use plain `textarea`, the only uses were in settings modals that have been replaced in AdminX
- cleaned up unused editor CSS
2023-10-12 13:17:39 +01:00
renovate[bot]
a6314ff2b2
🐛 Fixed broken rendering and copy/paste when callout card has a bad bg color value (#18547)
closes https://github.com/TryGhost/Product/issues/4008

- bumps all Koenig packages
  - `kg-default-nodes` contains a rendering fix that avoids creating invalid class attributes from bad `backgroundColor` values
  - `kg-converters` contains an update to avoid copying over bad `backgroundColor` values when converting from mobiledoc to lexical
2023-10-12 11:14:07 +00:00
Fabien "egg" O'Carroll
56f2832754 Explicitly set include for posts/pages in editor
We want to remove the post_revisions default include from the API but it's
required for the post history feature in the editor. Because the default include
is only applied when no include is sent, we have to set the entire string,
rather than just the missing post_revision related fields
2023-10-12 13:10:05 +02:00
renovate[bot]
534435a634 Update dependency jose to v4.15.3 2023-10-12 08:51:30 +00:00
Chris Raible
de16c13852
Removed 10 minute Post-Revision autosave (#18586)
fixes TryGhost/Product#3480

- Removed this feature because it provides a surface area for bugs and
issues, and isn't really needed
2023-10-11 15:15:00 -07:00
Kevin Ansfield
e213a5ca3a
Fixed Admin sending all post revisions along with each post save request (#18582)
no issue

- deleted `post_revisions` from the serialized JSON string for posts
2023-10-11 17:37:50 +00:00
Chris Raible
909c8b53a8
🐛 Fixed bug causing sites with many snippets to be rate limited (#18568)
refs TryGhost/Product#4022

- This block of code converts any snippets that are only in mobiledoc to lexical locally in the editor, then sends a PUT request for each snippet to update it on the server
- For sites with > 50 snippets, these PUT requests were triggering rate limits on Pro of 50 req/s
- This change is a temp fix to add a 100ms sleep between these requests to stay under the 50 req/s limit
- Longer term, we may introduce a migration that will convert all snippets, or modify the editor to somehow lazily convert the snippets when needed, but this temp fix should resolve the rate limiting issue for the time being
2023-10-11 12:06:03 +01:00
Ghost CI
1965599672 v5.69.0 2023-10-11 09:51:28 +00:00
Peter Zimon
586efd1f60
Added "about" modal to AdminX
refs. https://github.com/TryGhost/Product/issues/3949

Added an about modal to the new admin x settings.
---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2023-10-11 16:09:56 +07:00
Kevin Ansfield
95528d25df
🐛 Fixed URL paste over selected text removing text rather than converting to link in Firefox (#18573)
closes https://github.com/TryGhost/Ghost/issues/18569

- bumps Koenig including...
  - fix for Firefox link pasting
  - addition of `Ctrl/Cmd+Alt+H` for toggling highlight formatting
2023-10-11 09:08:09 +00:00
Sanne de Vries
1a8ba0693c
Added shortcuts for highlighting and pasting without formatting (#18556)
No ref
2023-10-11 09:34:42 +02:00
renovate[bot]
7764a73e11 Update dependency ember-cli-babel to v8.2.0 2023-10-11 08:36:43 +02:00
Kevin Ansfield
0ffe4dd144 Swapped feature image caption input from mobiledoc to lexical
closes https://github.com/TryGhost/Product/issues/4015

Swapped `<KoenigBasicHtmlInput>` for `<KoenigLexicalEditorInput>`

- added support for passing `class` through to the container `<div>`
- updated caption handler to clean HTML and strip/add surrounding `<p>` as necessary
- added passthrough for `onFocus` prop
- updated styles to force font style inheritance within Koeing's `.kg-prose` class
2023-10-10 18:45:51 +01:00
Jono M
839b1e1b43
Fixed tiers resetting in Ember when created in AdminX (#18554)
refs https://github.com/TryGhost/Product/issues/3832

---

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

Reload members data when tiers settings change. This ensures that the UI
shows the correct counts and labels of the tiers after updating them in
the settings component.
2023-10-10 15:37:17 +01:00
Kevin Ansfield
3567ae6764 🐛 Fixed editor sometimes getting into a state that resulted in unexpected render output
closes https://github.com/TryGhost/Product/issues/4006

- bumps `koenig-lexical` which includes a fix to prevent non-inline nodes ending up inside paragraph nodes
2023-10-10 14:58:27 +01:00