Commit Graph

37040 Commits

Author SHA1 Message Date
Paul Davis
489fae98eb
Improve external media inliner URL handling (#18428) 2023-10-19 11:58:41 +01:00
Jono M
2debf686e6
Updated AdminX file upload to support drag and drop (#18691)
refs https://github.com/TryGhost/Product/issues/3831

---

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

This pull request adds drag and drop functionality and custom styling
options to the `FileUpload` and `ImageUpload` components, and uses them
to improve the user experience of uploading themes and user images in
the admin settings. It also fixes a minor issue with the background
color contrast in the `IntegrationHeader` component in dark mode, and
updates the corresponding tests.
2023-10-19 11:42:00 +01:00
Chris Raible
b5631241c5
🐛 Fixed bug preventing Casper from being activated from gallery (#18697)
fixes TryGhost/Product#4038

- When selecting a theme from the gallery view of official themes, the logic needs to be different for default/legacy themes (source & casper) vs other official themes. For default/legacy themes, they will already be installed so we just need to activate them, not install them.
- Previously this logic was applied only to the default theme (currently source) but was not applied to Casper, which led to errors when trying to install Casper, since it is protected from being overwritten
- This change treats default/legacy themes the same by skipping the install process and going straight to activating for casper and source
2023-10-18 15:40:58 -07:00
Chris Raible
5a5a756415
Updated theme fixtures for casper and source (#18677)
no issue

- Casper and Source theme files were out of date — this commit updates the theme fixtures, and fixes up a few tests to pass with the updated themes
2023-10-18 14:51:35 -07:00
Sag
96065f9c94
Added more acceptance tests for Recommendation settings (#18696)
closes https://github.com/TryGhost/Product/issues/3955

- also, moved recommendations code to the "membership" folder for
consistency with the UI
- also, renamed "yarn test:slowmo" to "yarn test:acceptance:slowmo" for
consistency in the naming
- also, removed "limit: 1" when checking whether a recommendation URL
already exists. The limit defaults to 5 on the API side, and allowing
more than 1 result will lead to a more thorough check
2023-10-18 18:56:34 +00:00
Siniša Perović
5b8743dd07
Added missing and updated some strings for HR lang (#18024)
Now complete (comments.json, ghost.json, portal.json, and
signup-form.json) Croatian language translation.

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2023-10-18 13:56:16 -04: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
renovate[bot]
2d4959d972 Update dependency i18next to v23.6.0 2023-10-18 16:45:25 +00:00
John O'Nolan
67b6d7cd15
Added contributor code of conduct 2023-10-18 12:10:05 +02:00
Ronald Langeveld
a9ad08cf89
Fixed API Query permissions in User Settings (#18680)
refs
https://www.notion.so/ghost/Cannot-fetch-invites-error-shown-for-authors-edc00af822d844e7add114fd834fc8fc

- the problem is that certain users don't have permissions to make
certain API calls.
- This adds a new hook that validates the current user against
permissions before a query can be made.

---

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

Added a `usePermission` hook and a `permissions` option for custom API
queries to implement role-based permissions in the admin settings app.
2023-10-18 17:04:59 +07: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
Peter Zimon
ea076fac6a Fixed viewport width bug in AdminX (#18681)
refs. https://github.com/TryGhost/Product/issues/3949

- the viewport was getting really wide because of the whitespace
property of newsletter descriptions
2023-10-18 16:30:46 +07:00
Jono M
bc8c9b78e6 Fixed bugs with saving in portal modal (#18649)
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 8ad5f58</samp>

This pull request enhances the portal modal component in the admin
settings for membership. It improves how it handles errors, saves
changes, and communicates with the user.
2023-10-18 16:30:23 +07:00
Peter Zimon
e8768f040c
Fixed viewport width bug in AdminX (#18681)
refs. https://github.com/TryGhost/Product/issues/3949

- the viewport was getting really wide because of the whitespace
property of newsletter descriptions
2023-10-18 10:55:09 +02:00
Steve Larson
a521c23cd3
🐛 Prevented subsequent lexical conversion wiping out content (#18672)
closes TryGhost/Product#4032
- the api flag ?convert_to_lexical converts a mobiledoc string to
lexical
- if run on a post/page with lexical content, would null it out
2023-10-17 20:38:51 +00:00
Sag
9ba1d47b04
Updated copy in the Recommendation email notification (#18671)
closes https://github.com/TryGhost/Product/issues/4031
2023-10-17 17:03:24 +00:00
Sag
22618aad65
Fixed broken link in Recommendations email notification (#18666)
no issue

- paths in the new settings are not using /settings-x/... anymore
2023-10-17 10:44:28 -03:00
Daniel Lockyer
6c2d70f26a Optimized fetching settings from cache adapter
- this optimizes the number of `get` calls we need to do to the adapter
  for settings cache
- for example, this prevents ~187 calls to the adapter during boot
- right now we use the in-memory adapter for settings, so there's probably
  not much benefit, but if we ever switch to the Redis adapter, this will
  help prevent a lot of extra Redis calls
2023-10-17 15:10:02 +02: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
Jannis Fedoruk-Betschki
40a2bdad20
🎨 Improved search keywords in Admin-X Settings (#18608)
fixes https://github.com/TryGhost/Ghost/issues/18661
2023-10-17 13:57:43 +02:00
Sam Lord
11b9e8a73f Switch to 4-core runners for browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

This number of cores has been approved, will test with 1 browser per core, and 1 browser for every two cores
2023-10-17 12:40:19 +01:00
Djordje Vlaisavljevic
fe90778816 Updated copy
refs https://github.com/TryGhost/Product/issues/4030
2023-10-17 10:50:15 +01:00
Sodbileg Gansukh
73aa6bc22e Added back the global box-sizing rule 2023-10-17 17:36:44 +08:00
Jono M
422f486de4
Improved AdminX scrolling behaviour (#18640)
refs https://github.com/TryGhost/Product/issues/3832

Hopefully the scrolling finally works consistently

- Fixed a bug where clicking the navigated section wouldn't scroll to it
- Fixed a bug where the first click after opening settings wouldn't
animate the scroll
- Fixed a bug where the sidebar would always animate scroll even on the
initial page load

---

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

This pull request improves the scrolling and navigation functionality of
the settings page by using a custom hook and a context provider. It
refactors the `RoutingProvider` and the `useScrollSection` hook to
handle the route and sidebar changes more efficiently, and simplifies
the code by removing unnecessary components and state. It also adds new
functions to the scroll section context data to update and scroll to the
desired section.
2023-10-17 09:05:10 +01:00
Ronald Langeveld
a562cc7c7f
Fixed default theme button in theme settings (#18656)
no issue

- the default theme (currently Source) showed Activate despite being
active already, which may lead to confusion.
- This fix checks whether it's already to more accurately display the
wording of the button

---

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

Fix theme preview button label for default theme. Hide the activate
button for the default theme if it is already active in
`ThemePreview.tsx`.
2023-10-17 10:15:58 +07:00
Sam Lord
7f67e98e28 Memoized the getStripeAccountId function
no issue

Some flaky tests found, and it seems as though they're being caused by an invalid Stripe account id.

It's possible that by re-using the worker after a test which calls `setupStripe` could cause some Stripe functionality to not work.
2023-10-16 22:14:10 +01:00
Sag
4911a73979
Released Portal v2.36.2 (#18654)
no issue
- this version contains minor improvements and bug fixes for the Recommendations feature
2023-10-16 17:27:37 +00:00
Djordje Vlaisavljevic
0271928d1c Removed import
refs https://github.com/TryGhost/Product/issues/4024
2023-10-16 18:27:04 +01:00
Djordje Vlaisavljevic
95978bbffa Removed recommendations table header
refs https://github.com/TryGhost/Product/issues/4024
2023-10-16 18:27:04 +01:00
Djordje Vlaisavljevic
08f81dbf90
Updated recommendations design (#18614)
refs https://github.com/TryGhost/Product/issues/4024, https://github.com/TryGhost/Product/issues/3938

- Improved email notification template
- Added `for you` next to the click/subscribe stats

---------

Co-authored-by: Sag <guptazy@gmail.com>
2023-10-16 18:04:15 +01: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
Daniel Lockyer
e699facc03 Cleaned path to Playwright reports
- this is cleaner and follows the pattern as other jobs do
2023-10-16 17:37:42 +02:00
Daniel Lockyer
3a564237a5 Temporarily increased timeout for saving Offer in tests
- if Stripe is slow, this might take longer than we expect to finish
- this helps prevent flaky tests in CI
2023-10-16 17:37:42 +02: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
Sam Lord
ccbcba0969
Switched to a shared page for each playwright worker
refs: https://github.com/TryGhost/DevOps/issues/78

This speeds up the tests by another 30 seconds on my local machine, and
hopefully takes some time off in CI too
2023-10-16 15:32:13 +00:00
Jae Li
0dbfafede0
Updated simplified Chinese translations (#18552) 2023-10-16 15:14:18 +00:00
Jono M
ce9f6ec69a
Fixed bugs with saving in portal modal (#18649)
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 8ad5f58</samp>

This pull request enhances the portal modal component in the admin
settings for membership. It improves how it handles errors, saves
changes, and communicates with the user.
2023-10-16 16:06:38 +01:00
MC Naveen
59d3882c9f
Added theme version in design settings (#18623)
### Why this PR?

This PR adds back the current theme version in Design Settings screen


![image](https://github.com/TryGhost/Ghost/assets/8493007/88f475f6-9bba-4dda-8db7-0bddd2fee8a3)


- [x] There's a clear use-case for this code change, explained above
- [x] Commit message has a short title & references relevant issues
- [x] The build will pass (run `yarn test:all` and `yarn lint`)

---

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

This pull request improves the code quality and user interface of the
design modal component for site settings. It applies code formatting
rules and shows the active theme version on the save button.
2023-10-16 15:37:04 +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
Emilien Bidet
57fe5e7ca6
Added DOCTYPE HTML tag to admin-auth iframe (#18634) 2023-10-16 13:51:10 +02:00
Daniel Lockyer
18f55d6af0 Moved browser E2E tests into CI workflow
refs https://github.com/TryGhost/DevOps/issues/78

- this allows us to take advantage of the dependency caching and metadata
  workflows, to reduce the overall execution time and duplicate logic
2023-10-16 13:45:22 +02:00
joe-blocher
f303eee8a4
Fixed private mode cookie for local development (#17938)
fixes #17514

- good explanation in https://github.com/TryGhost/Ghost/pull/17938#discussion_r1328157348
- fixes setting the private mode cookie in stricter browsers for local development
2023-10-16 11:09:08 +02:00
syb343
42973397a4
Updated Korean translations (#18625)
no issue

- Updated Korean translations for the comments app.

---

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

This change adds Korean translations for the comments feature of Ghost
in the file `ghost/i18n/locales/ko/comments.json`. This enables Korean
users and readers to interact with Ghost-powered sites using their
native language.
2023-10-16 16:01:07 +07:00
Jono M
c2f3721e41
Fixed page jump on modal close in Safari (#18624)
refs https://github.com/TryGhost/Product/issues/4018

---

### <samp>🤖 Generated by Copilot at 5c51ade</samp>

Fix modal scrolling bug in Safari by blurring active element and
delaying close. Affect `Modal.tsx` component.
2023-10-16 09:53:49 +01:00