Commit Graph

36848 Commits

Author SHA1 Message Date
Daniel Lockyer
85098e07d4 Configured all unit tests to use dot reporter
refs https://ghost.slack.com/archives/C02G9E68C/p1696490748701419

- this configures mocha to use the dot reporter because the default is
  way too verbose in CI
2023-10-05 12:24:24 +02:00
Simon Backx
1882b7048d
Added click tracking for recommendations helper (#18496)
fixes https://github.com/TryGhost/Product/issues/4001
2023-10-05 11:37:02 +02:00
Nick Moreton
d454f18ad2
Removed sticker option from Pintura (#18497)
Removed the sticker feature from the image editor component in both the
new and the legacy admin apps. This simplifies the UI and the code of
the `usePinturaEditor.ts` and `koenig-image-editor.js` files.
2023-10-05 10:32:13 +01:00
Kevin Ansfield
1b5359dce1
Removed old/unused posts list item component (#18495)
no issue

- cleanup of unused files
2023-10-05 10:01:12 +01:00
Ronald Langeveld
929d05a33b
Fixed sidebar order of Newsletters section - X (#18493)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696490815762949

- Fixed a tiny issue where the Sidebar Navigation doesn't align with the
newsletter options.
- Got rid of some unused commented out code that's not needed.
2023-10-05 15:20:18 +07:00
Ronald Langeveld
d1b92a04a3
Changed HTML Editor to use Koenig's onFocus (#18492)
no issue

- we added a new plugin in Koenig which exposed a new onFocus plugin,
meaning we can get this directly from Koenig instead of hacking the html
dom.
- changed the HTML Editors onFocus function to use Koenig's / Lexical's
built in OnFocus plugin.

---

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

Fix editor toolbar disappearing bug in `HtmlEditor.tsx`. Use focus
plugin from `Koenig` package to handle editor focus.
2023-10-05 12:47:29 +07:00
Sag
0c8218b8f6
Removed wrapper in the Recommendation helper template (#18488)
no issue
2023-10-04 22:11:25 +00:00
Sag
380f3b5ca2
Added missing unit tests to the Recommendations package (#18489)
refs https://github.com/TryGhost/Product/issues/3954
2023-10-04 21:52:22 +00:00
Sag
2391ccc3db
Added more options to "order", in the Recommendations API (#18487)
closes https://github.com/TryGhost/Product/issues/4000
2023-10-04 19:32:03 +00:00
Djordje Vlaisavljevic
27cec8b909
Improved "Copy link" design (#18486)
refs https://github.com/TryGhost/Product/issues/3974
2023-10-04 19:16:08 +01:00
Djordje Vlaisavljevic
cbd43d38a8 Added a tooltip to the "Copy link" button
refs https://github.com/TryGhost/Product/issues/3974
2023-10-04 18:21:32 +01:00
Djordje Vlaisavljevic
1e5b52b368 Added label showing if you're already recommending back a site recommending you
refs https://github.com/TryGhost/Product/issues/3978
2023-10-04 18:21:32 +01:00
Djordje Vlaisavljevic
9a45b0b785 Made recommendation modals footer sticky
no refs
2023-10-04 18:21:32 +01:00
Kevin Ansfield
08e4593093 Added pre-emptive fetch of editor module after logging in to Admin
no issue

Reduces likelihood of seeing the "Loading editor..." state when accessing the editor by fetching the editor module in the background after login.

- added `koenig` service
  - `.resource` getter for returning a React suspense resource object to reduce duplication across main editor and HTML input components
  - `.fetch()` method that fetches the Koenig module, avoids concurrent or repeated fetches by utilising an internal `._fetchTask` ember-concurrency task
- updated Koenig components to use the `koenig` service and associated resource for fetching the module
  - required setting up `editorResource` inside the component's class and passing it in as a prop to the suspense-aware components as we need access to Ember's dependency injection available in the class
- added `koenig.fetch()` call to our post-login code in the `session` service so the fetch is started before the editor is accessed
2023-10-04 17:45:42 +01:00
renovate[bot]
60aa1d9cb7 Update dependency @uiw/react-codemirror to v4.21.19 2023-10-04 15:35:24 +00:00
Sag
15adb254f0
Added an option to recommend back in Admin Settings (#18478)
refs https://github.com/TryGhost/Product/issues/3978

- added "GET /incoming_recommendations/" browse endpoint to the Admin
API - we store incoming recommendations as mentions in the database. The
new endpoint reuses the Mentions API underneath to fetch verified
mentions of type recommendation - recommendation-specific attributes are
returned by the new endpoint, including calculated fields such as the
"RecommendingBack" boolean
- show "Recommend back" option for sites recommending me, only if I
haven't recommended the site already
2023-10-04 15:22:04 +00:00
Michael Barrett
e06a5825dc
🐛 Fixed cache key generation not taking into account array value (#18476)
`generateOptionsData` was not taking into account the query params
`include`, `fields` and `format` could also be an array if included in
the request query like: `?fields[]=title&fields[]=slug` or
`?fields=title&fields=slug`
2023-10-04 15:54:59 +01:00
Kevin Ansfield
c56bfd51de Fixed posts list hrefs showing "mobiledoc-editor" and added "editor-beta" redirects
no issue

- switched posts list over to using the `lexical-editor.edit` route so it uses the `/editor/` href rather than `/mobiledoc-editor/`
- added redirect handling for the `/editor-beta/*` urls to our generic 404 route so anyone upgrading with the beta URLs still open in tabs or saved won't hit a 404
2023-10-04 14:37:12 +01:00
Steve Larson
4bdd8366ea
Removed beta editor flag from admin x settings (#18473)
no refs
2023-10-04 13:35:34 +00:00
Simon Backx
bed3e05eee Added full unit test coverage to recommendations package
fixes https://github.com/TryGhost/Product/issues/3954
2023-10-04 15:31:59 +02:00
Simon Backx
9f9f028e82 Added 100% test coverage for Recommendation class
refs https://github.com/TryGhost/Product/issues/3954
2023-10-04 15:31:59 +02:00
renovate[bot]
76a5b9861a Update dependency jose to v4.15.2 2023-10-04 12:46:19 +00:00
Peter Zimon
09af419db0
Update "Saved" button state in AdminX (#18469)
refs. https://github.com/TryGhost/Product/issues/3949

- "Saved" state of buttons in modals were not distinct enough to see
that there's been a successful save
2023-10-04 14:34:41 +02:00
Kevin Ansfield
259321a1a9 Fixed focus sometimes being lost when clicking on cards at bottom of editor
refs https://github.com/TryGhost/Koenig/pull/964

- editor behaviour has changed to select cards on mousedown, this has the effect of the following click/mouseup event potentially occuring off of the editor canvas if a previously selected card collapses when leaving edit mode
- updated the focus-on-click-below behaviour to skip if the previous mousedown event occurred on a card to avoid unexpected re-focus and card deselection
2023-10-04 13:31:30 +01:00
Sag
506488df11
Fixed typo in the {{recommendations}} helper (#18468)
refs https://github.com/TryGhost/Product/issues/3940
2023-10-04 12:25:27 +00:00
Kevin Ansfield
89a3774983 Fixed e2e-browser publishing tests
refs https://github.com/TryGhost/Ghost/pull/18422

- now that we're using the externally-loaded editor we need to wait for it to load and be ready before moving focus to it and starting to type
2023-10-04 13:20:05 +01:00
Peter Zimon
223a1d7767
Adding CMD/CTRL+S to AdminX (#18466)
refs. https://github.com/TryGhost/Product/issues/3949

- it wasn't possible to save setting values in AdminX with CMD/CTR+S
2023-10-04 13:36:06 +02:00
Steve Larson
8bc653802d
Released new editor (#18422)
Promoted our beta editor to the default editor. Keep an eye on (or subscribe to) https://ghost.org/changelog/ for release announcements with full details.

- moved the beta editor (Lexical-based editor) to the default editor; all pages and posts will now use it
- all mobiledoc (previous editor) posts will remain mobiledoc until opened in the editor at which point will be converted to Lexical on the fly and open in the new editor
2023-10-04 12:22:54 +01:00
Ronald Langeveld
70a805463a
Added Portal acceptance tests in Admin X (#18465)
no issue

---

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

This change adds a new file `portal.test.ts` that contains acceptance
tests for the Portal Settings feature in the admin-x-settings app. The
tests use Playwright to verify that the portal settings can be
customized and saved correctly. The change aims to improve the test
coverage and confidence for the new feature.
2023-10-04 11:06:59 +00:00
Daniel Lockyer
639be25f1d Updated Koenig-Lexical bundling
refs https://github.com/TryGhost/DevOps/issues/83

- this will now continue use the dev server assets if we tell it to,
  or copy the dependency package files to the built folder otherwise
- removes `editor` from config API because it's no longer needed
- removes dependency on `editor.url` in tests, as this no longer exists
- edits dev script to pass dev server URL as env var
- adds `@tryghost/koenig-lexical` dependency to Admin
2023-10-04 12:50:21 +02:00
Peter Zimon
235b346fda
AdminX UX improvements (#18449)
refs. https://github.com/TryGhost/Product/issues/3949

- added `isSearchable` to Select component (default `false`) so that only specific selects are searchable
- added `onFocus` and `onBlur` to select so that it can search for "/" and doesn't jump to the searchfield
2023-10-04 12:09:04 +02:00
Ghost CI
81a6f0a00f v5.67.0 2023-10-04 08:36:13 +00:00
renovate[bot]
6ec3a600cc Update dependency vite to v4.4.10 2023-10-04 08:35:18 +02:00
Chris Raible
5bdad1b945
Updated minimum CLI version to 1.25.0 (#18462)
no issue

- Updated minimum ghost-cli version to 1.25.0 to accommodate shipping
multiple builtin themes
2023-10-04 03:39:32 +00:00
Sodbileg Gansukh
58ccca378a Source theme improvements in AdminX
no issues

- now the crossfade effect starts immediately after Source theme thumbnail is hovered
- fixed theme category text shifting when transitioning
- the hover effect now only applies to Source theme thumbnail
2023-10-04 10:32:01 +08:00
Ronald Langeveld
f9478f5489
Added unit test for Embed Code Generator - AdminX (#18445)
no issue

Add unit tests for `generateEmbedCode` utility function. The tests
verify the HTML output for various options and parameters that affect
the appearance and behaviour of the generated embed script's output.
2023-10-04 08:43:02 +07:00
Chris Raible
f9edbc22f0
Updated browser tests to use class names from Source theme (#18459)
no issue

- After updating the default theme to be Source instead of Casper, the
browser tests broke because they depended on the class names in Casper,
which have changed
- This fixes that by updating the classes to be compatible with the
Source theme
2023-10-03 20:03:57 +00:00
Steve Larson
be209cdcf7
Bumped Koenig packages (#18455)
no refs
- various fixes and improvements, see Koenig repo for more info
2023-10-03 16:36:59 +00:00
Michael Barrett
2373a51ee4
Fixed storybook failing to load due @tryghost/nql usage (#18453)
no refs

storybook was failing to load due to `@tryghost/nql` usage and the
global `vite` config not being used
2023-10-03 16:49:05 +01:00
Djordje Vlaisavljevic
84520f86f7 Updated recommendation preview design
refs https://github.com/TryGhost/Product/issues/3991
2023-10-03 16:34:30 +01:00
Simon Backx
22484d6f96
Added more unit test coverage for recommendations package (#18450)
refs https://github.com/TryGhost/Product/issues/3954
2023-10-03 15:11:47 +00:00
Chris Raible
80a6fe17d0 Added Source as the new default theme
refs TryGhost/Product#3510

- Added `TryGhost/Source` as a submodule in `ghost/core/content/themes` so `Source` will ship with Ghost (along with Casper)
- With this change, new installs will use `Source` as the default theme. Existing sites will have `Source` installed, but not activated, as this is a large change and we don't want to drastically change existing sites without warning. Users can upgrade to use `Source` simply by clicking 'Activate' in design settings.
- Updated protections to prevent users from uploading their own conflicting version of `Source`
2023-10-03 14:02:08 +02:00
renovate[bot]
add7f1283b Update dependency terser to v5.21.0 2023-10-03 11:54:38 +00:00
Daniel Lockyer
34ac0cccb6 🎨 Increased maximum number of custom theme settings to 20
refs https://github.com/TryGhost/Product/issues/3969

- this now allows themes to have up to 20 custom theme settings
- also bumps `@tryghost/zip` to try and ensure it uses the version
  without fs-extra
2023-10-03 13:39:55 +02:00
Djordje Vlaisavljevic
a5a5c2ea71 Updated recommendation preview design
refs https://github.com/TryGhost/Product/issues/3991
2023-10-03 12:06:55 +01:00
Simon Backx
1f97c9eb97
Added 100% unit test coverage for UnsafeData (#18443)
refs https://github.com/TryGhost/Product/issues/3954
2023-10-03 11:01:29 +00:00
Sanne de Vries
dd84a42b43
Updated styles for editor loading and error states (#18441)
No ref
2023-10-03 09:55:43 +00:00
Ronald Langeveld
a596b3aaca
Renamed e2e tests to acceptance tests in Admin X (#18439)
ref https://www.notion.so/AdminX-testing-plan-99b2dab27e794fc893767ccd01c84a63?d=26612fc2b9d84e65bbb269fa3bc5079e&pvs=4#f0089cd4d9f24e93bd7f8e2868987bf6

This pull request renames the end-to-end tests to acceptance tests in
the `apps/admin-x-settings` folder. It updates the `ci.yml` file, the
`package.json` file, the `playwright.config.ts` file, and the test files
to reflect the new naming convention. This change aims to better reflect
the purpose and scope of the tests.
2023-10-03 16:20:40 +07:00
Princi Vershwal
3442fdfee6
🐛 Show specific tier posts under 'Paid-member only' filter in admin panel (#17043)
fixes https://github.com/TryGhost/Ghost/issues/16988
2023-10-03 14:43:11 +05:30
Simon Backx
8d1320a225
Wired up 'show all' recommending you (#18440)
fixes https://github.com/TryGhost/Product/issues/3975
2023-10-03 08:57:14 +00:00