Commit Graph

33929 Commits

Author SHA1 Message Date
Sanne de Vries
f8273b7f1f Removed ember component test
No ref
- This will be replaced by snapshot tests
2023-04-17 17:12:31 +01:00
Fabien "egg" O'Carroll
b41897a2b4 Fixed unit tests 2023-04-17 16:52:51 +01:00
Fabien "egg" O'Carroll
ff082c1934 Fixed revision creation for new posts
We had incorrectly ported the existing functionality and started adding 2
revisions for each new post. This fixes the logic to only add 1.
2023-04-17 16:49:17 +01:00
Sanne de Vries
c2f14ccd82 Added post history modal layout
No ref
2023-04-17 16:41:00 +01:00
Steve Larson
aec1455c56 fixed bookmark card requests
no refs
2023-04-17 16:31:42 +01:00
Steve Larson
8a563910d3 updated lexical packages
no refs
2023-04-17 16:24:36 +01:00
Fabien "egg" O'Carroll
a507072eb8 Updated PostRevisions to accept html string
- We also fix the name of the feature flag
- We also correctly await the result of revision generation
- We pass the HTML string so we can potentially do an easier word count diff
2023-04-17 16:16:08 +01:00
Chris Raible
79a95268b6
Added Post History modal to the editor behind postHistory flag (#16651)
no issue

- added modal-post-history component and wired it up to the
lexical-editor

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

> _`Post history` is the key to the past_
> _Unveil the changes in a modal so vast_
> _But beware of the doom that lurks in the edits_
> _The lexical-editor is a portal to the abyss_
2023-04-17 15:25:52 +01:00
Fabien "egg" O'Carroll
e151b55461 Fixed name of @tryghost/post-revisions 2023-04-17 14:59:13 +01:00
Fabien "egg" O'Carroll
454dc7a876 Added @tryghost/post-revisions to package.json
This is necessary for our build tool to pick up and bundle the package.
2023-04-17 14:56:12 +01:00
Fabien "egg" O'Carroll
7d7e19449a Used new PostRevisions service for revision generation
This is behind the postHistory flag so that we leave alone the very import
revision generation code. The new package attempts to replicate the existing
strategy but gives us room to easily change it in future
2023-04-17 14:47:27 +01:00
Fabien "egg" O'Carroll
a62fe42933 Implemented initial PostRevisions class
This aims to implement the current strategy of revision generation so that we
can switch to it and start tweaking it whilst the flag is enabled
2023-04-17 14:47:27 +01:00
Elena Baidakova
2236d2ef24
Wired lexical snippets to Ghost (#16647)
refs TryGhost/Team#2904

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

This pull request adds the lexical editor feature to the Ghost admin
app, which allows users to create and edit snippets in a natural
language format. It modifies the `snippet` model, adapter, and
controller, and the `lexical-editor` template and component to support
the new feature.
2023-04-17 17:39:04 +04:00
Sanne de Vries
deb613fcf9 Added trigger in editor for post history modal
No ref
2023-04-17 13:54:57 +01:00
Chris Raible
4c893e5a63
Added post_revisions to posts endpoint as an include option (#16648)
no issue

- with this change, you can access a post's lexical revisions via the
api (e.g. `/posts/:id/?include=post_revisions`)

> _We are the post revisions, we won't be erased_
> _We rise from the ashes of the mobiledoc waste_
> _We join the API response, we claim our rightful place_
> _We are the post revisions, we show the truth of your face_
2023-04-17 13:46:27 +01:00
Fabien "egg" O'Carroll
f3a572a9d1 Fixed unit test coverage
For some reason blank files would fail unit test coverage
2023-04-17 11:23:52 +01:00
Fabien "egg" O'Carroll
12d0c3bf64 Added post-revisions package
This package will be used to contain the logic for determining when a
revisions should be generated for a post. It will be used by the Post
model during saving and will not handle the storage of revisions
2023-04-17 11:14:57 +01:00
Michael Barrett
8dff121f73
Added postHistory feature flag (#16645)
no issue

Added flag to enable / disable post history from within the editor
2023-04-17 11:08:47 +01:00
Elena Baidakova
7f184d2451
Added support for filtering snippets to mobiledoc/lexical (#16636)
refs TryGhost/Team#2904


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

This pull request adds support for multiple formats of snippet content,
especially the `lexical` format, to the Ghost CMS. It modifies the
snippets API, model, and test files to handle the format conversion,
filtering, and serialization of snippets.
2023-04-17 10:54:08 +04:00
Ghost CI
5d43101f40 v5.44.0 2023-04-14 16:00:41 +01:00
Elena Baidakova
3235f22da6
Updated Ghost to handle Lexical snippets (#16630)
refs TryGhost/Team#2904
2023-04-14 16:08:48 +04:00
Sanne de Vries
b76f93ea5a Fixed copy for changing page access modal
Refs https://github.com/TryGhost/Team/issues/2677
2023-04-14 11:32:09 +01:00
Simon Backx
d98f29c6aa Added cache invalidation to posts and pages bulk apis
refs https://github.com/TryGhost/Team/issues/2677
2023-04-14 12:25:24 +02:00
Simon Backx
854f616f70
Added bulk edit pages API and admin UI (#16633)
refs https://github.com/TryGhost/Team/issues/2677

- This extends the bulk editing UI to pages.
- New endpoints for editing pages in bulk
- Support for type in bulk edit UI
- Fixed empty messages for lists
- Minor bugfixes (e.g. save button when adding tags became red because
task didn't return true)

---

This pull request adds support for bulk editing and deleting of pages in
the admin UI and the API. It refactors the context menu component and
the list templates to handle different types of content (posts or pages)
dynamically. It also updates the selection list utility and the no posts
box component to work with the new feature. It modifies the `posts.js`
and `pages.js` API files and the corresponding input and output
serializers and routes.
2023-04-14 12:16:15 +02:00
Elena Baidakova
eaf6e3c7e5
Added lexical column to snippets table (#16632)
refs TryGhost/Team#2904

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

This pull request adds a new `lexical` column to the `snippets` table to
store lexical information for snippets. It includes a migration script,
a schema update, and a schema hash update.
2023-04-14 13:18:41 +04:00
Simon Backx
062a716fbc Added clear selection when right clicking non selected item
refs https://github.com/TryGhost/Team/issues/2677
2023-04-14 11:12:30 +02:00
Simon Backx
20d2722f04 Updated context menu to swap position if outside window
refs https://github.com/TryGhost/Team/issues/2677

When opening a context menu close to the border of the window, the menu went outside the window. This PR updates the position mirror horizontally or vertically if the menu would go outside the window.
2023-04-14 11:04:11 +02:00
Simon Backx
352d7ee5e2 Updated copy when adding a single tag to posts
refs https://github.com/TryGhost/Team/issues/2677
2023-04-14 10:41:49 +02:00
Simon Backx
a36e89dfcc Filter email only posts
no issue

Adds a new filter to filter on email only posts in the admin UI.
2023-04-14 10:38:16 +02:00
Simon Backx
cce324724a Updated shift post selection to use first shift position
refs https://github.com/TryGhost/Team/issues/2677

- When shift clicking on the first item, it no longer will select from top to that item. It will now just select that item.
- Updates event listeners to use mousedown to prevent text selection glitch
2023-04-14 10:19:40 +02:00
Simon Backx
d0cd82cc6f Fixed cancel button clearing post selection
fixes https://github.com/TryGhost/Team/issues/3004
2023-04-14 10:05:48 +02:00
Sanne de Vries
7a6670a993 Removed featured/unfeatured toast and updated copy
Refs https://github.com/TryGhost/Team/issues/2923
2023-04-14 08:56:58 +01:00
Simon Backx
70316c6b15 Removed tpl dependency from admin
refs https://github.com/TryGhost/Team/issues/2677

The dependency caused errors in Safari, probably due to incompatible JS features that need to be polyfilled. Removed it for now and replaced it with a simple method instead.
2023-04-14 09:54:35 +02:00
Simon Backx
f8d0b56c2c Fixed CMD+TAB not firing keyup in post multi selection
refs https://github.com/TryGhost/Team/issues/2677

When doing CMD+TAB, then CMD+TAB+shift, the CMD key got released but both the keyup and blur events weren't called (also focus not).

To fix this, on the next click we'll check the meta, shift and ctrl keys so we can restore the situation.
2023-04-14 09:46:00 +02:00
Daniel Lockyer
1403849efe
Fixed i18n tests in CI
- bit of a mess but we run `test:unit` in CI and this needed to run
  `yarn translate` so i18next-parser can fail if the translations need
  updating (ie. fail tests)
2023-04-14 08:39:51 +01:00
Daniel Lockyer
4a032e23b2
Fixed indentation on Slovenian translations
- we should be using 4 spaces over 2 spaces here
2023-04-14 08:27:57 +01:00
Daniel Lockyer
75553b6bef
Updated Sinhalese encoding
- some characters needed to be re-encoded
2023-04-14 08:16:03 +01:00
Daniel Lockyer
cebad9ae0c
Added support for new locales
- Danish and Chinese as per recent pull requests
2023-04-14 08:14:10 +01:00
martinverbic
d11801d0d4
Updated Slovenian locale (#16621)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-14 08:05:48 +01:00
Christian Schou
1285e4480b
Added Danish translation (#16627)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-14 08:02:02 +01:00
Kasun Chanuka Fernando
427337633b
Added Sinhalese locale (#16595)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-14 07:47:10 +01:00
Alexandre "Lekler" Rodrigues
fd705ccee2
Updated pt-br translations (#16622)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-14 07:44:19 +01:00
AreChen
ada0f34d81
Added Chinese locale (#16623)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-14 07:42:01 +01:00
Sanne de Vries
bf200561ff Updated post list bulk action modals
Refs https://github.com/TryGhost/Team/issues/2923
2023-04-13 17:05:07 +01:00
Simon Backx
c8d715167a Hid post access context menu action when members are disabled
refs https://github.com/TryGhost/Team/issues/2922
2023-04-13 17:54:01 +02:00
Simon Backx
c4dd980421 Fixed transaction usage in bulk tag adding
refs https://github.com/TryGhost/Team/issues/2922
2023-04-13 17:47:00 +02:00
Simon Backx
0cf41171b8 Added error message when trying to add zero tags in bulk action
refs https://github.com/TryGhost/Team/issues/2922
2023-04-13 17:44:26 +02:00
Simon Backx
788aa34c8b Added support for creating new tags when bulk editing posts
refs https://github.com/TryGhost/Team/issues/2922
2023-04-13 17:05:42 +02:00
Simon Backx
76fae2a724 Fixed unpublishing sent posts was allowed
refs https://github.com/TryGhost/Team/issues/2677
2023-04-13 16:20:58 +02:00
Fabien 'egg' O'Carroll
82393fa99d
Added bulk tag addition to post context menu
refs https://github.com/TryGhost/Team/issues/2922

Add multiple tags to multiple posts at once.

---------

Co-authored-by: Simon Backx <simon@ghost.org>
2023-04-13 16:17:36 +02:00